How to disable Repair and option buttons on WiX toolset
Asked Answered
T

2

5

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

Trinidad answered 18/7, 2017 at 14:20 Comment(0)
D
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

Dagda answered 18/7, 2017 at 15:11 Comment(4)
I have plenty of products.wxs files and one umbrella bundle.wxsTrinidad
Usually there is one product.wxs file that has the <Product> tag which has an Id. Often times this particular Product.wxs also has all your features, directory structures, components and component references declared.Habitancy
ok found it, I set the flags but the button is still showing up. Please check my editTrinidad
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: windows-installer-xml-wix-toolset.687559.n2.nabble.com/…Habitancy
F
11

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>
Fancied answered 9/1, 2018 at 18:55 Comment(0)
D
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

Dagda answered 18/7, 2017 at 15:11 Comment(4)
I have plenty of products.wxs files and one umbrella bundle.wxsTrinidad
Usually there is one product.wxs file that has the <Product> tag which has an Id. Often times this particular Product.wxs also has all your features, directory structures, components and component references declared.Habitancy
ok found it, I set the flags but the button is still showing up. Please check my editTrinidad
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: windows-installer-xml-wix-toolset.687559.n2.nabble.com/…Habitancy

© 2022 - 2024 — McMap. All rights reserved.