1

I started using a standard uninstall script, and it wasn't working, so I decided to see if it was even finding any progams at all, and it seems it isn't. It works on Windows 7 but not on the other the Windows 2003 server I need to use it on. I'm logged in as local Admnistrator,

The script below created the error:

Line: 4
Char: 1
Error: 0x80041010
Code: 80041010
Source: (null)

Code:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery ("Select * from Win32_Product")
For Each objSoftware in colSoftware
    MsgBox("hi")
Next

1 Answer 1

1

The error code you see is "Invalid Class". Server 2003 does not include the MSI Provider for WMI by default.

From Operating System Availability of WMI Components:

Windows Server 2003: The Windows Installer provider—also known as the MSI provider—is included on the CD as an optional Windows component that you can install using Control Panel. Optional installation of the Windows Installer provider ensures backward compatibility with the Windows XP and Windows 2000 feature sets.

You'll need to install from

  • "Add Remove Windows Components"
    • "Management and Monitoring Tools"
      • "WMI Windows Installer Provider"

enter image description here

1
  • Ok, I don't have the disk to install the component at the moment but that looks right. Thanks.
    – David
    Jul 10, 2012 at 18:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .