Vbsedit includes all these samples. Try it now!


' Monitor Print Queue Times


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

search for scripts


VbsEdit includes all these samples!


VbsEdit now supports .vbs, .js, .wsf and .hta scripts.
The evaluation version never expires.




Home   Scripts

Copyright © 2001-2019 adersοft