Thanks, Blair, that makes a lot of sense.

Regards,

Pan

-----Original Message-----
From: Blair [mailto:os...@live.com] 
Sent: 08 October 2009 12:54
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Uninstall deleting config file

If the component is marked permanent, it will never uninstall (thus, it will
never run the On='uninstall' changes).

You need a component that is unique to your application if you want to
remove something from the file. Thus, the XmlConfig entries need to be in a
different component than the file is (so the file can be either permanent or
shared and the entries can be unique per-application).

-----Original Message-----
From: pan.pantzia...@compassmc.com [mailto:pan.pantzia...@compassmc.com] 
Sent: Thursday, October 08, 2009 4:19 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Uninstall deleting config file

Thanks. It doesn't delete now, but still can't remove a node on uninstall...

Here's my code for adding an element Blurg, with a node called SonOfBlurg:

        <util:XmlConfig Id="AddBlurg" Action="create" Node="element"
ElementPath="/first/second" Name="Blurg"
                        File="[#SettingsXmlFile]" Sequence="1"
On="install"/>
        <util:XmlConfig Id="AddID" ElementId="AddBlurg" Name="ID"
Value="here" File="[#SettingsXmlFile]" Sequence="2"/>
        <util:XmlConfig Id="SonOfBlurg" Action="create" Node="element"
ElementPath="/first/second/Blurg" Name="SonOfBlurg"
                        File="[#SettingsXmlFile]"  Value="tada!"
Sequence="3" On="install"/>

To remove Blurg on uninstall:

        <util:XmlConfig Id="DeleteBlurg" Action="delete" Node="element"
ElementPath="/first/second" VerifyPath="blurg[...@id='here'[\]]"
                        On="uninstall" File="[#SettingsXmlFile]"
Sequence="1"/>


It successfully adds the new elements, but uninstall doesn't remove them. I
assume that I'm missing something obvious, but I can't see it...

Thanks.

Pan


-----Original Message-----
From: Pally Sandher [mailto:pally.sand...@iesve.com]
Sent: 07 October 2009 17:21
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Uninstall deleting config file

http://wix.sourceforge.net/manual-wix3/wix_xsd_component.htm
Put SettingsXmlFile in it's own Component & set 'Permanent="yes"' on
that Component. It'll never be removed then.

I sincerely doubt XMLConfig is deleting your XML file during uninstall.
If you put a file on the machine during install, unless told otherwise
as above, it will be removed during uninstall.

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: pan.pantzia...@compassmc.com [mailto:pan.pantzia...@compassmc.com]

Sent: 07 October 2009 16:55
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Uninstall deleting config file

I have an XML configuration file which is shared across a number of
applications. My install appends to the this file OK, but when I
uninstall it deletes the config file rather than just removing the
elements that were inserted by the install. A snippet of the install
code:

<util:XmlConfig Id="AddNew" Action="create" Node="element"
ElementPath="/First/Second" Name="AppElement"
                        File="[#SettingsXmlFile]" Sequence="1"
On="install"/> <util:XmlConfig Id="AddNewID" ElementId="AddNew"
Name="ID" Value="Newish" File="[#SettingsXmlFile]" Sequence="2"/>

I've also got the following flagged as On="uninstall":

<util:XmlConfig Id="Uninstall" Action="delete" Node="element"
ElementPath="/First/Second/appelement[...@id='Newish'[\]]"
                        Name="Model" File="[#SettingsXmlFile]"
Sequence="99" On="uninstall"/>

Unfortunately this just deletes the whole config file. As a more general
question, is there a way to flag files that are installed so that
uninstalling doesn't remove them? I'm thinking of user data files that I
don't want to remove if the application is removed...

Thanks,

Pan

Compass Limited
Compass House, 60 Priestley Road, Guildford, Surrey GU2 7YU Compass
Limited is registered as a company in England and Wales Company
Registration No. 1714804 VAT Registration No. GB391315557
Tel: +44 (0)1483 514500 Fax: +44 (0)1483 302279 www.compassmc.com

This message may contain confidential and/or privileged information. If
you are not the addressee or authorised to receive this for the
addressee, you must not use, copy, disclose, or take any action based on
this message or any other information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your co-operation.






----------------------------------------------------------------------------
--
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


Compass Limited
Compass House, 60 Priestley Road, Guildford, Surrey GU2 7YU
Compass Limited is registered as a company in England and Wales
Company Registration No. 1714804 VAT Registration No. GB391315557
Tel: +44 (0)1483 514500 Fax: +44 (0)1483 302279
www.compassmc.com

This message may contain confidential and/or privileged information. If you
are not the addressee or authorised to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any other information herein. If you have received this message in error,
please advise the sender immediately by reply e-mail and delete this
message. Thank you for your co-operation.


----------------------------------------------------------------------------
--
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



------------------------------------------------------------------------------
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