WshNetwork Problem:
Sample
----------------------------------------
WshNetwork.RemoveNetworkDrive "P:", true
WshNetwork.MapNetworkDrive "P:", "\\192.168.0.100\Files"
----------------------------------------
Result works 98% of the time. Gets hung from time to time in a loop:
First line will produce this:
> WSHNetwork.RemoveNetworkDrive error '800708ca'
> This network connection does not exist.
Okay fine, I am trying to remove a network drive that does not exist. Understood, so if I rem out the first line and I get this:
> WSHNetwork.MapNetworkDrive error '80070055'
> The local device name is already in use.
Okay, so its does not exist but its in use!!!! ARGH!
I have tried numerous variants of sequence and so on. I am of course checking for connected drives, etc.
Cheating the system and picking a different drive letter will force it over or rebooting the server also will fix it however these are highly unacceptable.
Can someone provide me some assistance - PLEASE.
Sample
----------------------------------------
WshNetwork.RemoveNetworkDrive "P:", true
WshNetwork.MapNetworkDrive "P:", "\\192.168.0.100\Files"
----------------------------------------
Result works 98% of the time. Gets hung from time to time in a loop:
First line will produce this:
> WSHNetwork.RemoveNetworkDrive error '800708ca'
> This network connection does not exist.
Okay fine, I am trying to remove a network drive that does not exist. Understood, so if I rem out the first line and I get this:
> WSHNetwork.MapNetworkDrive error '80070055'
> The local device name is already in use.
Okay, so its does not exist but its in use!!!! ARGH!
I have tried numerous variants of sequence and so on. I am of course checking for connected drives, etc.
Cheating the system and picking a different drive letter will force it over or rebooting the server also will fix it however these are highly unacceptable.
Can someone provide me some assistance - PLEASE.