Solved

Dos printing on Terminal Server 2008 32Bit

Posted on 2012-04-05
6
2,017 Views
Last Modified: 2012-04-10
I have windows server 2008 R1 32 bit installed in a virual machine with the terminal services role installed.  My goal is to get our old 16 bit dos program to run in TS.

What isn't working is the "not regular" printing, and by that I mean our 16 bit dos program which prints directly to an LPT port is not noticing the mapped lpt port.  I have a batch file  which maps two network drives needed to run the dos program, maps lpt1 to a network printer, and then starts the dos program.  All of those mappings complete successfully and the program runs fine.

However anytime I print from our program, it complains 'printer not ready', which is an error we see around here when the lpt1 port is not mapped correctly.

If i do a c:\dir > LPT1 it prints without a problem
 
Is there anything I can do to make this program be able to print using terminal services that any of you know of?
Thanks.
0
Comment
Question by:ACOM
  • 3
  • 2
6 Comments
 
LVL 87

Expert Comment

by:rindi
ID: 37810221
I've been able to get DOS programs to print to LPT ports (whether Physical or mapped) using the Megabuild version of DOSBox. Just start your DOS application from within the DOS Box app. There are config files which you can adapt to your needs and plenty of help files:

http://home.arcor.de/h-a-l-9000/

Below is also the link to the official "DOSBox" site, but with that one I wasn't able to get printing working, but it's forums and tutorial can still help getting it setup:

http://www.dosbox.com/
0
 

Author Comment

by:ACOM
ID: 37810801
Thx for your answer.

But there is an extra catch:

Depending on where the users log in, they need to get different lpt mappings, depending on location. This needs to be an automatic process. Right now when the user logs in on the terminal server, a script checks on which pc this is and maps the lpt1 - 3 accordingly.

I think working with dosbox will get things far more complicated to do this...  

Strange thing is, it does work without any problem on windows7 32 bit, the problem is only in  TS2008.
0
 
LVL 87

Expert Comment

by:rindi
ID: 37811794
I used DOSBox on a customer's PC's because his issue was that the Clipper based DOS tool he is using will crash on new PC's because those PC's are just too fast. As DOSbox is like a PC emulation you can tell it at what speed it should run, so it emulates an old IBM XT PC or similar (they ran at something like 8MHz or less if I remember correctly). So with DOSbox the tool ran without issue. As I also needed to get it to print I used the Megabuild version and started it using a batch file where the LPT ports are being mapped to the Printer. I think you could probably either use your script to start the correct batch file based on the location, or probably even directly start it using your script. Below is an example:

@echo off
net use lpt2 /delete
net use lpt3 /delete
net use lpt2 \\IPAdress\PrinterName
rem net use lpt3 \\IPAdress\PrinterName
"C:\Program Files (x86)\DOSBox_MB6\dosbox.exe" -noconsole -conf D:\Users\Public\Documents\DOS\Clipper\clipper.conf 
exit

Open in new window

0
Want to promote your upcoming event?

Is your company attending an event or exhibiting at a trade show soon? Are you speaking at a conference? Spread the word by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

 
LVL 14

Expert Comment

by:Don Thomson
ID: 37811923
You mentioned that you can print to the mapped printer using for instance  dir c:\  > lpt1  it works
If that works then using something like copy mytextfile.txt ltp1  should work as well

If you can get your Dos program to print to a file - then copy the file to the appropriate printer -
You would have to put the saved file in a specific folder - and run a looped batch file to copy them to the printer and then either rename and file them or delete the file itself. If you put a loop that checked say - every 5-10 sec  you shouldn't have any over writes.

Something to look at
0
 

Accepted Solution

by:
ACOM earned 0 total points
ID: 37812029
We found a Solution.

There is a little free program called DOSprint:
http://www.andtechnologies.com/index.php?q=downloads/free-software

When you install and lauch it, it creates a tray icon. If you configure it you can choose which lpt1 - 9 port you want to map with the available printers.

A colleague of me created a VBScript that checks on the local computername and edits the register keys and thus the mappings of DOSprint depending on that name.

I attached the script.

Thx everyone for the help!
Printscript.vbs
0
 

Author Closing Comment

by:ACOM
ID: 37826759
We did try a lot of solutions and tools, but this is the best way so far.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

We recently had an issue where out of nowhere, end users started indicating that their logins to our terminal server were just showing a "blank screen." After checking the usual suspects -- profiles, shell=explorer.exe in the registry, userinit.exe,…
If you migrate a Terminal Server licenses server inside the 2008 server family, you can takte advantage of the build-in migration tool. If you like to migrate an older 2003 Server (and the installed client CALs) to a 2008 R2 server for example, you …
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now