Thanks Brian/John,
Yes I agree that Perl(or any other tool like vbscript) might not be a good
choice. I can do it with custom action but trying to avoid it. I came across
the link
http://blogs.msdn.com/gisenberg/archive/2007/10/09/wix-v3-and-xmlconfig-xmlfile-troubleshooting.aspx
but
does not look to be specfic to my issue. It does not seem to talk about
creating a node only if it does not exists.

Thanks,
siaj

Re: [WiX-users] Creating a XML Node in Config file
From: Brian Rogers <[EMAIL PROTECTED]> - 2008-11-11 18:01
I don't think Perl is the right technology for use within Windows
installer...

To answer Siaj's question, you probably want to check out the WiX XmlConfig
custom action.
It has the functionality you are looking for. Here is an actual sample usage
of XmlConfig:


http://blogs.msdn.com/gisenberg/archive/2007/10/09/wix-v3-and-xmlconfig-xmlfile-troubleshooting.aspx

######################################
$_='^#(/||/@[EMAIL PROTECTED]@:^[-['^";@@@\\>])@.".
"{)/];)^{";$,+=(++$,);$_.=">&$,";`$_`;


-----Original Message-----
From: John Cooper (Volt) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2008 9:56 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Creating a XML Node in Config file

You can use perl with a module like XML::Simple to read in Web.Config. In
the case of
XML::Simple, you'd then test for a tree node $parent->{'ConnectStrings'}. If
it doesn't
exist, then you'd just add the node to the tree and flush the tree to
Web.Config. Other
perl modules can do this job slightly differently.

--
John M. Cooper

-----Original Message-----
From: siaj [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2008 9:29 AM
To: [EMAIL PROTECTED]
Subject: [WiX-users] Creating a XML Node in Config file

Hello,
I am new to Wix toolset. I am trying to create a Node in a Web.Config file
which looks like
<ConnectionStrings>
</ConnectionStrings>

The node should be created only is such a node "does not exists". If there
is already such node then it should not create a duplicate node.

Can anyone help me with a code snippet or guide me in a direction?

Thanks,
siaj
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/wix-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to