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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOS program on Win2K print report to Terminal Service client printer

Status
Not open for further replies.

Andy888

MIS
Aug 26, 2001
66
US
Dear all,

I developed a very big DOS foxpro(2.6) program. I need to move to Windows 2000 server for Terminal Service clients. I had tested it runs ok under Win2K server when access from a remote terminal service station. But there is a printing problem. When TS remote client want to print reports at remote site's printer. It doesn't print. Have anybody can gudie me to use Microsoft Network redirector or any other software to redirect LPT1 on Win2K server to a TS port in order to print on remote's printer? Or any others solutions. Thanks in advance!

Andy
 
Can anybody help me to resolve my problem? It is very important to me. Thanks.

Andy
 
You need to capture the port before you enter your DOS software. The printer must also be installed in the users profile.

Make your application launch a batch file instead that will capture your printer on the way into the software:

REM Start of Batch File
REM Delete any captured port in case it's still mapped
NET USE /D LPT1:
REM Attach Printer
NET USE LPT1: \\<servername>\<printersharename>
REM Lauch Application
CALL FOXPRO.EXE
REM Delete capture of LPT1
NET USE /D LPT1:
EXIT
REM End of Batch file

Hope this helps.



&quot;In space, nobody can hear you click...&quot;
 
Can you print a test page from a Windows app or is this problem just with DOS printing?
 
Thanks ReddLefty and Mmendes for your reply. Especially to ReddLefty. I followed your hint to use NET USE command remap LPT1 to a Terminal service's share printer name on the win2K server and have tested it successfully. Thanks again.

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top