Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - vbscript to cahnge default printer setting from color to b&w

Reply
 
Old 04-09-2009   #1 (permalink)
freddy


 
 

vbscript to cahnge default printer setting from color to b&w

I am using this script:
strComputer = "."

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

Set colInstalledPrinters = objWMIService.ExecQuery _
("SELECT * FROM Win32_PrinterConfiguration")

For Each objPrinter in colInstalledPrinters
objPrinter.color = 1
Next

But I do not see a change. Can you help me


My System SpecsSystem Spec
Old 04-13-2009   #2 (permalink)
Umesh Thakur


 
 

Re: vbscript to cahnge default printer setting from color to b&w

Color property is read-only property and you can't assign a value to it. it
indicates whether your printer supports color printing.

refer to the page for details of Win32_PrinterConfiguration class:
http://msdn.microsoft.com/en-us/libr...64(VS.85).aspx

I too don't know how to change the color settings, however, just wanted to
tell you about color property.

uc

"freddy" <freddy@xxxxxx> wrote in message
news:C95F99BE-16AB-4819-AC68-BD9398D9DA9D@xxxxxx
Quote:

> I am using this script:
> strComputer = "."
>
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
>
> Set colInstalledPrinters = objWMIService.ExecQuery _
> ("SELECT * FROM Win32_PrinterConfiguration")
>
> For Each objPrinter in colInstalledPrinters
> objPrinter.color = 1
> Next
>
> But I do not see a change. Can you help me
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Setting a default printer for the DEFAULT USER Vista print fax & scan
Vista machine not holding default printer setting. Vista print fax & scan
Problem setting default printer in Vista Vista General
Setting default printer Vista installation & setup
Setting Default Printer to Stay Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46