Hi

 

I have a scenario like while installing I need to update the web.config
file.

If the Key exist then I need to update else I need to create the key.

 

I created the key with the below code.

<util:XmlFile Id='conf10' Action="createElement"
ElementPath="/configuration/appSettings" Name="add"
File="[$(var.ConfigFileID)]" Sequence="1" /                <util:XmlFile
Id='conf11' Action="setValue"
ElementPath="/configuration/appSettings/add[\[]not(@key)[\]]" Name="key"
Value="Cname" File="[$(var.ConfigFileID)]" Sequence="2" />

<util:XmlFile Id='conf12' Action="setValue"
ElementPath="/configuration/appSettings/add[\[]@key='Cname'[\]]"
Name="value" Value="[CNAME]" File="[$(var.ConfigFileID)]" Sequence="3" />

 

But I don't know how to check the key already exists or not.

I need to update if the Key already exist.

 

 

Thanks

Bala.

 

 

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to