troubleshooting Question

How to map network dive(s) via asp pages.

Avatar of hhaugen
hhaugen asked on
Web Languages and Standards
4 Comments2 Solutions196 ViewsLast Modified:
Depending on information a user selects on a form through radio buttons the users computer should automatically map different network drives.  I have made two asp pages. The first that contains the 'input' form with radio buttons and code like:
.
.
document.write "<INPUT type=radio value=" & <servername> & " name='N'>"
.
.

and the 'performing' form:

<HTML>
<HEAD>
<TITLE>MapDrive</TITLE>
</HEAD>
<BODY Language="VBS">

<%
Set wshNetwork = CreateObject("Wscript.Network")
N = request.form("N")
wshNetwork.MapNetworkDrive "N:", "\\" & N & "\nerarkiv"
%>

</BODY>
</HTML>

When run I receive the following error. 'Access is denied'.  This I understand since everything between the <% and %> is executed on the 'server side', and it is the server that tries to map the drive.  I have tried to switch the <%..%> signs with <script...>..</script> but the script stops on the line N=request.... with object not found.  Any idea how to solve this ??
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros