• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 703
  • Last Modified:

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.
0
clynch302
Asked:
clynch302
1 Solution
 
rparsons1000Commented:
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:"
strRemotePath = "\\IPADDRESS\SHARENAME"

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
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now