I ran a VBScript that queries the Win32_Product WMI class on Windows 2003 but it returned error 0x80041010 instead of the expected results.

I looked up that errorcode and it means WBEM_E_INVALID_CLASS. This happened because the “WMI Windows Installer Provider” was not installed.

You can do this through Add/Remove Programs | Windows Components | Management and Monitoring Tools | WMI Windows Installer Provider.

Or if you want to do this with a script you can use SysocMgr: