You're not supposed to write data files into code locations. If you haven't released yet, change the log file locations to be in localappdata or somewhere similar.
-----Original Message----- From: Raatikainen, Marko (GE Healthcare) [mailto:marko.raatikai...@ge.com] Sent: 02 October 2012 10:08 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Using util:RemoveFolderEx causes the parent folders tobe undeleted at uninstallation? Hello, could someone help in the correct way of deleting extra files and folders at uninstallation with util:RemoveFolderEx? Our software is a collection of smaller pieces. All of those leave log files or other stuff around that will need to be deleted at uninstallation. This can be taken care of by manually defining the files to be deleted with combination of RemoveFile and RemoveFolder elements. This works, but is a bit cumbersome. In 3.6 release came this excellent addition of util:RemoveFolderEx. With that I can delete the entire installation folder, and things work nicely (assuming I've stored the installation location in registry). There is one problem, though. If I use this mechanism, the parent folders are not deleted. This is fine, if the user installs into the default location at Program Files (after all, we do not want to remove the Program Files folder). But if he decides to install to c:\foo\bar\baz, the folder structure of c:\foo\bar will be left around. Note that I get this behavior only, if the extra files are in subfolders. If the extra files are in the root installation directory, then the entire folder structure is deleted, as I would expect. Is this normal behavior, or am I doing something incorrectly? I'm adding a small example at the end, so you can check for any obvious problems. Thanks, -Marko --------------------------- The code sample: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> <Product Id="*" Name="WixInstallationDirectory" Language="1033" Version="1.0.0.0" Manufacturer="Example" UpgradeCode="26d267f5-d8de-43d7-a90f-7ea8dde5dca3"> <Package InstallerVersion="200" InstallScope="perMachine" /> <MediaTemplate /> <Feature Id="ProductFeature" Title="WixInstallationDirectory" Level="1"> <ComponentGroupRef Id="ProductComponents" /> </Feature> <Property Id="INSTALLFOLDER"> <RegistrySearch Key="Software\just\example" Root="HKLM" Type="raw" Id="InstallationDirectoryRegistrySearch" Name="InstallLocation" /> </Property> </Product> <Fragment> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="Parent" Name="Parent"> <Directory Id="INSTALLFOLDER" Name="Final"> </Directory> </Directory> </Directory> </Directory> </Fragment> <Fragment> <ComponentGroup Id="ProductComponents"> <Component Id="ProductComponent" Guid="{5DF59107-A440-49C9-AEE4-BD2FB22DF1D6}" Directory="INSTALLFOLDER"> <File Name="Product.wxs"/> <RegistryKey Root="HKLM" Key="Software\just\example"> <RegistryValue Name="InstallLocation" Type="string" Value="[INSTALLFOLDER]" Action="write" KeyPath="yes" /> </RegistryKey> <util:RemoveFolderEx Id='RemoveInstallationFolder' On="uninstall" Property="INSTALLFOLDER"/> </Component> </ComponentGroup> </Fragment> </Wix> ----------------------------------------------------------------------------- - Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users