G
gokcey
Hi,
My computer's operating system is Windows 2000. I need to cancel al
jobs on
printer. For this reason I have written a script code below:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
"{impersonationLevel=imper
sonate}!\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_PrinterConfiguration")
For Each objPrinter in colInstalledPrinters
If objPrinter.Name = "Xerox DocuPrint N2125" Then
objPrinter.CancelAllJobs()
End If
Wscript.Echo "Name: " & objPrinter.Name
Next
However, When I run this script, I get an error like below:
Microsoft VBScript runtime error: Object doesn't support thi
property
or method: 'objPrinter.CancelAllJobs'
Is this because the operating system is Windows 2000.
What can I do to cancel all jobs in my printer using code?
Thanks in advance
-
gokce
My computer's operating system is Windows 2000. I need to cancel al
jobs on
printer. For this reason I have written a script code below:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
"{impersonationLevel=imper
sonate}!\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_PrinterConfiguration")
For Each objPrinter in colInstalledPrinters
If objPrinter.Name = "Xerox DocuPrint N2125" Then
objPrinter.CancelAllJobs()
End If
Wscript.Echo "Name: " & objPrinter.Name
Next
However, When I run this script, I get an error like below:
Microsoft VBScript runtime error: Object doesn't support thi
property
or method: 'objPrinter.CancelAllJobs'
Is this because the operating system is Windows 2000.
What can I do to cancel all jobs in my printer using code?
Thanks in advance
-
gokce