Hello,
We got currently a very light vbs file to map drives which works fine.
To continu a migration, I need to add a condition to a mapping vbs script.
So my question is, how can I add that condition ?
Below you have the logon script.
It is for the line "WshNetwork.MapNetworkDrive "J:", "\\Fileserver\" + WshNetwork.UserName that i need to add a condition.
The idea is, If the user logs on in remote desktop to Computer A and/or B it must be \\Fileserver2\Applications and for all other computers it muss be \\Fileserver\Company
Any help is really appreciated.
Thanks.
Logon script :
On Error resume Next
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshNetwork = WScript.CreateObject("WScript.Network")
set fso = CreateObject("Scripting.FileSystemObject")
WshShell.Popup "Welcome to Company Network." & CRx2 & "Connecting Drives.", 5, AppTitle, 64
NetwOk = True
WshNetwork.MapNetworkDrive "H:", "\\Fileserver\" + WshNetwork.UserName ,FALSE
WshNetwork.MapNetworkDrive "J:", "\\Fileserver\Company" ,FALSE