mapping drives via vbs script over vpn

I am using ISA 2006 on a Win2k3 server for vpn users. Users
connect fine from the viewpoint of successfully authenticating users and giving them network access. However when I try to run a logon script (vbs) to map drives and printers, the script runs under the username of the locally logged on user, not the authenticated active directory user. This basically means that the script fails to map the drives as the locally logged on user does not have the permissions to access the network drives in questions. Is there a way that I can force the script to run under the active directory account or is there a way that I can edit the script to prompt the user to enter his/her username and password.
Who is Participating?
rparsons1000Connect With a Mentor Commented:
Here is the script you want
replace DRIVELETTER with the drive you want to assign
repace: IPADDRESS with the IP of the server (name might work)
replace: SHARENAME with the name of the share
replace DOMAIN with your domain name

As a note: i personally would join the machine to the domain, get the user to log in and used cached credentials. The username & password in the script will pass in plain text but will do the job....

Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath, strUser, strPassword, strProfile

strDriveLetter = "DRIVELETTER:"

strUser=InputBox("Enter your username:")
strPassword=InputBox("Enter your Password:")

strProfile = "false"

Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, _
strProfile, "DOMAIN\" & strUser, strPassword
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.