I have a VBS function that uses WMI:

Function GetDefaultPrinter
  Set oWMIService = GetObject("winmgmts:\\.\root\cimv2")
  Set colItems = oWMIService.ExecQuery("Select * from Win32_Printer")
  For Each oItem in colItems
    if oItem.default then
      sDefault = oItem.Name
      Exit For
    End If
  Next
  GetDefaultPrinter = sDefault
End Function

René de Haas wrote:
> This I found also, do you also have something to get the default printer?
> 
> I looked on google and found a script that looked at the registry, but that 
> didn't work.
> Looked like the registry didn't store it there.

-- 

Phil Brutsche
[EMAIL PROTECTED]

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to