bootstrapper - Including .NET installer in WiX Bundle not detecting if already installed -


i'm on wix 3.7, , can't simple <packagegroupref id="netfx40web"/> bundle element work, doesn't bring across net fx installer package, or embed in setup.exe. i've resorted creating own package in bundle.wxs file, still having trouble. seems try install .net 4, if machine has .net installed.

i'm not quite sure of difference between installcondition , detectcondition. think installcondition used install package if evaluation true, otherwise uninstall it. how work things typically permanent=yes, such pre-requisites? detectcondition opposite, think, in checks if it's on system, , if so, doesn't install it.

below full bundle.wxs file in visual studio wix bootstrapper project. i'm attempting @ registry , scope out of .net 4.0 registry key there. if present, don't want install .net 4., , if it's not there, install it. but, isn't working, , attempts install .net.

<?xml version="1.0" encoding="utf-8"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi">     <bundle         name="myprogrambootstrapper"         version="1.0.0.0"         manufacturer="microsoft"         upgradecode="{2299b51d-9fd8-4278-90c8-2b79db37f402}">          <bootstrapperapplicationref id="wixstandardbootstrapperapplication.rtflicense" />         <chain>           <packagegroupref id="netfx4full"/>           <msipackage               id="myprograminstaller"               sourcefile="$(var.myprograminstaller.targetpath)"               compressed="no"/>         </chain>     </bundle>      <fragment>         <property id="net40_full_install_32">             <registrysearch                 id ="searchnet40_32bit"                 root="hklm"                 key="software\microsoft\net framework setup\ndp\v4\full"                 name="version"                 type ="raw"/>         </property>         <property             id="net40_full_install_64">              <registrysearch                 id ="searchnet40_64bit"                 root="hklm"                 key="software\microsoft\net framework setup\ndp\v4\full"                 name="version"                 type ="raw"                 win64="yes" />         </property>          <wixvariable             id="wixmbaprereqpackageid"             value="netfx4full" />         <wixvariable             id="wixmbaprereqlicenseurl"             value="netfxlicense.rtf" />         <packagegroup             id="netfx4full">           <exepackage               id="netfx4full"               cache="no"               compressed="no"               permachine="yes"               permanent="yes"               vital="yes"               sourcefile="c:\program files (x86)\microsoft sdks\windows\v7.0a\bootstrapper\packages\dotnetfx40\dotnetfx40_full_x86_x64.exe"               detectcondition="net40_full_install_32 or net40_full_install_64"               downloadurl="http://go.microsoft.com/fwlink/?linkid=164193"/>         </packagegroup>     </fragment> </wix> 

bootstrapper installer log:

[010c:2fb0][2013-05-10t12:07:07]w120: detected partially cached package: netfx4full, invalid payload: netfx4full, reason: 0x80070570 [010c:2fb0][2013-05-10t12:07:07]i052: condition 'netframework40' evaluates false. [010c:2fb0][2013-05-10t12:07:07]w120: detected partially cached package: myinstaller, invalid payload: f4832ba0972bde9b6fa8a19fbb614a7ba, reason: 0x80070570 [010c:2fb0][2013-05-10t12:07:07]i101: detected package: netfx4full, state: absent, cached: partial 

update, solution. used built-in wix registrysearch determine if it's installed. had reference wixutilextension.dll in bundle project. here's updated bundle.wxs:

<?xml version="1.0" encoding="utf-8"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi"     xmlns:netfx="http://schemas.microsoft.com/wix/netfxextension"     xmlns:util="http://schemas.microsoft.com/wix/utilextension" >     <bundle         name="myprogrambootstrapper"         version="1.0.0.0"         manufacturer="microsoft"         upgradecode="{2299b51d-9fd8-4278-90c8-2b79db37f402}">          <bootstrapperapplicationref id="wixstandardbootstrapperapplication.rtflicense" />         <chain>             <packagegroupref id="netfx4full"/>             <!-- todo: define list of chained packages. -->                   <!-- <msipackage sourcefile="path\to\your.msi" /> -->             <msipackage                 id="myprograminstaller"                 sourcefile="$(var.myprograminstaller.targetpath)"                 compressed="no"  />         </chain>     </bundle>      <fragment>         <util:registrysearchref id="netframework40"/>         <packagegroup             id="netfx4full">              <exepackage                 id="netfx4fullexe"                 cache="no"                 compressed="no"                 permachine="yes"                 permanent="yes"                 vital="yes"                 sourcefile="c:\program files (x86)\microsoft sdks\windows\v7.0a\bootstrapper\packages\dotnetfx40\dotnetfx40_full_x86_x64.exe"                 installcommand="/q /norestart /chainingpackage fullx64bootstrapper"                 detectcondition="netframework40"                 downloadurl="http://go.microsoft.com/fwlink/?linkid=164193"/>         </packagegroup>     </fragment> </wix> 

there seem lot of questions here.

it sounds root question how include netfx install embedded in bundle. if so, correct wixnetfxextension doesn't support today. have define own copy , copy close (maybe copied in src\ext\netfxextension\wixlib). thing need change netfx embedded in bundle set exepackage/@compressed attribute 'yes'. or leave compressed attribute off , follow compression of bundle element (which defaults 'yes').

second, detectcondition determine if package on machine. burn logical things based on whether package on machine. example, during install burn install package if package absent nothing if package present. of course, absent , permanent packages ignore requests uninstall.

third, installcondition indicates whether package should ever installed on machine. if evaluates true package can installed (if absent , requested installed). if evaluates false package removed (if present).

note: registry search , conditions little different used in wix toolset detect netfx. following detection netfx wix toolset uses:

<util:registrysearch     id="netframework40"     variable="netframework40"     root="hklm"     key="software\microsoft\net framework setup\ndp\v4\full"     value="install"     result="value" /> 

the detectcondition "netframework40". difference might explain issues seeing.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -