How to uninstall a product in system context which was installed as per user (ALLUSERS property set to as NULL)
I need to uninstall a product in system context which was installed as per user previously. I am writing a vbscript to check and uninstall the product if it is installed on the systyem. I am running this script in system context from SCCM. However, it does not detect the product as "Installed" when run in system context. Please advise a workaround on how do I uninstall it in system context. Uninstall succeeds in user context. But in system context, script fails to detect the product.
Answers (4)
If it was a MSI install whether it was a user or system install windows puts a numbered copy of the msi in c:\windows\installer if you can identify the msi in this area you can use the msiexec commands to uninstall and remove it if present.
One thing to look at is the users registry that installed the program under HCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\"softwaresubfolder"
and see what the uninstallstring key is
Comments:
-
This is not correct. Running msiexec against an MSI is the same as running it against the ProductCode. If it's per-user and it's not registered under the user performing the uninstall, it won't see it. Period. - mazessj 9 years ago
The per-user installation of an application means that the application is available only for a particular user. It also means that:
- Shortcuts are installed only to that users' profile.
- Applications appear only under Add/Remove Programs on Control Panel for users that have installed the applications.
- COM registration is written to HKCU\Software\Classes.
- Applications may or may not run at elevated privileges.
- Icons and transforms are stored in %USERPROFILE%\Application Data\Microsoft\Installer\{ProductCode GUID}
This simple trick did it for me: Remove programmes via SCCM that were installed in user context.
msiexec /i "RokDoc 6.0.5.284.msi" REINSTALLMODE=sumo /qn
msiexec /i "RokDoc 6.0.5.284.msi" REMOVE=ALL /qn