![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | automate some printing i need to automate some printing... basically i need the script to check for files in a directory (generally they'll all be PDF). for each file it finds, it needs to print it, then move it into a different directory. it'd be nice if it could confirm a successful print it'd also be nice if there's a way to obtain the printer status prior to printing (i.e. out of paper, low on toner, etc). i know how to write the foreach file stuff, but how do i call the file, open it, and tell it to print, then check for successful print... thanks!! |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: automate some printing Ben Christian wrote:
typically query the status of a printer using WMI (get-wmiobject). In addition, you may be able to get the printer status: http://msdn2.microsoft.com/en-us/lib...63(VS.85).aspx. There's a very useful PrinterState property, but it looks like it is deprecated. As for how to open the file and print, what do you have? Do you have an Office plugin for dealing with PDF docs? You could use Adobe Reader, but you'd have to go with keystroke automation as I'm not aware of any scripting API for Adobe's PDF reader. As for checking for a successful print, assuming you end up using Word 2007 to print the document, I'm not sure if the print() method will return an appropriate code, or you may have to go to the print server or printer to find out how you might be able to get the info. With a print server, you may need to check if there's sufficient auditing to get that info. Marco -- Microsoft MVP - Windows PowerShell http://www.microsoft.com/mvp PowerGadgets MVP http://www.powergadgets.com/mvp Blog: http://marcoshaw.blogspot.com | ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) | ||||||||||||||||||||||||
| Guest | Re: automate some printing It looks like it will need to be keyboard automation then. i've never done keyboard automation in powershell before...do you have any good resources i could reference? To answer your questions - it would use a print server, and Adobe Reader. Thanks! "Marco Shaw [MVP]" wrote:
| ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to automate ftp using powershell? | Jeffery Jensen | PowerShell | 4 | 03-10-2008 08:15 AM |
| How to automate .msu installation ? | Goldrake | Vista General | 1 | 12-14-2007 07:58 PM |
| automate iis client cert mapping | erick | PowerShell | 2 | 02-19-2007 09:33 PM |
| ANN: FinalBuilder action to automate PowerShell | Peter Thornqvist | PowerShell | 0 | 11-08-2006 06:02 PM |
| Using PowerShell to automate FTP transfers | =?Utf-8?B?RGF2aWRUTQ==?= | PowerShell | 16 | 09-28-2006 01:11 PM |