Title: Setting property value with another property value
Thanks for all the answers!
 
Ok, so the gist of it is; when setting a property with another property's value use a custom action.
So all that is left is to schedule the CA at button push.
 
But the code below does not seem to work, i.e getting an error; 'QtExecCmdLine' does not contain a Value attribute and is not marked as Admin, Secure, or Hidden.  The Property element is being ignored. So I can set it to an arbitrary value, and the CA should overwrite it?
 
Also talking about the [#FileId] attribute, how does one use it? I understand that if one has defined a File element or Binary element, one can use  [#GivenElementId] to reference the file / path. 
 
But given one wants to use the built in ProgramFilesFolder dir property, as the program files folder does not always reside on c:?
Is it possible to use [#FileId] syntax for this, is ProgramFilesFolder accessible to be used in this way?
 
 <Binary Id="WixUtilExtension" SourceFile="?[ProgramFilesFolder]?\Windows Installer XML v3\bin\WixUtilExtension.dll" />
 
Regards
Morten


Fra: Rob MacFadyen [mailto:[EMAIL PROTECTED]
Sendt: 4. november 2006 14:17
Til: Lerudjordet, Morten Minge
Emne: RE: [WiX-users] Setting property value with another property value

Morten,
 
I think what you need is:
 
<property id="QtExecCmdLine" />
<CustomAction Id="Set_QtExecCmdLine" Property="QtExecCmdLine" Value=".\Deploy.Tools\XmlPreprocess.exe /i [INSTALLPATH][WEBCONFIGFILE] /s [FILEPATH] /NoLogo" />
 
or even
 
<property id="QtExecCmdLine" />
<property id="WEBCONFIGPATH" />
<property id="SETTINGSPATH" />
<CustomAction id="set_WEBCONFIGPATH" property="WEBCONFIGPATH" value="[INSTALLPATH][WEBCONFIGFILE]" />
<CustomAction id="set_SETTINGSPATH" property="SETTINGSPATH" value="[FILEPATH]" />
<CustomAction Id="Set_QtExecCmdLine" Property="QtExecCmdLine" Value=".\Deploy.Tools\XmlPreprocess.exe /i [WEBCONFIGPATH] /s [SETTINGSPATH] /NoLogo" />
 
What's being complained about is defining a property and referencing another property in the Value portion of the definition. More or less the following is a no no:
<property id="ddd" value="[anyotherprop]">
 
You always have to do a definition and then an explicit assignment (via a custom action).
 
Regards,
 
Rob
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lerudjordet, Morten Minge
Sent: Saturday, November 04, 2006 6:09 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Setting property value with another property value

Hi, I have a little problem trying to do this the right way.
Because I get a warning compiling when a property value is set to [FILEPATH] and [INSTALLPATH][WEBCONFIGFILE].
The warning message hint that one should set this using a custom action with the property and value field.
I have not tried using CA's in this way and are kinda lost. Any help is very appreciated.


<Property Id="QtExecCmdLine"
Value=".\Deploy.Tools\XmlPreprocess.exe /i ?SetWebConfigPath_Value_Here? /s ?SetSettingsPath_Value_Here? /NoLogo"/>

<CustomAction Id="QtExec" BinaryKey="WixUtilExtension" DllEntry="CAQuietExec" Execute="immediate" Return="check"/>
<Binary Id="WixUtilExtension" SourceFile="[ProgramFilesFolder]\Windows Installer XML v3\bin\WixUtilExtension.dll" />

<CustomAction Id="SetWebConfigPath" Property="CASetCPath" Value="[INSTALLPATH][WEBCONFIGFILE]" />
<CustomAction Id="SetSettingsPath" Property="CASetSPath" Value="[FILEPATH]" />

Thanks

Morten

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to