Link to home
Start Free TrialLog in
Avatar of nickbuol
nickbuolFlag for United States of America

asked on

Need to disconnect a rogue remote disk in Win NT.

I just set up a new job in Task scheduler that runs a batchfile which Maps a "nework drive" and copys data from the server to the mapped drive. This is using the net use command, and is actually mapping a drive to a share point on the same server (a subst command may have been a better way to go). The job worked the first time, but has failed mapping the drive since the first one. I checked under My Computer and the P: drive that I was mapping looks like a local drive and has the disk type of "Remote Disk". I can't figure out how to remove it. Has anybody seen "Remote Disk" before. When I type net use from a cmd prmpt it doesnt show up and there is no option to disconnect it.
Avatar of nickbuol
nickbuol
Flag of United States of America image

ASKER

There is a rare problem whereby, in the list of network connections to remote disks, one or more of them mysteriously is classified as a "Remote Disk", rather than the usual "Network Connection".

In other words, "Remote Disk" seems to be like the other usual and familiar options of
     Floppy Disk
     Local Disk
     Removable Disk
     CD-ROM disk
and not like
     Network Connection
any more. Namely, you can't delete it.

It still works properly to access the remote disk, you just can't delete it by any mechanism.

The reason for this turns out to be simple and the solution easy.

The reason is that someone has run a command such as
net use T: \\xxxxxxx\xxxx /p:y
as a scheduled job.

When the scheduled job ran, it assigned drive {T:} to the remote disk \\xxxxxxx\xxxx as expected. But it assigned it while running in the background. So {T:} belongs to the background.

Now you log on to the workstation and you can see {T:} as a network connection. It looks like a normal remote disk that you could delete. But if you run the command NET USE, you will see that it is unavailable. That doesn't mean unavailable to use - you can access files via {T:} just fine. Instead, it means it is unavailable for you to change - it doesn't belong to you.

So you decide to change it anyway. You issue the DOS command
     NET USE T: /DELETE
(or the equivalent using the GUI interface via My Computer). At this point, the "Network Connection" words disappear and you now see "Remote Disk". (You might have to refresh the display to see this)

Now you try feverishly to delete {T:}, but there is no option, just as there is no option for deleting {C:} (a Local Disk) or the floppy or anything else that is permanent. It appears that {T:} has been promoted to a permanent fixture.

The solution is to quit trying to delete it via your login session but instead schedule a job to do that. For example,
AT 3:00 /INTERACTIVE NET USE T: /DELETE.

When the job gets created, run it immediately via the scheduler GUI and refresh your view of My Computer. {T:} should now be gone. (remember to remove the scheduled job)

If {T:} stubbornly remains, you may need to reboot. If reboot is inconvenient, you can go to Services and stop the Workstation service (this is the job that was holding the {T:} and I don't know why it doesn't always release it nicely)

If you do that, keep a list of other services that are stopped. Probably they are Alerter, Computer Browser, Messenger, and Net Logon.

After restarting the Workstation service, start the others too.
Found my own answer.
ASKER CERTIFIED SOLUTION
Avatar of Adam_Cahill
Adam_Cahill
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial