PDA

View Full Version : Forcibly disconnect mapped drive


snotnose
02-07-2007, 01:41 PM
System is WinXP. Is there anyway to use 'net use' to disconnect a mapped network drive, without closing the app(s) that are currently using that drive?

Background. I have a a test suite that uses files mapped to the t: drive. To test a different hardware platform you simply unmap t: and remap it to a different location.

I'd like to disconnect t:\ from the command line (soon to be a batch file). The problem is, t: is in use by the test suite. So "net use t: /delete" doesn't work, I have to go to My Computer and disconnect it from there. Stopping the test suite and restarting it takes 2-3 minutes, plus it can't be easily done in a batch file. However, replacing t:\ out from under it works like a charm (I planned it that way).

This thread is a similar discussion of what I'm after:
http://www.hardforum.com/showthread.php?t=1048024

k1pp3r
02-07-2007, 02:34 PM
net use t: /d

Edit. yay for reading the whole post, i loose