Forced Disconnect

B

Barney

It is very common for me to observe "The device is being
accessed by an active process" when I issue a NET USE
X: /DEL command.

I know that using Explorer, I can right-click on the
mapped drive and select "Disconnect". Windows then
reports "There are currently files open on X:. If you do
not close the files before disconnecting from the network
device, data may be lost. Do you want to disconnect the
device anyway?".

How do I accomplish the same from the command prompt?
There are never any ill effects if I do this from the GUI.
 
M

Marty List

Barney said:
It is very common for me to observe "The device is being
accessed by an active process" when I issue a NET USE
X: /DEL command.

I know that using Explorer, I can right-click on the
mapped drive and select "Disconnect". Windows then
reports "There are currently files open on X:. If you do
not close the files before disconnecting from the network
device, data may be lost. Do you want to disconnect the
device anyway?".

How do I accomplish the same from the command prompt?
There are never any ill effects if I do this from the GUI.


NET USE X: /DEL /YES
 
B

Barney

This did not work.

I observe:

"The device is being accessed by an active process.

More help is available by typing NET HELPMSG 2404."
 
M

Mark V

In said:
This did not work.

I observe:

"The device is being accessed by an active process.

More help is available by typing NET HELPMSG 2404."

Perhaps silly but is this from a command prompt "X:" (the active
logged drive)?
 
M

Marty List

What kind of apps or scripts are you launching that access the mapped drive?
Forcing the drive to unmap is not the best solution, finding out what is
leaving a handle open on that drive is better.

Try Handle.exe from http://www.sysinternals.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top