Missing 'Default Printer' Property

  • Thread starter =?iso-8859-1?B?SmFtaek=?=
  • Start date
?

=?iso-8859-1?B?SmFtaek=?=

Hi,

I have a vbScript that works perfectly on around 80 PCs. However on
just two it doesn't and I can't work out why.

Environment:
* Windows Server 2003
* All workstations running Windows XP SP2 (and all centrally updated)
* Roaming Profiles
* Script runs via Group Policy: log-on
* All machines less that 5 years old

Part of the log-on vbScript runs the query: Select * from Win32_Printer
where Default = True

On all PCs except two, this returns the current user's Default Printer.

On the other two it returns an empty recordset (despite the fact that a
Default Printer is set).

I've tried stripping out the Where clause and then iterating through
all installed printers to find the objPrinter.Default property. It
returns a correctly populated printers collection but none have the
default property set.

The WMI service is working.
The scripting engine is working.
There are at least three printers installed on each of these machines.

I've ran out of things to check.

If you could give me some pointers as to what you would check, I'd
appreciate it.

Jaimé
 
Joined
Aug 15, 2006
Messages
1
Reaction score
0
I have same problem!

I have computer (Windows XP). This machine has two network printers. One from them is default.

I tried “wbemtest” and “WMI CIM Studio” utilities to inspect this machine.

Both tools running remotely say nothing about default printer.

  • <LI class=MsoNormal style="mso-list: l0 level1 lfo1">The WQL query “SELECT * FROM Win32_Printer WHERE Default = True” returns empty set.
  • Instances of Win32_Printer are two, but all printers have Default property = False and Attributes = 2072
But locally running utilities show one printer as Default, i.e. correctly.

How it’s possible? Where is problem?

Where I can read about such kind WMI limitations?



Also I have similar problems with invocation of some Win32_Printer methods, such like “SetDefault”, “AddPrinterConnection” and etc.

These methods work for local machine and don’t for remote one.

Need help!!!

Thanks in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top