Re: [WiX-users] optionally removing AppData folders created by application, during uninstall
I second this question. I am in the same boat. Adam, Do you use the WixUI or some custom UI?/Would you be able to post your code for the UI on uninstall? Date: Fri, 27 Jun 2008 16:10:48 +1200 From: [EMAIL PROTECTED] To: WiX-users@lists.sourceforge.net Subject: [WiX-users] optionally removing AppData folders created by application, during uninstall Hi guys, I have been battling with this problem for a while. I have a .Net application which saves temporary data into AppData\Roaming\Bookmarks. This folder should not HAVE to be installed by the MSI as the app will create it when needed (but I've gotten to the stage of experimentation where it seems to be easier if it is created by the MSI - the installer seems to not want to remove folders it didn't create, no matter what I do). I want this folder (and all its contents) to be removed at uninstall if REMOVEBOOKMARKS=1 (I have created a custom dialog with a checkbox that lets the user selected during uninstall whether or not to delete these temporary files). If REMOVEBOOKMARKS=0, then I don't want to delete the folder (or its contents), allowing any later installations to pick up these files... My WiX looks something like this: Guid=8C857E65-5EA2-4b0e-BCDA-334F030B1E4A REMOVEBOOKMARKS = 1 / On=uninstall/ Guid=3494B400-3193-4226-878C-2A4EB1B86456 Permanent=yes NOT Installed / Guid=3494B400-3193-4226-878C-2A4EB1B86455 Installed AND REMOVEBOOKMARKS = 1 / On=uninstall/ The Bookrmarks folder is the one I want to stay behind if REMOVEBOOKMARKS=0. It seems, no matter what I do, I can't get it to work. If I specify Permanent on the AddAppDataBookmarks component, the NOTHING will remove it. If I DONT specify it, then no matter what I put in the component conditions, it will ALWAYS be removed... How do I set up this sort of behaviour? Thank you in advance... Adam Langley Senior Developer Tel: +64 9 486 9010 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users _ The i’m Talkathon starts 6/24/08. For now, give amongst yourselves. http://www.imtalkathon.com?source=TXT_EML_WLH_LearnMore_GiveAmongst - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Preservation of .net settings?
Thanks for the quick reply. This does exactly what I wanted. After testing it out, I have another question. After the upgrade, the old settings file is still there. How do I remove the folder and the settings file for the last version? Also, is it possible to remove the settings folder in the user's $APPDATA% folder on an uninstall, but not when doing an upgrade? Thanks, Ryan Date: Wed, 18 Jun 2008 12:39:54 +1000 From: [EMAIL PROTECTED] To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Preservation of .net settings? The Settings class has an Upgrade method that grabs the previous settings. Make sure you add your own setting SettingsUpdateRequired that is defaultly set to true, otherwise this will overwrite your settings each time you start your program. static class Program { /// summary /// The main entry point for the application. /// /summary [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Get the settings from a previous version if we can if (Properties.Settings.Default.SettingsUpdateRequired) { Properties.Settings.Default.Upgrade(); Properties.Settings.Default.SettingsUpdateRequired = false; } Application.Run(new MainForm()); } } Regards, Ross. -Original Message- From: [EMAIL PROTECTED] ourceforge.net [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Dunn Sent: Wednesday, 18 June 2008 11:35 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Preservation of .net settings? I have a WiX project used to install a .net app. The app makes use of the Properties of .net to store settings. These settings go in %APPDATA%\Path\to\dir\version\user.config After I rev the version (either through a small patch, minor upgrade, major upgrade), how do I pull in these settings to be used by the new app? I'm not sure if this should be handled by the installer or my program. Within the .net app, I only access these settings through the Properties.* namespace, not by the path, so I'm unsure how to handle this issue. Thanks, Ryan _ The other season of giving begins 6/24/08. Check out the i'm Talkathon. http://www.imtalkathon.com?source=TXT_EML_WLH_SeasonOfGiving - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users _ Need to know now? Get instant answers with Windows Live Messenger. http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_062008 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
[WiX-users] Preservation of .net settings?
I have a WiX project used to install a .net app. The app makes use of the Properties of .net to store settings. These settings go in %APPDATA%\Path\to\dir\version\user.config After I rev the version (either through a small patch, minor upgrade, major upgrade), how do I pull in these settings to be used by the new app? I'm not sure if this should be handled by the installer or my program. Within the .net app, I only access these settings through the Properties.* namespace, not by the path, so I'm unsure how to handle this issue. Thanks, Ryan _ The other season of giving begins 6/24/08. Check out the i’m Talkathon. http://www.imtalkathon.com?source=TXT_EML_WLH_SeasonOfGiving - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users