Windows Vista Forums

vbscript to cahnge default printer setting from color to b&w
  1. #1


    freddy Guest

    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

  2. #2


    Umesh Thakur Guest

    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

    > 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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting a default printer for the DEFAULT USER CNBarnes Vista print fax & scan 1 15 May 2009
Vista machine not holding default printer setting. windstar2 Vista print fax & scan 1 11 Jul 2008
Problem setting default printer in Vista DH NYC Vista General 2 05 May 2008
Setting default printer witt Vista installation & setup 1 21 Jan 2008
Setting Default Printer to Stay LMI Vista hardware & devices 0 08 Jan 2008