Doing a wmi query on a few systems on my network returns installState=1 for a given software. However, it doesnt appear in add remove programs or HKLM\software\microsoft\Windows\CurrentVersion\uninstall or even the same key under wow6432node How do I go about removing it?
Asked
Active
Viewed 671 times
0
-
1Was it already uninstalled? Not all software enters a key under uninstall - check the local software folder for an uninstall executable. – spacenomyous Nov 06 '17 at 14:00
-
Wasn't uninstalled. This is what happened- Task sequence failed to install the software due to wrongly created package settings and installer program. Now it shows installState=1. Nothing relevant to it on local filesystem either. – aJ-47 Nov 06 '17 at 21:57
-
Check these 2 reg paths: HKEY_CLASSES_ROOT\Installer\Products\ HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\ – spacenomyous Nov 06 '17 at 22:11
-
nothing in both reg paths, however following cmdlet- get-wmiobject -class win32_product -computername . | select-object -property name,identifyingnumber,installstate | where-object {$_.name -match "xyz app*"} | format-list shows installState=1 in the output – aJ-47 Nov 07 '17 at 22:27
-
Are you sure the program isn't listed in Add Remove Programs? That's the wmi class for it – spacenomyous Nov 07 '17 at 22:30
-
Definitely not listed, checked on 3 systems. This is verified by the fact, installLocaiton and installDate properties are blank – aJ-47 Nov 07 '17 at 22:41
1 Answers
0
Return the object in WMI from Win32_Product and use its Uninstall method:
$app = Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -match "xyz app"}
$app.Uninstall()

spacenomyous
- 1,319
- 7
- 15
-
That seems to work. The application in question doesn't show installstaus=1 anymore – aJ-47 Nov 08 '17 at 05:57