4

Plenty of questions regarding this issue but none of them explain where exactly those two lines should be placed:

<Property Id="ARPNOREPAIR" Value="yes" Secure="yes" /> 
<Property Id="ARPNOMODIFY" Value="yes" Secure="yes" />

Tried searching online, on the documentation itself but no luck

EDIT

I tried putting them inside my tag but it's still there:

enter image description here

Roger Stewart
  • 1,105
  • 1
  • 15
  • 24
Gianluca Ghettini
  • 11,129
  • 19
  • 93
  • 159

2 Answers2

10

I ran into this same issue today and the accepted answer did not hide the Options button or disable the Repair button in my WiX standard boostrapper.

To hide/disable the Options and Repair buttons in a WixStandardBootstrapperApplication first add the BalExtension namespace (top of your Bundle.wxs):

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">

Then in the BootstrapperApplicationRef element add the SuppressOptionsUI and SuppressRepair attributes setting both to yes.

<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">

    <bal:WixStandardBootstrapperApplication LicenseFile="YourLicense.rtf"
                                            LogoFile="YourLogo.png"
                                            SuppressOptionsUI="yes"
                                            SuppressRepair="yes" />

</BootstrapperApplicationRef>
Roger Stewart
  • 1,105
  • 1
  • 15
  • 24
3

You need to place them within the Product tags in your Product.wxs file.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Fragment>
    <!-- TODO: Put your code here. -->
    <Product>

      <!-- Place them here. -->
      <Property Id="ARPNOREPAIR" Value="yes" Secure="yes" />
      <Property Id="ARPNOModify" Value="yes" Secure="yes" />

    </Product>
  </Fragment>
</Wix>

After you've run your MSI and install your application you should see the following window if you execute your MSI again:

MSI installer

As you can see, the options in Programs and Features will also be disabled.

Control panel Add Remove

Tipx
  • 7,367
  • 4
  • 37
  • 59
  • I have plenty of products.wxs files and one umbrella bundle.wxs – Gianluca Ghettini Jul 18 '17 at 15:29
  • Usually there is one product.wxs file that has the tag which has an Id. Often times this particular Product.wxs also has all your features, directory structures, components and component references declared. – DankMemester 'Andrew Servania' Jul 18 '17 at 15:38
  • ok found it, I set the flags but the button is still showing up. Please check my edit – Gianluca Ghettini Jul 18 '17 at 15:40
  • 1
    Oh. What you're showing me is the bootstrapper installer executable and not the the MSI installer window. I believe that the option for the bootstrapper (which you usually configure in the Bundle.wxs file) does not support (anymore) the removal of the Repair and Uninstall buttons. Please see the following link: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-do-you-turn-off-REPAIR-in-the-boostrapper-in-ARP-or-Programs-and-Features-td7583597.html – DankMemester 'Andrew Servania' Jul 18 '17 at 15:53