Discussion Locked

Unable to delete a net use device

0 helpful
10 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am using the NET USE lptn: \\servername\printername /persistent:yes to define remote network printers while connected via Terminal Services. I am having problems reassigning one of the LPT ports to another network printer. When I try to delete the port, (Net Use LPT2: \DELETE) I get the message that the device is in use. I have successfully reassigned that printer on two other PCs. Can anyone advise me as to either releasing the device or point me in the direction of the complete ins and outs of the NET USE command? I have already tried deleting all printers in the printer folder as well and powering off/on the PC and the printer and its server. Thanks.

10 replies

by gigelul

Hi,
"NET USE /?" will explain you all commands.
Correct sintax is "NET USE LPT2: /DELETE".
On computer where phisicaly is attached this printer check with "NET USE" what maps exist (don't use on this computer any mappings to LPT with NET USE - orjobs will be redirected/blocked).
I think that your problem is on computer where is attached the printer not on client computer.

by gigelul

If you find a map to LPT on computer with printer local connected, delete map, restart computer and logon with the same account without any maps to the LPT.

by gigelul

If you can, shutdown and power off the computer which share the printer (with local printer) then try again on client computer to delete the map to LPT.

by lmayeda

On the PC which shares the printer, there were not mapping to LPT for the shared printer.

by joseph moore

Actually, the correct syntax is:

NET USE LPT2 /DELETE

No : or \ used in the delete command.

hope this helps

by rabbit_runner

Something else to check. You will not be able to delete the port from a command line, IF there is an LPT2 port in the windows printer folder.

I discovered that if, in the windows printer folder, an LPT port had been mapped, then it would not be possible to delete it using the
NET USE LPT2: \delete
command.

This could be completely wrong, but it is worth checking out. Delete the one in Windows printer folder first, then run the NET USE command. You may have to reboot between each delete. I hope this works for you.

by lmayeda

That was not the issue in this case, the only other printer was mapped to lpt3. I went to each of the 3 computers that had been mapped to LPT2, and while logged on as each user and as the local administrator, I ran NET USE just to check that the ports were mapped to the correct servers. Somewhere on the network, something still remembers the connection to LPT2: and shows "anonymous user, remote printing"

This discussion is closed to new replies.