Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Network Logon script problem
I have created the network logon script below, however it gives an error on:
Error: Expected end of statement
Can't figure out correct syntax for it.
Dim objNetwork, strRemotePath1, strRemotePath2
Dim strDriveLetter1, strDriveLetter2
strDriveLetter1 = "F:"
strDriveLetter2 = "P:"
strDriveLetter3 = "S:"
strRemotePath1 = "\Alpha-DC1Fax"
strRemotePath2 = "\Alpha-DC1Public"
strRemotePath3 = "\Alpha-DC1Software"
Set objNetwork = CreateObject("WScript.Network")
' Section which maps two drives, F: and P: and S:
objNetwork.MapNetworkDrive = strDriveLetter1, strRemotePath1
objNetwork.MapNetworkDrive = strDriveLetter2, strRemotePath2
objNetwork.MapNetworkDrive = strDriveLetter3, strRemotePath3
' Extra code just to add a message box
WScript.Echo "Map drives " & strDriveLetter1 & " & " & strDriveLetter2 & " & " & strDriveLetter3
Thanks for the help!