PC Review
Forums
Newsgroups
Windows XP
Windows XP WMI
Re: Disable advanced features on a printer.
Forums
Newsgroups
Windows XP
Windows XP WMI
Re: Disable advanced features on a printer.
![]() |
Re: Disable advanced features on a printer. |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I don't know about turning off 'advanced features' but you can see print
job details fairly easily with WMI (on remote computers too). See this vbscript: const wbemFlagReturnImmediately = &h10 const wbemFlagForwardOnly = &h20 strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMv2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PrintJob", "WQL", _ wbemFlagReturnImmediately + wbemFlagForwardOnly) for each objItem In colItems wscript.echo "Print Job:" & vbTab & objItem.Name wscript.echo "Total Pages:" & vbTab & objItem.TotalPages wscript.echo "PagesPrinted:" & vbTab & objItem.PagesPrinted wscript.echo next Sample output: Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Print Job: AGFA-AccuSet v52.3, 2 Total Pages: 1 PagesPrinted: 0 Print Job: AGFA-AccuSet v52.3, 3 Total Pages: 1 PagesPrinted: 0 See Win32_PrintJob in MSDN (WMI Platform SDK) for all properties of the class. You may be able to change some of the advanced features using Win32_Printer class as well. -- Philip Nunn [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm. "Eric" <Eric@discussions.microsoft.com> wrote in message news:CA7C3AC9-4EB3-41EE-A4B9-6CD5B7B4A4A0@microsoft.com... > My question is how do I turn off the option "Enable advanced printing > features" on the Advanced tab of a printers properties using VBScript? > > The reason I need to do this is I work for a library and the software we > are using to manage print jobs needs to be able to read a PS file to > determine how many pages long a print job is. If advanced features are > enabled the PS file is not usable and of course by default it is set. I > have been using the prnadmin.dll wrapper for VBScript in order to create > my printer but at this point then have to touch each machine to make it > work properly. > > If more information is needed/desired please let me know and I will be > happy to help. > > Thank you, > > Eric |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

