If you can't uninstall a Windows app, the ARPNOREMOVE property might be the reason. When installing software on Windows devices, common deployment mechanisms such as Configuration Manager can set a custom property to prevent users from deleting the package. Setting the ARPNOREMOVE property results in the RegisterProduct action blocking the program's uninstall string from being written to the Registry.

When a package is deployed using this property, you will see that the actions to uninstall, change, or delete the application are blocked. This applies when you use Programs and Features to try and alter the application.

App cant be uninstalled in Programs and Features

App cant be uninstalled in Programs and Features

It also applies when you go in via the newer Settings app (the Modify and Uninstall buttons are grayed out).

Uninstall is grayed out in the Settings app

Uninstall is grayed out in the Settings app

Even if you pull the installation source path from the device Registry and then run the installer directly, the uninstall and modify options are still unavailable. The only option available to the user is to run the Repair wizard.

Remove and Change are grayed out when running the installer

Remove and Change are grayed out when running the installer

This also applies even if the user is a local or domain administrator. There is no direct way to change or uninstall the software package from the Windows GUI.

Microsoft has published additional details on the ARPNOREMOVE property. Below, I will show you how to uninstall Windows when this property is set.

If you do need to make modifications to an application that has been installed using this property, you will need to use the Windows Management Instrumentation Command-Line (WMIC) utility to do so. WMIC is actually in the process of being deprecated but will still work on Windows operating systems as of the time of writing.

Run a PowerShell or command prompt session as an administrative account on the target device.

If the wmic command is executed, a new command prompt will appear.

The wmic command prompt

The wmic command prompt

Next, enter the command product get name. You will get output similar to that below:

Running product get name in wmic

Running product get name in wmic

In this list, find the product that has been installed using the ARPNOREMOVE property that you are trying to modify or remove. Copy the name of the product, as you will need it for the next command. In this example, the application we are trying to remove is the Ivanti Environment Manager agent.

Copy the name of the app that you want to uninstall

Copy the name of the app that you want to uninstall

Next, run the command (with the product name replaced in the appropriate section), as shown below. To remove the application in GUI mode, use this command:

product where name="productname" call uninstall

If you wish to uninstall the application in silent mode, use this command (note—this will not ask for confirmation, and will reboot if necessary!):

product where name="productname" call uninstall /nointeractive

If you want to repair the application, use this command:

product where name="productname" call reinstall

If you need to change the application, use this command:

product where name="productname" call configure

Other options are also available within the command line – options as shown below:

Options for the product command

Options for the product command

Once you have selected the right command line for what you want to achieve, run it from the WMIC prompt. We are trying to uninstall the application, so we will call the "uninstall" option, as below.

product where name "Invanti Environment Manager Agent 2020.3 HF1" call uninstall

Unless you have specified the /nointeractive switch, you will be asked for confirmation that you wish to proceed. Press Y when prompted.

Confirmation prompt to uninstall the app

Confirmation prompt to uninstall the app

Once complete, the WMIC command will return an exit code, as shown below:

Return code after uninstalling

Return code after uninstalling

If 3010 is the value rather than 0 (which indicates success), it simply means that a reboot is required. The screenshot below shows the portable Windows Error Lookup Tool, which you can download from this link. I find this little tool invaluable for researching Windows error codes and what they mean. You simply run it and enter the numeric code, which will give you the exact error that your code refers to.

Subscribe to 4sysops newsletter!

Confirmation in the Windows Error Lookup Tool

Confirmation in the Windows Error Lookup Tool

If you find yourself needing to manipulate devices with packages installed using ARPNOREMOVE, you can easily remove or modify them using the WMIC commands above.

avatar
1 Comment
  1. Nicholas Kulkarni 6 months ago

    Thanks so much, have been looking for a way to clean up my deployment images for Windows. This is going to be fun. Might try to script it after I have the required information.

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account