tags:

views:

438

answers:

2

Hi,

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

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>

Please help !

Thanx,

tvks

+1  A: 

Here is some registry key examples from NSIS. Should put you in the right direction.

HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2 "NoModify" 1
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2 "NoRepair" 1
leppie
Hi,Thanx your quick reply.I will try this "NoModify" and "NoRepair". Meanwhile this does not finish my core requirement. When I select the Remove button then I want the boot program (setup.exe) to run in the place of msiexec. How can this be achieved ?I am able to see the setup.exe in the folder "C:\Documents and Settings\All Users\Application Data\Installations\{27161ACE-7BDE-44a2-862D-A8158FCB9201}" of the system where installation is done.Regards,tvks
Hi,Tried inserting these two "NoModify" and "NoRepair". No use. There is no change.:(Regards,tvks
+1  A: 

You can set the ARPNOMODIFY and ARPNOREPAIR properties in wix, which will disable the "change" and "repair" options for your product in the "add/remove programs" list. (This is actually equivalent to leppie's answer, but it's a better idea to use the Windows Installer properties rather than hacking at the registry directly.)

Wim Coenen
hi wcoenen,My requirement is not just to disable Modify and Repair in the Add/Remove programs but also to make the Remove button display as Change/Remove. When I click on this button I want my setup.exe to work.Thanx for your response.BR.,tvks