Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

Capture printer port to LPT for JetDirect and standard Printers

SOLVED
Go to solution
c_28
Occasional Visitor

Capture printer port to LPT for JetDirect and standard Printers

We write a 16 bit app that needs to print to an LPT port. On XP/2k, we need to capture the port through a net use command.

net use lpt2 \\server\printername

I've encountered problems when the server and/or printer name have spaces in the name. When we encounter spaces, we rename the server or printername or both. Does anyone know an easier way around this?

Is there any easy utility to capture the server/printer name and create a bat file with the net use in it?

 

 

 

P.S.This thread has been moved from  Switches, Hubs, Modems (Legacy ITRC forum) to  Microsoft > networking-HP Forums Moderator

4 REPLIES
Marcus_20
Frequent Advisor
Solution

Re: Capture printer port to LPT for JetDirect and standard Printers

Try using: net use lpt2 "\\server\printer name"

Roger Faucher
Honored Contributor

Re: Capture printer port to LPT for JetDirect and standard Printers

On a Windows server-based network, you can make the net use... part of the Login Script.

Roger
Make a great day!

Roger
c_28
Occasional Visitor

Re: Capture printer port to LPT for JetDirect and standard Printers

The quotes work but it won't allow /persistent:yes to reconnect at log-on.

I've had some users add it to their script, but our users are very very basic users so sometimes it is more trouble than it is worth.

I was trying to find away to just capture the print info for a bat file.

Thanks, I'll keep plugging away!!
Roger Faucher
Honored Contributor

Re: Capture printer port to LPT for JetDirect and standard Printers

c:

If you're an Admin on the server, you can create the script for them (but, I believe, you'll have to make the WS point to the script).

Here's how it's done in XP:

"To activate a logon script:
Open Network Connections.
Right-click the connection on which you want to run a script, and then click Properties.
On the Security tab, select the Run script check box.
To use an existing script file, click Browse.
Or, to use Switch.inf, click Edit."


Voila!

Roger
Make a great day!

Roger