What Windows database or data source does Win32_Product pull its information from, if not the registry? For example,
if(Get-WmiObject -Class Win32_Product -Filter "Name like '%PRODUCT%'") { echo Write-Host "PRODUCT IS Installed" exit 0; }
returns lots of information about the installed product (even though that method has other issues https://stackoverflow.com/questions/25268491/alternative-to-win32-product)
Now I'm curious, but I haven't been able to find much detail on where wmi is actually pulling this information from.
Background:
After getting into a minor mess with a corrupted uninstaller for a backup client that conflicts with another backup client I need to install, I ended up trying to uninstall the client manually, which included:
- moving/removing the c:\Program Files\ files for the client (backed up)
- digging through the registry and removing entries such as: {HKCU|HKLM}\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall (Add/Remove programs)
- deregistering the client services using "sc delete "
- Removing the C:\Windows\Installer\{GUID} folder (backed up)
A query to Win32_Product shows the software as still being installed, of course Add/Remove programs doesn't (since I removed the registry entries).
I can go into more detail about what I tried before going the manual route if needed.