What are the vbs comand equivalents to set the persistent connections
to off
See this page for information. There is a VBScript example at the bottom
of the page.
http://msdn.microsoft.com/en-us/library/8kst88h6(VS.85).aspx
I have the WshNetwork.RemovenetworkDrive, but on some computers , that
does not seem to remove drives where the computer was set using the
net use /persisitent:yes command. I would always get a local device
name has a remembered connection to another network resource.
I had a wscript.sleep time pause of 10 seconds after removing my
drives, but even with that, when trying to map, I would get this
error.
Once i went to the computer and typed in at the command prompt
net use /persistent:no then the next time I restarted and logged on,
the error went away.
So I wanted to do the equivalent in my vbs script to make sure all
persistent connections were removed as the wshNetwork.Removenetwork
Drive with the true, and true parameters did not seem to work
Are you specifying True for both 'bForce' and 'bUpdateProfile'? If not,
give it a try, something like:
Set oWNT = CreateObject("WScript.Network")
oWNT.RemoveNetworkDrive "Z:", True, True
RemoveNetworkDrive Method:
http://msdn.microsoft.com/en-us/library/d16d7wbf(VS.85).aspx