What you have is not terribly messy, at least when it comes to Windows
Installer.  As an aside, you should use a default level of 1 on your
features and then set a condition to change the level to 0 if necessary.
This will help if you use administrative images to build patches since
the conditions are not evaluated and the default value is always used.

-Brian Simoneau 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Friedrich
Dominicus
Sent: Friday, June 13, 2008 1:00 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Setting properties

"Brian Simoneau" <[EMAIL PROTECTED]> writes:

> Use a custom action to set ANOTHER_PROP to PROP1 with a condition that
> PROP1 exists.  Something like
> <CustomAction Id="SetANOTHER_PROP" Property="ANOTHER_PROP"
> Value="[PROP1]"/>
> <Custom Action="SetANOTHER_PROP">PROP1</Custom>
> You can do the same thing for PROP2 or set PROP2 as the default value
of
> ANOTHER_PROP since it is the else case.

Well I found that out myself, but the Custom action has to be placed
before CostFinalize IIRC.

I tried that and that was find, but (well I should have know better)

I need the following sequence
lookup a value in the Registry 
if that value is set use it's value for an installation
if it's not set check another registry entry 
if that's found use it's value for the location to where I have to
install.


I should have written it much mor clearly.

Word looks for Macros first in the HKCR\Software\Microsoft
Office\Office??\Word\Options hieve 
if there is an entry with value STARTUP-PATH it uses this.
if this path is not set  it looks up HKCR\Softwre\Microsoft
Office\Office??\Options
this time value PROGRAMDIR then it takes this as first part and append
a Startup to it. 

So I like to place my macro in the proper place and I just have come
up with ugliest code..



<Feature Id="feat_Office11_iDir" Title="Office_11" Level="0">
      <ComponentRef Id="cInternetFax.dot_Office11_iDir" />
      <Condition Level="1">OFFICE11_INSTALL_DIR</Condition>
    </Feature>


    <Feature Id="feat_Office11_progDir" Title="Office_11" Level="0">
      <ComponentRef Id="cInternetFax.dot_Office11_progDir" />
      <Condition Level="1">OFFICE11_PROG_DIR and not
OFFICE11_INSTALL_DIR</Condition>
    </Feature>


Which I found a terrible mess, so isn't ther some more elegant way to
achieve what I like?

Can't be that hard, but as usuall the docs leave much more open then
explain....

Regards
Friedrich


------------------------------------------------------------------------
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to