Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Monitor  Print  Queue  Times  

 Content of Monitor Print Queue Times.vbs
MD5 Hash: 421C29866CB6B7402F72AD601756D154
' Description: Identifies any print jobs that have been in the print queue for more than 15 minutes.


Const USE_LOCAL_TIME = True

Set DateTime = CreateObject("WbemScripting.SWbemDateTime")

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_PrintJob")

Wscript.Echo "Print Queue, Job ID, TimeSubmitted, Total Pages"

For Each objPrinter in colInstalledPrinters
DateTime.Value = objPrinter.TimeSubmitted
dtmActualTime = DateTime.GetVarDate(USE_LOCAL_TIME)
TimeinQueue = DateDiff("n", actualTime, Now)
If TimeinQueue > 15 Then
strPrinterName = Split(objPrinter.Name,",",-1,1)
Wscript.Echo strPrinterName(0) & ", " _
& objPrinter.JobID & ", " & dtmActualTime & ", " & _
objPrinter.TotalPages
End If
Next

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a