Hi Steve, i'm beginning with WIX and i don't have any experience, si i hope
you could help with some doubts i have:
i have some files one is called "ConfigurationInitialize.wxi" and it contains
this
<?xml version="1.0" encoding="utf-8"?>
<Include>
<!-- +++++++++++++++++++++++++++ VIRTUAL_DIR_VAL property initialize
+++++++++++++++++++++++++++ -->
<Property Id="VIRTUAL_DIR_VAL" Value="MyWeb" />
<!-- +++++++++++++++++++++++++++ web app name properties initialize
+++++++++++++++++++++++++++ -->
<Property Id="WEB_APP_NAME" Value="MyWeb" />
<!-- +++++++++++++++++++++++++++ app pool identity properties initialize
+++++++++++++++++++++++++++ -->
<?define LogonAccount=$(env.USERDOMAIN)\$(env.USERNAME)?>
<Property Id="WEB_APP_POOL_IDENTITY_DOMAIN" Value="$(env.USERDOMAIN)"/>
<Property Id="WEB_APP_POOL_IDENTITY_NAME" Value="$(env.USERNAME)"/>
<Property Id="WEB_APP_POOL_IDENTITY_PWD" Hidden="yes" />
<!-- +++++++++++++++++++++++++++ Connection String
+++++++++++++++++++++++++++ -->
<Property Id="CONNECTION_STRING" Value="Data Source=|SERVER|;Initial
Catalog=|Database name|;User Id=|LOGIN|;Password=|PASSWORD|;Persist Security
Info=True" />
</Include>
And i have the "Product.wxs" file that contains this:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<Product Id="{FA1B9338-B6F6-413e-B67F-86CA8BCED6E8}"
Name="MyWeb.Setup"
Language="1033"
Version="1.0.0.0"
Manufacturer="MyWeb.Setup"
UpgradeCode="{E5C9F391-5787-4fd1-81E6-D1A4A91D226D}">
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="MyWeb.cab" EmbedCab="yes" />
<!--
* Variables
-->
<!-- Configurable install location -->
<PropertyRef Id="NETFRAMEWORK30_SP_LEVEL" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<!-- Creating directories -->
<Directory Id="TARGETDIR" Name="SourceDir">
<!-- Install stuff into program files folder. -->
<Directory Id="ProgramFilesFolder">
<!-- In program files create folder with name MyWeb. -->
<Directory Id="INSTALLLOCATION" Name="MyWeb">
<!-- This is the folder where the website content will be
located -->
<Directory Id="MYWEBWEBSITE" Name="Website">
<!-- Continue in DirectoryRef with specific name -->
</Directory>
<!-- Here you can add another directories -->
</Directory>
</Directory>
</Directory>
<!-- Complete feature which will be installed. -->
<Feature Id="Complete"
Title="MyWeb - My awesome web"
Level="1"
Display="expand"
ConfigurableDirectory="INSTALLLOCATION">
<!-- Main content of the Complete feature. -->
<Feature Id="MainContent"
Title="MyWeb Website"
Description="The website content"
Level="1">
<!-- Include IIS Configuration. -->
<ComponentGroupRef Id="MyWebIssConfiguration" />
<!-- Include web content. -->
<ComponentGroupRef Id="MyWebWebComponents" />
<!-- Perform changes in the web.config file. -->
<ComponentRef Id="WebConfigCmp" />
</Feature>
</Feature>
<DirectoryRef Id="MYWEBWEBSITE">
<!-- Component handling the web.config -->
<Component Id="WebConfigCmp" Guid="">
<!-- Copy web.config to MYWEBWEBSITE folder. -->
<File Id="WebConfigFile" KeyPath="yes"
Source="$(var.publishDir)\Web.config" Vital="yes" />
<util:XmlFile Id="ModifyConnectionString"
Action="setValue"
Permanent="yes"
ElementPath="/configuration/connectionStrings/add[\[]@name='MyConnectionString'[\]]"
Name="connectionString"
File="[#WebConfigFile]"
Value="[CONNECTION_STRING]"
SelectionLanguage="XSLPattern"
Sequence="1" />
</Component>
</DirectoryRef>
<!-- .NET Framework 3.0 SP 1 must be installed -->
<Property Id="FRAMEWORKBASEPATH">
<RegistrySearch Id="FindFrameworkDir" Root="HKLM"
Key="SOFTWARE\Microsoft\.NETFramework" Name="InstallRoot" Type="raw"/>
</Property>
<Property Id="ASPNETREGIIS" >
<DirectorySearch Path="[FRAMEWORKBASEPATH]" Depth="4"
Id="FindAspNetRegIis">
<FileSearch Name="aspnet_regiis.exe" MinVersion="2.0.5"/>
</DirectorySearch>
</Property>
<!-- Switch ASP.NET to version 2.0 -->
<CustomAction Id="MakeWepApp20" Directory="MYWEBWEBSITE"
ExeCommand="[ASPNETREGIIS] -norestart -s W3SVC/1/ROOT/[WEB_APP_NAME]"
Return="check"/>
<InstallExecuteSequence>
<Custom Action="MakeWepApp20" After="InstallFinalize">ASPNETREGIIS
AND NOT Installed</Custom>
</InstallExecuteSequence>
<!-- License and images -->
<WixVariable Id="WixUILicenseRtf"
Value="$(var.MyWebResourceDir)\License.rtf" />
<!-- Specify UI -->
<UIRef Id="MyWebUI" />
</Product>
</Wix>
So i don't know if all the solution you found that is this:
<CustomAction Id="CA_SetProperty_DATABASE_USERNAME"
Property="DATABASE_USERNAME" Value="[%USERDOMAIN]\[LogonUser]"/>
<UI>
<ProgressText Action="CA_SetProperty_DATABASE_USERNAME">CA: Setting
database username...</ProgressText>
</UI>
placed in both execute and UI sequence:
<InstallExecuteSequence>
<Custom Action='CA_SetProperty_DATABASE_USERNAME'
After='CA_SetProperty_DATABASE_NAME'></Custom>
<InstallUISequence>
<Custom Action='CA_SetProperty_DATABASE_USERNAME'
After='CA_SetProperty_DATABASE_NAME'></Custom>
goes in the "Product" file or also in my "ConfigurationInitialize" file, is
because i don't understand so good what are your refering to when you say
placed in both execute and UI sequence
Thanks!!
> From: [email protected]
> To: [email protected]
> Date: Thu, 30 May 2013 19:20:37 +0000
> Subject: Re: [WiX-users] variables not working... [P]
>
> Classification: Public
> Yes in the Product.wxs file
>
> -----Original Message-----
> From: Pelusin [mailto:[email protected]]
> Sent: May-30-13 3:03 PM
> To: [email protected]
> Subject: Re: [WiX-users] variables not working...
>
> Hi Steve! Excuse me where did you exactly put the solution? in the
> Product.wxs or where?
>
> Thanks!
> Alfredo
>
>
>
> --
> View this message in context:
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/variables-not-working-tp7580709p7586225.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get
> 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead Download
> for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
> _______________________________________________
> WiX-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> This message has been marked as Public by Steven Ogilvie on May-30-13 3:20:36
> PM.
>
> The above classification labels were added to the message by TITUS Message
> Classification.
> For more information visit www.titus.com.
>
> ------------------------------------------------------------------------------
> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
> Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
> _______________________________________________
> WiX-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users