Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disconnect network drive on program exit

Status
Not open for further replies.

wkszd

MIS
May 17, 2002
35
0
0
US
I know that when using VB Script you can map a network drive, then disconnect that drive when you logoff. But, is there a way to unmap the network drive when you exit the program?

For example, in a VB Script, I map network drive "T", then start WinWord. When I close WinWord, I'd like network drive "T" to disconnect.

Thanks for any help you can give me.
 
Provided you start winword with the WshShell.Run method having 3rd parameter = True:
WshNetwork.RemoveNetworkDrive "T:"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top