Hi, There are several ways to resolve this problem. The best way is, of course, to use Novlib which allow redirection of LPTn to any printer queue.
If you are using Blinker as your linker you can also use the SWPRUNCMD() function. I have used this in a few cases where an NT server is being used.
All you need to do is send the DOS command to the function - example:
SWPRUNCMD("NET USE LPT1 \\server\printqueue",0,"",""
If you have the Server Name and Print Queue in a variable ( cPrQ) then you would use:
SWPRUNCMD("NET USE LPT1 "+cPrQ,0,"",""
I would also recommend adding '> NUL' to the end of the command so that you don't get that "The command has etc...." popping up on the bottom line.
Thus:
SWPRUNCMD("NET USE LPT1 "+cPrQ+" > NUL",0,"",""
This will work every time.