If you always want to restore it to "false", XMLConfig can be used to
set a value on uninstall. See
http://wix.sourceforge.net/manual-wix3/util_xsd_xmlconfig.htm 

If you want to store what it is before installation & then restore that
value, you'll need to use a Custom Action to read it then use a
RegistryValue to store it, a RegistrySearch to retrieve it during it
uninstall & XMLConfig to set it back. Rob M. wrote a blog post on how to
store & retrieve Properties
http://robmensching.com/blog/posts/2010/5/2/The-WiX-toolsets-Remember-Pr
operty-pattern which you'd only need to expand with your XML reading
Custom Action.

Palbinder Sandher 
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer

-----Original Message-----
From: Deepika Gakhar [mailto:deepi...@microsoft.com] 
Sent: 18 November 2010 19:20
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Is there a way to restore original xml after
uninstalling a component that sets value using XmlFile?

Hi,

One of our product features has a component that uses  util:XmlFile to
set the inner text of an element in config file to "true". The original
value is false.

Original state of element : <Enabled>false</Enabled> After the feature
is installed, state of the element : <Enabled>true</Enabled>

When I just uninstall that feature by using "Change" option in "Add
Remove Programs",  the inner text gets removed completely and the state
of element looks like: <Enabled> </Enabled>. This is undesirable in our
case as this invalidates the xml against the xsd and will puncture the
whole system.

Is there a way to restore the old value after uninstalling the feature?

You help will be much appreciated. Thanks in advance.

Best Regards,
Deepika
------------------------------------------------------------------------
------
Beautiful is writing same markup. Internet Explorer 9 supports standards
for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to