Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
Hello to everyone.
I am struggling against the issue with wix toolset: why after I uninstall an application some folders including the "logs" are not deleted? is it a bug or not?

<Directory Id="logs" Name="logs">
<Component Id="logs" Guid="0A4D0A3F-2E0D-1B1A-1C6D-1A0F8FAAABC6" Win64="$(var.is64)">
      <CreateFolder Directory="logs">
       <Permission GenericAll="yes" User="Everyone" />
       </CreateFolder>
       <RemoveFolder Id="logs"  On="uninstall"></RemoveFolder>
       </Component>
       </Directory>
Posted

1 solution

It's not a bug.

You told it to delete the folder, which always assumes the folder is empty. If the folder is not empty it doesn't get deleted.

Since your installer doesn't know about the log files (it didn't put them there!) it can't delete them without a custom action. Delete the files in a custom action before the folders are deleted and it'll work.
 
Share this answer
 
Comments
Dzianis Igaravich Leanenka 14-Aug-15 15:05pm    
Ok, thank you. Could you clarify a bit what is "custom action" and how to do this?
I am a beginner and has never faced Wix before.
Dave Kreskowiak 14-Aug-15 16:33pm    
A "custom action" is an arbitrary piece of code, vbscript, executable or .DLL function that an installer runs to do things that are not normally doable inside an installer. It's a terms used throughout the Windows Installer community, not just WIX.

I don't know how to do it in WIX because, well, I've never used WIX. My primary packaging tool is InstallShield.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900