Steps 1 and 3 both happen during the AppSearch action.  There's no way
to break them apart and do MyAssign in the middle.  You could do step 3
in a custom action after MyAssign.

-Brian Simoneau

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Natxo
Mateos
Sent: Wednesday, June 11, 2008 6:19 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] using one property to set another

Hi,

I'm trying to use one property (that I obtain from the HKCU Registry) to

set another property that later I'll use to make anothe RegistrySearch 
(in the HKLM). But I've not been able to work propertly

That's exactly what I'm doing :

1. Set the first property, via searching the registry :

*<Property Id="SOFT_CURVER">
    <RegistrySearch Id="MySoft_Curver" Root="HKCU" Key="Software\My 
Software" Name="CurVer" Type="raw" />
</Property>*

2. Define a CA that uses the previous property to build another one :

*<CustomAction Id="MyAssign" Property='SOFT_REGISTRY' Value="Software\My

Software\[SOFT_CURVER]" />*

3. Use that new property to find in the registry the location where I 
want to install the package:

*<Property Id="SOFT_LOCATION">
    <RegistrySearch Id="MySoft_Location" Root="HKLM" 
Key="[SOFT_REGISTRY]" Name="Location" Type="raw" />
</Property>*

4. I use the SOFT_LOCATION property to set the directory to install, 
overriding

*<Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="ProgramFilesFolder" Name="PFiles">
        <Directory Id="LOCATION" Name=".">
            <Directory Id='INSTALLLOCATION' Name='MySoft10' 
LongName='MySoft 1.0'>
                <Component ...
                ....*


5. I also sequence the CA to execute after initializing and just in case

that SOFT_LOCATION is defined. I'm not using any dialog, so I just use 
the InstallExecuteSequence tag :

*<InstallExecuteSequence>
    <Custom Action="MyAssign"
After="CostInitialize">SOFT_LOCATION</Custom>
</InstallExecuteSequence>*

Obviously I'm missing something. But I don't know what? Any idea?

Thanks in advance

-- 

Regards,

*Natxo Mateos*
[EMAIL PROTECTED]

*Asuni CAD* - _www.asuni.es <http://www.asuni.es>_ - 93 319 6868 - 91 
541 6439
*Especialistas en el desarrollo de aplicaciones a medida sobre AutoCAD*

------------------------------------------------------------------------
-
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