Partilhar via


Uninstall button is disabled in Software Centre in SCCM 2012 R2 for available Applications

In SCCM 2012 R2 RTM,

There is a known issue that if an application contains multiple Deployment Types, after the application gets installed successfully on the client as  available, uninstall button in the software centre is disabled and there is no easy way to perform Uninstallation of the software.

In my example, I have used the application name as "Orca"

Here are couple of approaches:

Approach 1:

Launch wbemtest

Connect to root\ccm\clientsdk namespace

Query CCM_Application to get the application (Orca) installed on the client  and click show mof and store the information with you.

 Now go back to wbemtest

Click ExecuteMethod

Select CCM_Application as class

Choose the method “uninstall” from the drop down

Click Edit Parameters

Enter Id, IsMachineTarget, Revision etc fields from the mof saved and keep rest of the fields as default (I believe null).

Click Execute

 Now uninstall action gets trigged on the application.

 

Approach 2:

I have got the below code from https://social.technet.microsoft.com/Forums/en-US/e41a516f-210a-4124-8ceb-c70972d20168/ccmapplication-0-instances-found-via-powershell?forum=configmanagersdk

Run this powershell script.

$ComputerName = $env:COMPUTERNAME
$ApplicationName = "Orca"
$ApplicationClass = [WmiClass]"\\$($ComputerName)\root\ccm\clientSDK:CCM_Application"
$Application = Get-WmiObject -Namespace "root\ccm\clientSDK" -Class CCM_Application | Where-Object { $_.Name -like "*$($ApplicationName)*" }
$ApplicationID = $Application.Id
$ApplicationRevision = $Application.Revision
$Properties = $ApplicationClass.psbase.GetMethodParameters("Uninstall")
$Properties.EnforcePreference = 0
$Properties.Id = $ApplicationID
$Properties.IsMachineTarget = $false
$Properties.IsRebootIfNeeded = $false
$Properties.Priority = "High"
$Properties.Revision = $ApplicationRevision
$ApplicationClass.psbase.InvokeMethod("Uninstall",$Properties,$null)

Approach 3:

Install SCCM 2012 R2 CU1 from https://support.microsoft.com/kb/2938441

Comments

  • Anonymous
    January 30, 2014
    Sreekar, Could this process or a similar one be used to install Applications on a Device which doesn't have an entry in the CCM_Application class, and without using Software Centre? Thanks Lloyd

  • Anonymous
    April 21, 2014
    Lloyd, Nope, it is not used for your scenario

  • Anonymous
    June 03, 2014
    Hello, Do you know if this is going to be fixed ?

  • Anonymous
    June 16, 2014
    This issue is fixed in SCCM 2012 R2 CU1 support.microsoft.com/.../2938441

  • Anonymous
    January 23, 2015
    I am up to CU3 for R2 and the issue is still ongoing for me. I need the uninstall button to work for my users without having to resort to workarounds and temporary fixes. Has or will Microsoft address this issue?

  • Anonymous
    August 03, 2015
    $Properties.IsMachineTarget = $false $Properties.IsRebootIfNeeded = $false Has to be changed to $Properties.IsMachineTarget = "False" $Properties.IsRebootIfNeeded = "False" Otherwise I got an exception.