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.

Answer Summary:
0 Comments   [ + ] Show Comments


Please log in to comment


This content is currently hidden from public view.
Reason: Removed by member request
For more information, visit our FAQ's.


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

Answered 07/12/2012 by: SMal.tmcc
Red Belt

  • 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.
Please log in to comment

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}
Answered 07/12/2012 by: jagadeish
Red Belt

  • http://www.itninja.com/question/uninstall-per-user-package-from-another-account
  • Only if the developer built the installer correctly. A package could install per-user but contain some or all machine-level installation items.
Please log in to comment

Can you try creating the same MSI with ALLUSERS=1 and recache it with REINSTALLMODE=vamus

Also make this as an upgrade msi and see what happens. You might have to put an active setup to delete the user based entries through a script.

This is something you can give a shot at.

Answered 07/13/2012 by: piyushnasa
Red Belt

Please log in to comment
This content is currently hidden from public view.
Reason: Removed by user request
For more information, visit our FAQ's.


This simple trick did it for me: Remove programmes via SCCM that were installed in user context.

msiexec /i "RokDoc" REINSTALLMODE=sumo /qn

msiexec /i "RokDoc" REMOVE=ALL /qn

Answered 01/27/2014 by: SorenHJ
White Belt

  • Looks a good strategy, but when you don't have the MSI file?
    I only have his "registry key", some like {7204BDEE-1A48-4D95-A964-44A9250B439E}
  • No good. This just installs it under a second user. It's still registered under the first.
Please log in to comment
Answer this question or Comment on this question for clarity