EagleTempest
Technical User
VB 2005 & .Net Framework 2.0 on XP SP2.
Maybe it's just my computer acting up being a VB6 application I wrote before is also giving me problems lately with remapping network drives.
I want to force P drive to disconnect. I've included Windows Script Host Object Model Version 1 reference. I'm using:
It will not disconnect P drive. I can't figure if some background process is using P drive or why forcing it doesn't work. At the command line, net use P: /delete works fine but this code doesn't do anything. Any ideas?
Maybe it's just my computer acting up being a VB6 application I wrote before is also giving me problems lately with remapping network drives.
I want to force P drive to disconnect. I've included Windows Script Host Object Model Version 1 reference. I'm using:
Code:
Imports IWshRuntimeLibrary
Dim WshNetwork As New WshNetwork
WshNetwork.RemoveNetworkDrive("P:", True)
It will not disconnect P drive. I can't figure if some background process is using P drive or why forcing it doesn't work. At the command line, net use P: /delete works fine but this code doesn't do anything. Any ideas?