Question

I have a wix bootstrapper that is checking if .net framework 4.0 is installed and if it isn't it should install it. This works. but now i want to uninstall the program but it wants to uninstall the framework asswell. This should not be happening and i looked all over google but i couldn't find a solution. Iam still looking for an awnser on the net but a tip would be helpfull

I tried to just uninstall the app with add/remove program in windows but when i run the boodstrapper it wants to uninstall or wants to repair the installation. this is my code:

    <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
     xmlns:fx="http://schemas.microsoft.com/wix/NetFxExtension">
<Bundle Name="MyCompanyapp" Version="1.0.0.0" Manufacturer="MyCompany" 
    UpgradeCode="99e2007c-0d40-4b58-958a-218a93c08270" DisableRemove="yes" DisableModify="yes">

    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"/>
    <Variable Name="InstallFolder" Type="string" Value="[ProgramFilesFolder]\company\app" />
    <util:RegistrySearch Id="FindDotNet40InstallRegValue" Root="HKLM"
                         Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" Value="Install"
                         Variable="DotNetFramework40InstallRegValue" />

    <Chain >

     <PackageGroupRef Id="NetFx40Web" />
     <ExePackage Name="dotNetFx40_Client_x86_x64.exe" SourceFile=".\sources\dotNetFx40_full_x86_x64.exe" DownloadUrl="http://download.microsoft.com/download/5/6/2/562A10F9-C9F4-4313-A044-9C94E0A8FAC8/dotNetFx40_Client_x86_x64.exe" 
                  Vital="yes"  DetectCondition="DotNetFramework40InstallRegValue=1" InstallCommand="/passive/promptrestart">
        <!--<RemotePayload Size="42991616" Description="net 4.0 installer"  ProductName="net 4.0 installer" Version="4.0.0.0" Hash="6ce3a433309c63d98bcf0e2b9f1dfaed8cc18783"/>-->
      </ExePackage>
      <RollbackBoundary/>

      <MsiPackage Id="setup" Compressed="yes" Vital="yes" 
        SourceFile="C:\installer.msi" 
                  Cache="yes" Visible="yes" After="dotNetFx40_Client_x86_x64.exe" >
        <MsiProperty Name="INSTALLLOCATION" Value="[InstallFolder]" />
      </MsiPackage>   
    </Chain> 
 </Bundle>
</Wix>

thanks in advance

Was it helpful?

Solution

You need to add a Permanent attribute to ExePackage and set it to 'yes'.

This means it won't be uninstalled.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top