[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Getting windows default printer



Hello all
We have some SQRs that generate .LIS files with a bunch of PCL code in them. We are running these through the process scheduler in PeopleSoft and would like to get the .LIS files to print
automatically. Since you can't seen to use the output type/output destination options in
PeopleSoft to get something to automatically print (at least to an HP printer so it interprets
the PCL correctly, I did manage to use the -printer:WP flag in the process definition to get
something, but it doesn't interpret the PCL), I would like to follow the SQR jobs with
a little SQR that would do a print using the CALL SYSTEM ...

We have different people who will be running the jobs,and they are all set up with different printers. Is there a way to somehow get the user's windows default printer queue name so I could
construct some sort of line such as:

 CALL SYSTEM USING 'cmd.exe /c nprint file.LIS /q=queue_name'

where file would be the file I am printing and queue_name the queue I want to send it to? Or 
is there some better way to do this?

Thanks for the help!



/********************
* Brian Nice
* Senior Programmer/Analyst
* Campus Crusade for Christ
* bnice@ccci.org
*********************************/