I am using Mark's login script as a base:
In mapping network drives, if each user has a directory named after them and I want to map it in the login script, how do I fill in the part of the path where their username goes?
Early on in the script he pulls the username:
'Grab the user name
UserString = WSHNetwork.UserName
'Bind to the user object to get user name and check for group memberships later
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
But so now when I map the drive, how do I fill in their username? I'm not very familiar with VBScript. For example, if I want to map userdrives\jsmith to L:, would it be something like:
WSHNetwork.MapNetworkDrive "L:", "\\servername\userdrives\"UserString
I tried this and it did not work (I'm not surprised it was a shot in the dark). Can anyone correct the statement for me so it will fill in the username as the last part of the path to be mapped?
Thanks!
In mapping network drives, if each user has a directory named after them and I want to map it in the login script, how do I fill in the part of the path where their username goes?
Early on in the script he pulls the username:
'Grab the user name
UserString = WSHNetwork.UserName
'Bind to the user object to get user name and check for group memberships later
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
But so now when I map the drive, how do I fill in their username? I'm not very familiar with VBScript. For example, if I want to map userdrives\jsmith to L:, would it be something like:
WSHNetwork.MapNetworkDrive "L:", "\\servername\userdrives\"UserString
I tried this and it did not work (I'm not surprised it was a shot in the dark). Can anyone correct the statement for me so it will fill in the username as the last part of the path to be mapped?
Thanks!