Uninstall the software which is installed in User context


Hi Experts ,

I would like to uninstall application with the help of SCCM power shell script from 5000 machines which is installed in User context , can you please let me know how I can proceed with that ?
Below Command is not showing the application :
Get-WmiObject -Class Win32_Product | Select-Object -Property Name

But the same application is installed on user machine.

Answers ( 11 )


    Hi All ,

    I found the uninstallation string for the application in Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall

    I created a small batch file and then deployed the application.

    Thanks all for your inputs it really helped me.

    This thread can be closed as solved 🙂

    Best answer

    If you are sure that machine contains a reg information for the user hive, you can do a query to remove that application with user hive.

    U need to get the current logged on user in the machine and get the SID of that user, navigate to the reg path where uninstall key present for the user hive with SID.

    May be one more way is that we need to have a actual application that created earlier and use the same application for uninstall and deploy to user based deployment, this need to be test just a thought.



    Do you have other deployment tool in your organisation like systrack?
    You can simply use uninstall string with silent switch is enough to remove the user based application on end user machines but the execution should be happened on current logon user context profile.



    Thanks Karthikeyan for your detailed explanation ,I definitely learned the background behavior of SCCM

    But to complete the task , it will be great if you share any script which will uninstall the software in user context . so that I can try with group policy or schedule task.



    Even if i share the powershell script or any other script to uninstall the application on user based profile. While deploying this script via sccm tool by default again it use system context to uninstall the application on user machines.

    SCCM by default use system context to install or uninstall any application on end user machines.



    Can you please recommend any script to uninstall this kind of software , so i can try to uninstall by using powershell function in SCCM or by using group policy we can remove.



    As mentioned by Harjit. SCCM use system context to query the list of application installed information on client side using hardware inventory method. using HKLM and HKCU(system account) only collected via SCCM hardware inventory report. For user based profile installed applications sccm doesn’t have capable as of now.



    ConfigMgr Hardware Inventory does not detect applications installed in user context.

    ConfigMgr inventory task uses the local system account to inventory software titles. With that said, only software listed within the HKLM or the HKCU for the local system account profile is inventoried and then displayed. When users install software within their user profile, it is stored within HKCU for that user. The local system account doesn’t have access to the other users’ HKCU profiles, so it can’t report on software titles that it cannot access.


    Hi ,

    I am not able to see the app when i run the command : Get-WmiObject Win32Reg_AddRemovePrograms -Filter “DisplayName like ‘$App’” -ComputerName “$Com”.

    Application installation path is like this :
    or C:\Users\admmattima\AppData\Local\Apps\2.0\A76D2MD7.Z11\2Q3KCXAA.915\oper…exe….

    Note : Application is visible in appwiz.cpl .


    It also depends on how the application is developed for installation or installation.
    If the application is simply extracting files in a folder than you may not see more information.
    Nevertheless, I use below function to find application’s uninstall string.

    1. Start PowerShell with elevated priv.
    2. Copy below function and run the script, the function will get loaded in the shell.
    3. Then type following cmdlet: Get-Software -DisplayName “your app name”
    4. The result will show if there is any app registered.
    5. Also try using * as wildcard and go through the list once incase your app is registered with different name.

    ### START ###
    function Get-Software
    $keys = ‘HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*’,
    Get-ItemProperty -Path $keys |
    Where-Object { $_.DisplayName } |
    Select-Object -Property DisplayName, DisplayVersion, UninstallString |
    Where-Object { $_.DisplayName -like $DisplayName } |
    Where-Object { $_.UninstallString -like $UninstallString }
    ### END ###


    Do you know any entries of the app in the following registry – HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

    Also try


    $App = Read-Host “Which Program do you want to find?”
    $Com = Read-Host “What is the name of the remote host?”

    $Search = Get-WmiObject Win32Reg_AddRemovePrograms -Filter “DisplayName like ‘$App'” -ComputerName “$Com”
    If ($Search -ne $null){
    Write-Host $Search.DisplayName
    Write-Host “not found”


Leave an answer

Sorry, you do not have permission to answer to this question .