.bat file to autorun printer test page

Sumotku

Member
Jul 31, 2004
167
0
0
I would like a test page to be printed automatically every 5 days or so to keep mom's inkjet printer head from clogging and wasting countless dollars. I'm afraid a simple reminder will continue to go unheeded so it's best if it autoruns. Seems to me if someone could write a scheduled batch file that would do the trick, but I'm welcome to other ideas that require no user interaction. I imagine this could useful to lots of us.
 

TomGriffinII

Junior Member
Aug 14, 2009
9
0
0
Make a text file in notepad; play with some fonts and what not then inside task scheduler issue the following "cmd.exe /s: copy whatever.txt >prn:"

In essence what this does is start a command prompt and copy the text file to the default printer and exits when complete.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
RUNDLL32 PRINTUI.DLL,PrintUIEntry /n"My Printer" /k

Replace "My Printer" with your printer's name.
 

Sumotku

Member
Jul 31, 2004
167
0
0
Thanks so much for the help. It seems there are lots of ways to solve this. Mr Chad's code takes care of -what- to print as well, very nice. Much obliged.