Quantcast

RE: XmlFile element, updated property value

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: XmlFile element, updated property value

Rob Mensching
Has this been solved?  My first guess is that your "SomeServerUrl" property
needs to be a public property (ALL CAPS) and may marked "Secure='yes'" to be
able to be passed to the server side of the Windows Installer.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jagnow, Dan
Sent: Tuesday, September 13, 2005 10:04 AM
To: [hidden email]
Subject: [WiX-users] XmlFile element, updated property value

I've installed WiX from votive-2.0.3309.0.msi, and I'm trying to use the
XmlFile element to update my configuration file.  I have a property
similar to this in my main WXS template:

<Property
Id="SomeServerUrl"><![CDATA[http://SOMESERVER.mydomain.com]]></Property>

The property contains a default value that acts as a template; I only
expect the name of the server to change during deployment.  There
shouldn't be any changes to the protocol or domain.

In the UI for my setup program, I have a dialog that asks the user to
update the value of this property.  It has a control that's something
like this:

<Control Id="SomeServerUrlEdit" Type="Edit" X="45" Y="85" Width="220"
Height="18" Property="SomeServerUrl" Text="{80}" />

As anticipated, the initial value of the textbox is
"http://SOMESERVER.mydomain.com" when stepping through the installation
process.  At one point in time I inserted a control in a later dialog to
verify that the value of the SomeServerUrl property had been updated.
The updated value did appear in the dialog, so I know that Windows
Installer knows about the change somewhere.

The problem is that XmlFile is not using the updated value of the
property.  I have an element something like this inside one of my
components:

<XmlFile Id="ConfigSetSomeServerUrl" Action="setValue"
ElementPath="/configuration/someCustomSection/@someServerUrl"
File="[INSTALLLOCATION]MyAppFolder\Web\Web.config" Value="[
SomeServerUrl]"></XmlFile>

The correct attribute is, in fact, updated in the Web.config file.
However, it's updated with the original value of the property, not the
value as updated by the user.  I had the same problem when I was trying
to develop a VBScript custom action as a stopgap measure until XmlFile
was available.

What do I need to change so that the updated property is used?  Is there
some magic to the sequencing?  Any help would be appreciated.

Dan Jagnow


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: XmlFile element, updated property value

Jagnow, Dan
> Has this been solved?  My first guess is that your "SomeServerUrl"
> property needs to be a public property (ALL CAPS) and may marked
> "Secure='yes'" to be able to be passed to the server side of the
> Windows Installer.

Bob Arnson replied to this and advised me to change the property name to
all caps so it would be a public property.  That change fixed it, and
XmlFile is now updating my Web.config with a value entered by the user
in the installer UI.

Thanks for the help!

Dan Jagnow


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Loading...