|Subject:||"Parameter is incorrect"|
|Posted by:||Kelvin (…@mydomain.com)|
|Date:||Thu, 6 Aug 2009|
I'm getting an error that my script in 23 (the line that starts with "
WSHNetwork") has an error at Char 5. Error: "Parameter is incorrect"
Dim WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj, Path
'Disconnect ALL mapped drives
Set clDrives = WshNetwork.EnumNetworkDrives
For i = 0 to clDrives.Count -1 Step 2
WSHNetwork.RemoveNetworkDrive clDrives.Item(i), True, True
'Give the PC time to do the disconnect, wait 300 milliseconds
I thought I had this part working, but now it's kicking up an error...
I'm not much of a programmer so don't have much to go on to resolve this.
Is there a better way to do this, or can someone show me what I need to
change to make this work?
XP Pro workstations
MS 2003 Server
Thanks a million!