can't capture LPT1 usine net use

jasonmichel
jasonmichel used Ask the Experts™
on
have an old dos program running in xp mode on my windows 7 box, i have the printer shared out on the windows 7 machine and i'm trying to capture it to use lpt1 on the xp session so the dos program can print to it. When i try to use it i get :

The local device name has a remembered connection to another network resource.

so i do a net use and see


Status       Local     Remote                    Network

------------------------------------------------------------------------------
Disconnected F:        \\server\data             Microsoft Windows Network
Unavailable  LPT1:     \\192.168.31.75\HP4       Microsoft Windows Network
                       \\TSCLIENT\C              Microsoft Terminal Services
                       \\TSCLIENT\D              Microsoft Terminal Services
                       \\TSCLIENT\E              Microsoft Terminal Services
                       \\TSCLIENT\F              Microsoft Terminal Services
                       \\TSCLIENT\U              Microsoft Terminal Services
                       \\TSCLIENT\Y              Microsoft Terminal Services
                       \\TSCLIENT\Z              Microsoft Terminal Services
The command completed successfully.


simple enough right, ill just do a net use  \\192.168.31.75\HP4 /delete

i get

C:\Documents and Settings\XPMUser>net use \\192.168.31.75\HP4 /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.

the ip is to the loopback on that machine, i installed a loopback adapter for testing...i tried the command with it enabled and disabled..nothing...

any ideas?



Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
how do capture the port?

the command should be:
net use LPT1: \\192.168.31.75\HP4

to delete use:
net use LPT1: /delete

hope it will help.

try this:
net use /persistent:no
reboot the computer
net use lpt1: /d
net use lpt1: \\Server\

If you can, run the commands above while connected to the computer locally, not through a Terminal Server Connection.
If TS is required, try to tune the way the local devices are mapped to the TS client, this can be quite tricky...

Author

Commented:
its using xp mode, no option but use the virtual pc.  also i figured it out, i deleted that loopback adapter, rebooted then net use lpt1: /d  and it removed it, i was then able to capture it.

OK           LPT1      \\10.8.145.12\hp4000      Microsoft Windows Network
                       \\TSCLIENT\C              Microsoft Terminal Services
                       \\TSCLIENT\D              Microsoft Terminal Services
                       \\TSCLIENT\E              Microsoft Terminal Services
                       \\TSCLIENT\F              Microsoft Terminal Services
                       \\TSCLIENT\U              Microsoft Terminal Services
                       \\TSCLIENT\Y              Microsoft Terminal Services
                       \\TSCLIENT\Z              Microsoft Terminal Services
The command completed successfully.


however, when i go to printers it doesn't show up there?
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

Most Valuable Expert 2015

Commented:
Is there already a physical LPT1 port installed? If so, try mapping to LPT2 instead and printing to that, or try disabling LPT1 in the BIOS first.

Author

Commented:
i can disable it in device manager, but what does that do?  I have to print to lpt1
you don't see the printer because all you did was capturing the port.

to solve this, add a printer with the driver for hp4000 and set the port to LPT1:.
as this port is captured, all prints will be redirected to the networked printer.
Most Valuable Expert 2015
Commented:
If you don't print out of XP-Mode, but rather only from your DOS app, the XP driver for the printer shouldn't be needed. Just print from the DOS app to the LPT port. Under DOS usually there was no printer driver installed, but the app you would print from would handle that directly via the ESC characters the printer understood.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial