Send a test print to the default printer

Post your handy scripts here, or any requests for help in creating a script.
Forum rules
1. Try to give more than you take, when possible.
2. Always wrap code in
Code: Select all
 tags
so it doesn't wrap the lines, and for the one-click select all feature.

Send a test print to the default printer

Postby giaf » Fri Jan 31, 2014 10:35 am

When I finish working on a computer I would like to automatically print a wordpad doc from my flash drive or a test page from my website to check and prove that the printer was working when I finished cleaning the computer. Most of my work is done onsite instead of in the shop. One of the last things that we do is to run Custom Installers and run a few options there so that would be a great place for the batch file to be run from. I have done a little looking but do not know how to get a script to find the file within my usb drive which is usually not the same drive letter. Printing from a doc on my flash drive would be preferred. Any ideas?
giaf
 
Posts: 9
Joined: Wed Oct 09, 2013 7:39 pm

Re: Send a test print to the default printer

Postby Xander » Fri Jan 31, 2014 3:01 pm

I went looking to see if I could find any cmd line options but could only find ones that will work with a named printer, not the default. Not a bad idea. +1
User avatar
Xander
 
Posts: 660
Joined: Fri Feb 08, 2013 6:08 pm
Location: Near Niagara Falls

Re: Send a test print to the default printer

Postby Nick » Tue Mar 11, 2014 12:35 pm

what type of doc, .doc?

if it's .txt you can use I think notepad.exe /p "drive\path\filename.ext"

same may work for wordpad and .rtf unsure.

if you mean .doc and you expect the system to have either word or word viewer, I'm sure there's a way to do it with them as well.
Author of d7x and other PC technician's tools. http://www.d7xTech.com

Image
User avatar
Nick
Site Admin
 
Posts: 2792
Joined: Mon Nov 19, 2012 7:54 pm

Re: Send a test print to the default printer

Postby Xander » Tue Mar 11, 2014 5:39 pm

Well, the right-click menu of a Doc has a Print option.... what about making use of that for a simple Demo.doc that we could drop into our Config folder?

If running that remotely, would there be any way of error-checking the print job other than it /just/ clearing the queue? (Since we can't /see/ the printed materials remotely :) )
User avatar
Xander
 
Posts: 660
Joined: Fri Feb 08, 2013 6:08 pm
Location: Near Niagara Falls


Return to Automation / Scripting / Batch Files