The XmlFile element implements two custom actions for you: an immediate one
that the element itself schedules that reads a custom table that the element
adds rows to, and a deferred one that is scheduled by the immediate one,
receiving the data retrieved by that immediate one and acting on it.

The value "[PROJECT]" is parsed by the immediate CA and the result
("MyProject" in your example) is passed by it to the deferred CA, so all is
good with the example you give as it relates to the questions you raised.

-----Original Message-----
From: Chris Jokinen [mailto:chr...@directron.us] 
Sent: Tuesday, October 13, 2009 1:30 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] silent install, command line, parameter and
writting to registry or file

Blair,

 

Yes I was speaking of the installer's command line parameter. I have been
reading over some blogs and examples and I want to make sure I have this
correct.

 

I can use the session to access the command line parameters and then assign
those to Wix in this kind of structure

 

<File Id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" Name="app name.exe.config"
LongName="app name.exe.config" src="app name.exe.config " Vital="yes"
DiskId="1"/>

<XmlFile Id="configparameters" Action="setValue"
ElementPath="/configuration/userSettings/a...@key='project']/@value"
File="[INSTALLLOCATION]\app name.exe.config " Value="[PROJECT]"/>

 

.If I understand this right, the command line parameter would look like.

 

setup.msi PROJECT=MyProject

 

.and the msi will make a change to the project property value app
name.exe.config file.

 

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

    <configSections>

        <sectionGroup name="userSettings"
type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=zzzzzzzzzzzzzzzzzzz" >

            <section name="app_name.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=zzzzzzzzzzzzzzz"
allowExeDefinition="MachineToLocalUser" requirePermission="false" />

        </sectionGroup>

    </configSections>

    <userSettings>

        <app_name.Properties.Settings>

            <setting name="project" serializeAs="String">

              <value>MyProject</value>

            </setting>

        </ app_name.Properties.Settings>

    </userSettings>

</configuration>

 

 

I read in one blog that stated an msi file only has access to things like
the command line durring a non-defered phase and it can only modify files
during a defered phase.did I miss something?

 

 

All the Best,

Chris

----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to