Curtv
asked on
RemoveNetworkDrive with wildcards
Removing a network drive is easy enough. I would like to disconnect all mapped drives, then remap them in a login script. I would preferr not to have to have a line for each drive letter that exist. I thought there might be a way to use a wildcard in this. I like to keep things simple an short. Below is the script I am working from, nothing fancy.
on error resume next
Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScr ipt.Networ k")
WshNetwork.RemoveNetworkDr ive "D:"
WshNetwork.MapNetworkDrive "F:", "\\server\share"
WshNetwork.MapNetworkDrive "M:", "\\server\share"
WshNetwork.MapNetworkDrive "N:", "\\server\share"
Thanks
on error resume next
Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScr
WshNetwork.RemoveNetworkDr
WshNetwork.MapNetworkDrive
WshNetwork.MapNetworkDrive
WshNetwork.MapNetworkDrive
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER