windows installer - WiX Condition works in MSI but not in Bundle -


when i'm building msi file, , use basic condition, expected happens. example, let's have in setup file:

<property id="myproperty" value="0"/> <condition message="value of myproperty [myproperty], , should 1.">     <![cdata[installed or myproperty = "1"]]> </condition> 

if build , run msi file, works -- is, displays error message , quits.

working condition when running msi

however, if put msi bundle, doesn't work. is, when put bootstrapper ("properties" below name of setup project -- bad name, realize):

    <chain>        <msipackage sourcefile="$(var.properties.targetpath)"/>     </chain> 

and run setup file, error. when installation starts, checks condition, gives me expected message box (same above), , error message:

setup failed

looking @ log, 3 error messages:

error 0x80070643: failed install msi package.  error 0x80070643: failed execute msi package.  error 0x80070643: failed configure per-machine msi package. 

with exit code:

exit code: 0x643, restarting: no 

i'm such noob @ wix i'm not sure how go researching problem -- can't ask intelligent question. hence, i'm reaching out kind folks!

(i'm using wix 3.10 , visual studio 2015)

edit:

thanks getting me! tried suggestions:

in installer file, made property public , made secure. left condition same, and, since don't think should value here opposed in bootstrapper, left value of property out. here code made property/condition:

<property id="my_property" secure="yes"/> <condition message="my_property [my_property].  should 1">     <![cdata[installed or my_property = "1"]]> </condition> 

then, in boostrapper file, added child element of , gave value:

<msipackage sourcefile="$(var.lconderrorinstaller.targetpath)">     <msiproperty name="my_property" value="0"/> </msipackage> 

when ran it, got same behaviour did before, except 1 difference -- when error message. time, pop-up screen message condition , same error message did before (see "setup failed" above), except time happens little later in installation, making me think condition is, in fact, getting triggered in bootstrapper.

as far log files, same (i'm not sure how log files of msi when running burn file, run burn file flag "/l", so: > file.exe /l logfile.log).

for clarity, here parts of log file appear important:

    error 0x80070643: failed install msi package.     error 0x80070643: failed execute msi package.     error 0x80070643: failed configure per-machine msi package.     ...     exit code: 0x643, restarting: no 

i should have been more specific when asked question kind of behaviour i'm looking for...

i have more 1 msi file in burn file. want this: when burn file installs, if there condition in 1 of msi files not met, want msi file not installed, , rest of msis installed. don't care ui.

if there's way this, i'm ears.

if have launch conditions in msi can replicate or move launch conditions bootstrapper bundle stop type of behaviour.

launch condition failure returns fatal error 1603 (0x643 in hex) expect see when msi launched bootstrapper fails due launch condition not met.

you should see in msi's logs

action ended 17:33:38: launchconditions. return value 3. msi (c) (08:4c) [17:33:38:610]: doing action: fatalerror action 17:33:38: fatalerror.  action start 17:33:38: fatalerror. ... msi (c) (08:4c) [17:33:41:188]: mainenginethread returning 1603 


to elaborate, have change msi package definition following run through bootstrapper

<chain>    <msipackage sourcefile="$(var.properties.targetpath)">       <msiproperty name="myproperty" value="1"/>    </msipackage> </chain> 

additionally if want pass in property bootstrapper msi property must public property property name caps.

if want use property somewhere in install phase of msi must mark property secure.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -