You Shall Not Uninstall! ARPNOREMOVE

This is a quick post mostly for reference in the future.

I was today years old when I learned about ‘ARPNOREMOVE‘. I should probably be embarrassed for not knowing, but it is what it is. For the remain 4 people out there that don’t know what it is, here you go.

Additional Information

What is ‘ARPNOREMOVE’

This is a Windows Installer Property that can be set during an installation. Here is an excerpt from the Docs page:

Setting the ARPNOREMOVE property disables the Add or Remove Programs functionality in Control Panel that removes the product. For Windows 2000, this disables the Remove button for the product from the Add or Remove Programs in Control Panel. For earlier operating systems, this has the effect of removing the product from the list of installed products on the Add or Remove Programs in Control Panel.

If the ARPNOREMOVE property is set, the RegisterProduct action writes the value “NoRemove” under the registry key:

HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{product key}

Setting the ARPNOREMOVE property prevents the UninstallString value from being written under this key. The UnistallString value is a command line for removing the product, rather than reconfiguring the product.

The big take aways from this are below. We’ll take a look at these later:

  • Disables the Add or Remove Programs functionality in Control Panel
  • Writes the value “NoRemove” under the registry key
  • Prevents the UninstallString value from being written

Why use it?

What appears to be a common reason for using this property is to prevent users from Removing the install from the machine, but also allow them to see that the software is installed.

We’ll take a look at what using this property does in the UI, but the jest is that the ‘Uninstall’ option is not available to the user.

This doesn’t fully prevent say a ‘Local Admin’ from being able to uninstall the software, but I suppose it helps.

What it looks like

Lets use the ‘PowerShell-7.4.6-win-x64.msi’ installer as an example:

Normal Install

Lets do a normal ‘silent’ install of the MSI using the ‘/qn’ switch

msiexec.exe /i PowerShell-7.4.6-win-x64.msi /qn

This is what you should see in the Registry. Notice the ‘UninstallString’ value.

And in the ‘Programs and Features’ we see both ‘Uninstall’ and ‘Repair’

We also have the ‘Uninstall’ option in the ‘Apps & features’ page of the Settings app.

Install using ‘ARPNOREMOVE=1’

Now lets add the ‘ARPNOREMOVE=1 property

msiexec.exe /i PowerShell-7.4.6-win-x64.msi /qn ARPNOREMOVE=1

And in the Registry, we see a REG_DWORD value ‘NoRemove’ set to ‘1’. And also missing is the ‘UninstallString’ value.

Over in the ‘Programs and Features’, we only have the option to ‘Repair’ now

And in the ‘Apps & features’ page of the Settings app, the ‘Uninstall’ option is greyed out.

Can I still uninstall?

You can still uninstall the MSI from the command line. Use the ‘/x’ switch for uninstall and then either point to the original MSI file or use the ProductCode.

Use ‘/qn’ for a silent unisntall

msiexec.exe /x PowerShell-7.4.6-win-x64.msi /qn
msiexec.exe /x {AA89DEED-9030-494E-9F28-53A4D9B55D12} /qn

Example:

Conclusion

Nothing groundbreaking here, just hope someone finds this information as a useful reference.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top