Hi,
Thanks in advance for any response and assistance with this,
I am very new to scripting and have a vbscript (below) to map shared drives, it works but some users are reporting error "the local device name has a remembered connection to another network resource"
I understand it has something to do with including a RemoveNetworkDrive command and deleting registry entries for the network drives from under HKCU\Network\driveletter.
How can I incorporate remove network drives and delete the registry keys before executing the rest of the script?
' ------ SCRIPT CONFIGURATION ------
strDrive = "S:"
strPath = "\\share\drive"
boolPersistent = False ' True = Persistent ; False = Not Persistent
strDrive2 = "G:"
strPath2 = "\\share\drive"
boolPersistent2 = False ' True = Persistent ; False = Not Persistent
strDrive3 = "N:"
strPath3 = "\\share\drive"
boolPersistent3 = False ' True = Persistent ; False = Not Persistent
strDrive4 = "O:"
strPath4 = "\\share\drive"
boolPersistent4 = False ' True = Persistent ; False = Not Persistent
strDrive5 = "P:"
strPath5 = "\\share\drive"
boolPersistent5 = False ' True = Persistent ; False = Not Persistent
' ------ END CONFIGURATION ---------
objNetwork.MapNetworkDrive strDrive, strPath, boolPersistent
objNetwork.MapNetworkDrive strDrive2, strPath2, boolPersistent2
objNetwork.MapNetworkDrive strDrive3, strPath3, boolPersistent3
objNetwork.MapNetworkDrive strDrive4, strPath4, boolPersistent4
objNetwork.MapNetworkDrive strDrive5, strPath5, boolPersistent5
Thanks in advance for any response and assistance with this,
I am very new to scripting and have a vbscript (below) to map shared drives, it works but some users are reporting error "the local device name has a remembered connection to another network resource"
I understand it has something to do with including a RemoveNetworkDrive command and deleting registry entries for the network drives from under HKCU\Network\driveletter.
How can I incorporate remove network drives and delete the registry keys before executing the rest of the script?
' ------ SCRIPT CONFIGURATION ------
strDrive = "S:"
strPath = "\\share\drive"
boolPersistent = False ' True = Persistent ; False = Not Persistent
strDrive2 = "G:"
strPath2 = "\\share\drive"
boolPersistent2 = False ' True = Persistent ; False = Not Persistent
strDrive3 = "N:"
strPath3 = "\\share\drive"
boolPersistent3 = False ' True = Persistent ; False = Not Persistent
strDrive4 = "O:"
strPath4 = "\\share\drive"
boolPersistent4 = False ' True = Persistent ; False = Not Persistent
strDrive5 = "P:"
strPath5 = "\\share\drive"
boolPersistent5 = False ' True = Persistent ; False = Not Persistent
' ------ END CONFIGURATION ---------
objNetwork.MapNetworkDrive strDrive, strPath, boolPersistent
objNetwork.MapNetworkDrive strDrive2, strPath2, boolPersistent2
objNetwork.MapNetworkDrive strDrive3, strPath3, boolPersistent3
objNetwork.MapNetworkDrive strDrive4, strPath4, boolPersistent4
objNetwork.MapNetworkDrive strDrive5, strPath5, boolPersistent5