Remove "Change" and "Repair" buttons in Add or Remove Programs

Viewed 18329

I have created a Wix installer and have packed it in a bootstrap program.

When I execute the bootstrap program it creates the following entries in the registry :

alt text http://n2.nabble.com/file/n4011693/Up.jpg

When I run the bootstrap program it installs well and when I run the Add/Remove programs it shows "Change" button and "Repair" button. My requirement is that

  • I want these two buttons to be one as "Change/Repair" like in other applications
  • When I select this button I want my bootstrap program (setup.exe) to run and not the msi

This is my code area :

<Property Id="EXTUNINSTALL" Value="0"/>
<Property Id="UNINSTALLEXE" Value="msiexec.exe"/>

<!-- The Uninstall shortcut target executable & arguments-->
<CustomAction Id="SetUNINSTALLEXE_EXT" Property="UNINSTALLCMD"
                     Value="[INSTALLEREXEDIR][INSTALLEREXE]"/>
<CustomAction Id="SetUNINSTALLARG_EXT"
              Property="UNINSTALLARG"
              Value="/MAINTENANCE /SILENT="SGWLRPFCE"  
                     /LANG="[ProductLanguage]""/>
<CustomAction Id="SetSYSTEMARPCOMPONENT"
              Property="ARPSYSTEMCOMPONENT"
              Value="1"/>

<CustomAction Id="SetUNINSTALLARG"
              Property="UNINSTALLARG"
              Value="/x [ProductCode]"/>
<CustomAction Id="SetUNINSTALLEXE"
              Property="UNINSTALLCMD"
              Value="[SystemFolder]msiexec.exe"/>

<CustomAction Id="SetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION"
         Value="[MAININSTALLERFOLDER]" />

<InstallExecuteSequence>
  <RemoveExistingProducts Before="InstallInitialize" />
  <Custom Action="SetARPINSTALLLOCATION" After="CostFinalize"/>
  <Custom Action="SetUNINSTALLEXE_EXT"
          After="SetARPINSTALLLOCATION"><![CDATA[EXTUNINSTALL=1]]></Custom>
  <Custom Action="SetUNINSTALLARG_EXT"
          After="SetUNINSTALLEXE_EXT"><![CDATA[EXTUNINSTALL=1]]></Custom>
  <Custom Action="SetSYSTEMARPCOMPONENT"
          After="SetUNINSTALLARG_EXT"><![CDATA[EXTUNINSTALL=1]]></Custom>
  <Custom Action="SetUNINSTALLARG"
          After="SetSYSTEMARPCOMPONENT"><![CDATA[EXTUNINSTALL=0]]></Custom>
  <Custom Action="SetUNINSTALLEXE"
          After="SetUNINSTALLARG"><![CDATA[EXTUNINSTALL=0]]></Custom>
</InstallExecuteSequence>
4 Answers

Suggestion for the first part of the question:

"I want these two buttons to be one as "Change/Repair" like in other applications"

I am running Windows 7 and the only thing close to this option is some applications having 'Uninstall/Change' merged together.

To accomplish ONE button (existing in Wix 3.7) 'Uninstall/Change' instead of 'Uninstall' and 'Change' separately the bundle tag has to be adjusted as below.

<Bundle ...
        DisableModify="button">
Related