bben92 Posted February 27, 2009 Posted February 27, 2009 Hello, I just want to pause a print queue for my local printer. How can I simply do that ? Thank you very much. Benoit.
Bert Posted February 27, 2009 Posted February 27, 2009 (edited) You would need to stop the print spooler or pause it depending on what your goal is. If you want to clear stuck jobs, clear it by using the first example. If you just really want to pause it, then look at the second example. To restart it, use the third example. The following script would clear all scheduled jobs. It does this by deleting all files from a directory after the spooler has stopped. #include <Process.au3> SplashTextOn("", "Stopping Print Spooler, please wait...", 150, 75) _RunDOS("NET STOP spooler") SplashOff() SplashTextOn("", "Clearing stuck print jobs, please wait...", 150, 75) sleep(2000) FileDelete(@SystemDir & "\spool\PRINTERS\*.*") SplashOff() SplashTextOn("", "Starting Print Spooler, please wait...", 150, 75) _RunDOS("NET START spooler") SplashOff() MsgBox(64, "Done!", "Done", 3)oÝ÷ Ù«¢+Ù}IÕ¹=L ÅÕ½Ðí9PAUMÍÁ½½±ÈÅÕ½Ðì¤oÝ÷ Ù«¢+Ù}IÕ¹=L ÅÕ½Ðí9PMQIPÍÁ½½±ÈÅÕ½Ðì¤ Edited February 27, 2009 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/
exodius Posted February 27, 2009 Posted February 27, 2009 (edited) If you're on XP you might check out: http://technet.microsoft.com/en-us/library/bb490976.aspxXP comes with 6 printer-related .vbs scripts in the C:\Windows\System32 folder that work pretty spiffy, the prnqctl.vbs one in particular looks like it has a -z flag to indicate that you want to pause printing, and a -m flag to resume. Edited February 27, 2009 by exodius
bben92 Posted February 27, 2009 Author Posted February 27, 2009 On the printer control panel, when you right click on the printer you can click on "suspend". That is what I need to do. Thanks for your answer. Benoit. You would need to stop the print spooler or pause it depending on what your goal is. If you want to clear stuck jobs, clear it by using the first example. If you just really want to pause it, then look at the second example. To restart it, use the third example. The following script would clear all scheduled jobs. It does this by deleting all files from a directory after the spooler has stopped. #include <Process.au3> SplashTextOn("", "Stopping Print Spooler, please wait...", 150, 75) _RunDOS("NET STOP spooler") SplashOff() SplashTextOn("", "Clearing stuck print jobs, please wait...", 150, 75) sleep(2000) FileDelete(@SystemDir & "\spool\PRINTERS\*.*") SplashOff() SplashTextOn("", "Starting Print Spooler, please wait...", 150, 75) _RunDOS("NET START spooler") SplashOff() MsgBox(64, "Done!", "Done", 3)oÝ÷ Ù«¢+Ù}IÕ¹=L ÅÕ½Ðí9PAUMÍÁ½½±ÈÅÕ½Ðì¤oÝ÷ Ù«¢+Ù}IÕ¹=L ÅÕ½Ðí9PMQIPÍÁ½½±ÈÅÕ½Ðì¤
Bert Posted February 27, 2009 Posted February 27, 2009 What I told you will do just that. You are simply doing command line to do it. Have you tested what I sent you? The Vollatran project My blog: http://www.vollysinterestingshit.com/
bben92 Posted March 2, 2009 Author Posted March 2, 2009 Exodius, the script prnqctl.vbs is exactly what I need, but it does not work with Windows 2000...Regards. Benoit. If you're on XP you might check out: http://technet.microsoft.com/en-us/library/bb490976.aspxXP comes with 6 printer-related .vbs scripts in the C:\Windows\System32 folder that work pretty spiffy, the prnqctl.vbs one in particular looks like it has a -z flag to indicate that you want to pause printing, and a -m flag to resume.
bben92 Posted March 2, 2009 Author Posted March 2, 2009 Volly,I don't want to stop the Print Spooler, but only pause 1 printer. Thank you very much for your answer.Benoit. What I told you will do just that. You are simply doing command line to do it. Have you tested what I sent you?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now