1

I'm building a windows installer for a QT windows application using the QT installer framework. I would like to disable the "Modify" button associated to my application in Windows Apps & Features (application uninstallation).

As far as I understand, the "Modify" button enable/disable status is controlled by the windows registry key "NoModify", located at:

"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall{GUID}"

The keys and values in this directory are created by the installer.

I've played around with component.addElevatedOperation "GlobalConfig" or component.addOperation "Settings" in my installscript.qs to try to modify the registry but with no success.

Any suggestions?

Thanks in advance

2 Answers 2

0

From my testing with Windows Installer I found that to enable the 'Modify' button in Windows Apps and Features the 'ModifyPath' expandable string needs to be populated in the applications uninstall key in the registry.

ModifyPath | Determined and set by the Windows Installer.

Uninstall Registry Key - MSDN

When using Windows Installer properties to prevent the 'remove' and 'repair' options from Add Remove Programs, the expandable string ModifyPath is not created and thus the modify option from Apps and Features is not available.

A typical value for the ModifyPath expandable string would be:

MsiExec.exe /I{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}

Where {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} is the product code. However I have also seen in my testing that if the expandable string exists and has a value the modify option is available in Apps and Features

Sign up to request clarification or add additional context in comments.

Comments

0

To disable "Modify" option in your application from Windows Apps & Features, uninstaller menu, you can do one of this:

  1. Add a new <SupportsModify>false</SupportsModify> value in config.xml file:
<?xml version="1.0"?>
<Installer>
    <Name>Some Application</Name>
    <Version>1.0.0</Version>
    <Title>Some Application Setup</Title>
    <Publisher>Your Company</Publisher>
    ...
    <SupportsModify>false</SupportsModify>
    ...
</Installer>
  1. Or set value "SupportsModify" to false by calling installer.setValue(...args) method:
function Controller()
{
  if (installer.isInstaller())
  {
    // Disable button "Modify" on windows Apps & feature uninstalls entry
    installer.setValue("SupportsModify", false);
  }
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.