Link to home
Start Free TrialLog in
Avatar of ecshelpdesk
ecshelpdesk

asked on

How to print form a DOS application to a network printer

I have a DOS application on a Windows 2000 Server, that is being accessed by serval people on workstations. I need to setup a way that users can print reports from this application to a network printer.
Currently only users that have a printer connected locally to port LPT1 can print. How can I redirect DOS print jobs to the network printer. And can I automate this.

Avatar of weareit
weareit
Flag of United States of America image

NET USE LPT1 \\servername\sharename

You will have to give the clients administrative rights on the local computers as group policy prohibits redirecting LPT1.

-saige-
I think one of the following should do the trick for you:

Log on as an administrator, and then use the command: net use lptx \\pserver\sharename /persistent:yes

Use the devcon disable *PNP0401 command to disable the LPT port mapping to the local parallel port when the computer starts. The devcon disable *PNP0401 command is for LPT1. To find the hardware ID for other LPT ports, use the devcon findall * command. The devcon command must run when the computer starts. For a computer in a domain, you can set up Group Policy to run devcon as a computer startup script. To set Group Policy, open the appropriate group policy, open Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)\Startup, and then add the command.
      An excellent article about how to use the "devcon" utility as well as downloading instructions can be found at: http://support.microsoft.com/kb/311272/ 

If your program can print to the LPT2 port or the LPT3 port, use the net use command to map the network printer to the LPT2 port or the LPT3 port. Most computers do not have physical LPT2 or LPT3 ports, so a non-administrator can map an LPT2 port or an LPT3 port to a network printer.

As for your question about automating the process, could you not: Open "Active Directory User and Computers" and right-click the Organisational Unit in question. Go to "Properties", then select the "Group Policy" tab. Put your script there?

All the best.
ASKER CERTIFIED SOLUTION
Avatar of Corvoir
Corvoir

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