Lordmathos
IS-IT--Management
Hi All I won't lie to you. I know nothing about VBscript.
I am working on a basic logon script to map network drives (as follows)
Dim wshNetwork
Set wshNetwork = CreateObject("Wscript.Network")
wshNetwork.MapNetworkDrive "I:", "\\server1\backups"
WSCript.Quit
The problem I am having is the script will error if it tries to create the network drive if the drive already exists.
How do I add an "IF" statement so it will skip creating the drive if it is already present?
I am working on a basic logon script to map network drives (as follows)
Dim wshNetwork
Set wshNetwork = CreateObject("Wscript.Network")
wshNetwork.MapNetworkDrive "I:", "\\server1\backups"
WSCript.Quit
The problem I am having is the script will error if it tries to create the network drive if the drive already exists.
How do I add an "IF" statement so it will skip creating the drive if it is already present?