[wix-users] Burn Condition and Custom BA

Lavoie, Sylvain Sylvain.Lavoie at McKesson.com
Tue Mar 7 13:36:16 PST 2017


Hi there,

I created my own Managed BA and it run fine.

Now I want to block the Installer if .Net 4.6 is not Installed.
I tried to use the Wix NetFxExtension variable, however it look its more for Wix MSI installer

Do I have to do that in my custom BA or what is the problem with the Condition

http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html


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

     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"

     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"

     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" >

   <Bundle Name="!(loc.Product) $(var.ProductVersion)"
          Version="$(var.ProductVersion)"
          Manufacturer="!(loc.Manufacturer)"
          UpgradeCode="my Guid"
          Copyright="!(loc.Copyright)"
          AboutUrl="...!(loc.AboutUrl)"
          SplashScreenSourceFile="Splashscreen.bmp"
          IconSourceFile="Product.ico"
          DisableModify="yes"   >
    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Net4FullVersion" />
    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Net4x64FullVersion" Win64="yes" />

    <bal:Condition Message="!(loc.NetFrameworkMissing)">
         <!-Replaced condition to make it always false -->

      (NOT Net4FullVersion)
    </bal:Condition>

Extract of my LOG

[25C0:2A14][2017-03-07T13:09:01]i100: Detect begin, 14 packages
[25C0:2A14][2017-03-07T13:09:01]i000: EVENT: Bootstrapper_DetectBegin ({"Installed":false,"PackageCount":14,"Result":0})
...

[25C0:2A14][2017-03-07T13:09:01]i000: Setting string variable 'Net4x64FullVersion' to value '4.6.01055'
[25C0:2A14][2017-03-07T13:09:01]i000: Setting string variable 'VC2015Redist_64' to value '14.0.24215'
[25C0:2A14][2017-03-07T13:09:01]i000: Setting string variable 'VC2015Redist' to value '14.0.24215.1'
[25C0:2A14][2017-03-07T13:09:01]i000: Setting string variable 'Net4FullVersion' to value '4.6.01055'
[25C0:2A14][2017-03-07T13:09:01]i000: EVENT: Bootstrapper_DetectPackageBegin ({"PackageId":"Windows81_KB2999226_x64","Result":0})
[25C0:2A14][2017-03-07T13:09:01]i052: Condition 'VC2015Redist_64 OR VC2015Redist' evaluates to true.
[25C0:2A14][2017-03-07T13:09:01]i000: EVENT: Bootstrapper_DetectPackageComplete ({"PackageId":"Windows81_KB2999226_x64","State":4,"Status":0})
[25C0:2A14][2017-03-07T13:09:01]i000: EVENT: Bootstrapper_DetectPackageBegin ({"PackageId":"VC2015Redist_14.0.23026","Result":0})
[25C0:2A14][2017-03-07T13:09:01]i052: Condition 'VC2015Redist_64 OR VC2015Redist' evaluates to true.
[25C0:2A14][2017-03-07T13:09:01]i000: EVENT: Bootstrapper_DetectPackageComplete ({"PackageId":"VC2015Redist_14.0.23026","State":4,"Status":0})
[25C0:2A14][2017-03-07T13:09:01]i000: EVENT: Bootstrapper_DetectPackageBegin ({"PackageId":"DotNetCore.1.0.3_1.1.0_WindowsHosting","Result":0})
[25C0:2A14][2017-03-07T13:09:01]i052: Condition 'NetCore103Version' evaluates to false.
[25C0:2A14][2017-03-07T13:09:01]i000: EVENT: Bootstrapper_DetectPackageComplete ({"PackageId":"DotNetCore.1.0.3_1.1.0_WindowsHosting","State":2,"Status":0})
...

[25C0:2A14][2017-03-07T13:09:23]i500: Shutting down, exit code: 0x0
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: AcceptEula = true
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: InstallDir = C:\MyProduct\MYAPPLICATION\
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: Net4FullVersion = 4.6.01055
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: Net4x64FullVersion = 4.6.01055
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: PreviousInstallFolder = C:\Mckesson\MYAPPLICATION\
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: ServiceAccountPassword = *****
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: ServiceAccountUser = administrator
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: ServiceLogonType = ServiceAccount
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: VC2015Redist = 14.0.24215.1
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: VC2015Redist_64 = 14.0.24215
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: VC2015RedistAdditional_64 = 14.0.24215
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleAction = 5
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleElevated = 1
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleLog = e:\b7\tmp\MyProduct Imaging Repository_1.0.0.1_20170307130900.log
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleManufacturer = McKesson Corporation
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleName = MyProduct Imaging Repository 1.0.0.1
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleOriginalSource = E:\B\wks\VNA\VNA_Main\SI\bin\Release\Installer\MYAPPLICATION.SI.Setup.exe
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleOriginalSourceFolder = E:\B\wks\VNA\VNA_Main\SI\bin\Release\Installer\
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleProviderKey = {8feab165-7dcb-479d-98f1-153210be1edb}
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleSourceProcessFolder = E:\B\wks\VNA\VNA_Main\SI\bin\Release\Installer\
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleSourceProcessPath = E:\B\wks\VNA\VNA_Main\SI\bin\Release\Installer\MYAPPLICATION.SI.Setup.exe
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleTag =
[25C0:2A14][2017-03-07T13:09:23]i410: Variable: WixBundleVersion = 1.0.0.1
[25C0:2A14][2017-03-07T13:09:24]i007: Exit code: 0x0, restarting: No


Found a similar question without answer here: http://widequestion.com/question/can-you-add-an-install-condition-to-wix-burn/


More information about the wix-users mailing list