troubleshooting Question

VBS - Map Home Directory

Avatar of CMCITD
CMCITDFlag for United States of America asked on
SoftwareVB ScriptWindows OS
7 Comments1 Solution172 ViewsLast Modified:
We are currently using an SSO kiosk software (Imprivata).  Windows automatically logs into windows using a shared AD account and then locks.  Individual users can then login with their own credentials to run software etc..  The problem is that when each user logs in, they do not have access to their home directory documents folder.  THe shared autologon account maps the AD drive throu GPO as it would for any other account on our network. The SSO software can incorporate VBS scripts during logon/logoff.

I am attempting to map their home directory folder, but having issue.  I can get all the way to the home$ folder, but not the username folder.  Attached is the script I am running.  It seems like there is something the system doesnt like about the %username% variable?

Option Explicit
Dim objNetwork, strRemotePath1
Dim strDriveLetter1
strDriveLetter1 = "M:"
strRemotePath1 = "\\cmc-vserver\home$\%username%"
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1
End-user support

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
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 1 Answer and 7 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