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
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
User contributions licensed under CC BY-SA 3.0