INSTALLING SUNTYPE ON NETWORK PRINTER... 

This tech note should help you setup a networked printer for the SunType Classified Ad System.

SunType thinks entirely in terms of "DOS" output facilities and terms. You can send to a file, to a com port (serial printer) or to a parallel printer on LPT 1-4.

With network printers, the trick is to make each user or computer, recognize what printers are assigned to what devices. In Novell, that was done by using a "capture" command.

In Windows, it depends upon the version of Windows you're running on the workstation:

In Win98, you simply install the printer as a "network printer" and then capture the desired port to that printer; so lpt2 could be assigned to \\[shareowner]\[printername]. While SunType requires that the port id's be the same across the system, each person's output can be mapped to a different printer -- everybody would have to typeset to "lpt2:", but that could be different printers for different users. The only trick is that you couldn't directly capture a logical port to your own physical port.

Win2K and XP both use the "net use" facility to assign printers. Before starting the program, the user has to run a directive like: "net use lpt2: \\[shareowner]\[printername]". If there are any spaces in the share owner or printer name, that part has to be enclosed in quotes, as in: "net use lpt2: "\\[shareowner]\[printername]"" (omit the outside pair of quotes).

One neat trick about this is that you can actually capture a different port to your own printer by sharing on the network and then "net-using" the share, so you can have a printer attached to your physical lpt1: port, but net-use its share name as lpt2: if you want to.

Unless there are other non-Windows programs involved, the normal approach is to put the printer capture in the batch file used to start SunType. Alternate printers require separate batch files. To put it in a batch file, add two lines for each port that has to be directed (typically a laser printer and a dot-matrix printer). One releases the port from any previous net-uses, and the second resets the desired capture. This prevents any problems with conflicting captures and/or persistent, but unavailable assignments. Here's an example of printer assignments that you might find in one of my batch files:

net use lpt1 /delete ;clears any existing assignment
net use lpt1 \\servername\printername     
net use lpt2 /delete
net use lpt2 "\\servername\printer name"; note that this printer's share name has a space in it, so quotes are required.
 

More details on "net use" can be found in the help system of the affected versions of Windows. You can also find out about it from the command prompt by typing "net use /?". Test your net use statements from the command prompt before putting them in a batch file -- that way, you will know that the syntax is correct ahead of time and you can read any messages from the system.

 

(800) 458-4605

HomeProductsTech NotesContact Us