WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Printing Information

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Print Test Page


Question:

I am trying to automate printing a test page. I would like to use RUNDLL32 PRINTUI.DLL,PrintUIEntry /k however I am not sure of the syntax. The help file and all resources on the web (that I can find) only state the following "/k print test page to specified printer, cannot be combined with command when installing a printer". I have tried typing in the run line "RUNDLL32 PRINTUI.DLL,PrintUIEntry /k "my printer name" but no luck. Any help would be appreciated.

We use IP printing thus my printer port is IP_10.12.13.242. One of my companies larger offices (900 PCs) is moving this coming weekend, where all the desktop PCs will be assigned new printers. I have written a script for the movers to run, where they can select the printers that need to be installed on that PC. Once the printers are installed, I would like for the script to print a test page to ensure all is good.

Answer:

Give this code a try:
params = StrCat("PRINTUI.DLL,PrintUIEntry /p /n ", '"', printerName,'"')
Run ("RUNDLL32.exe", params)
windowName=StrCat (printerName," Properties")
SendKeysTo(windowName,"!t")
SendKeysTo(printerName,"~")
SendKeysTo(windowName,"~")
Display(5,"Information",StrCat ("Test Page has been sent to ",printerName)) 

Article ID:   W16664
File Created: 2005:02:18:12:21:48
Last Updated: 2005:02:18:12:21:48