I'm trying to map some specific drives to specific users in a vbs login script.
The setup is fairly simple but for some reason the drives are mapped for every user.
strUser = WSHNetwork.UserName
Select Case strUser
Case "User1" Or "User2"
WSHNetwork.MapNetworkDrive "F:", "\\SERVER\DRIVE",True
WSHNetwork.MapNetworkDrive "Y:", "\\SERVER\DRIVE2",True
Even if I execute the script as "User3" or "UserSomethingCompletelyDifferent" it still maps the drives. That's why I added an echo at the end. The echo clearly shows a different username than the usernames in the Case expression. But still the drives are mapped.
I don't get it.