Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Networked Printer Problems

Status
Not open for further replies.

gtok

Technical User
Jul 13, 2001
7
0
0
CA
I have a small network setup usinf win98,win200 and now win xp. I have always had networked printers shared on the system using a batch file calling the net use commands
eg
net use lpt5: /DELETE
net use lpt5: \\computername\sharedprinter /PERSITENT:YES
trying this same line on the win xp machine i get no errors and says the command was accepted and when i go to dos and type net use it display the printer was setup correct. I can also on the win xp machine type print /D:lpt5 test.txt and it will print. When i run my dos program on the win xp machine (p.s. which does work on all the other machines) it will not print to the remote computer.if i remap the net use to use lpt3 and run the dos program i works.
Any ideas on how to setup lpt4-8 as remote networked printers for dos.
Thanks In Advance
 
Use COM1 - COM4 as the additional assignments instead of LPT4 - LPT8.

You are redirecting the printer stream, but you will have a problem with using reserved names under XP in legacy DOS situations.

Since these are printer redirections, it does not matter to DOS whether it is printing to a COMx or LPTx port, it is still 16-bit ported I/O as far as it is concerned.

 
Also, sometimes, not always, this assignment will work if you use the Compatability Wizard on the application. It all depends on how the application opens and does the port writes.
 
My problem is my programs being dos based are writing directly to the port LPT1-LPT8 I do not have an option for any COM ports etc. I can go to a txt file but any esc seq are all stripped off so expanded and condensed print is lost and now the form format is lost
 
Let me clarify something. If the program really did ported I/O it would not work under any circumstances in Windows XP. The program is doing a device open and a device write.

You need to fool the NTDETEC results from your XP boot. To do this you need to use regedit:

Click Start, and then click Run.WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.


In the Open box, type regedit, and then click OK.
Locate and click the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports

The current LPT ports are displayed in the right pane.
On the Edit menu, point to New, and then click String Value.
Type a name for the new value. To do this, type LPT#:, where # is the number of the LPT port that you want to add, and then press ENTER. For example, type LPT4:.
On the File menu, click Exit to quit Registry Editor.
Click Start, and then click Run.
In the Open box, type cmd, and then click OK.
Stop and restart the Spooler service. To do so, type the following lines at the command prompt, pressing ENTER after each line:
net stop spooler
net start spooler

Type exit to quit the command prompt.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top