title: Inno Setup [UninstallDelete] delete all except one folder
body: <p>For the installation and deployment of my application I'm using Inno-Setup 5.5.4. My current installation structure is the following:</p>
  
  <pre><code>    C:\MyApp
      C:\MyApp\app.exe
      C:\MyApp\FolderA
      C:\MyApp\FolderA\InstalledFile.txt
      C:\MyApp\FolderA\NewFile.txt
      C:\MyApp\FolderB
      C:\MyApp\FolderB\NewFile.txt
      ...
      C:\MyApp\FolderZ
  </code></pre>
  
  <p>After uninstalling the application, I want to make remove all possible files that could be created by the application except those present in a specific folder. (i.e. the <code>C:\MyApp\FolderA\NewFile.txt</code>).</p>
  
  <p>My first try would be to have one entry for each folder I want to clean in the [UninstallDelete] section. Something like the following:</p>
  
  <pre><code>    [UninstallDelete]
      Type: filesandordirs; Name: C:\MyApp\FolderB
      Type: filesandordirs; Name: C:\MyApp\FolderC
      ...
      Type: filesandordirs; Name: C:\MyApp\FolderZ
  </code></pre>
  
  <p>However, I don't like this solution since I have to consider to modify the installer each time I add a new folder to the application.</p>
  
  <p>Second approach would be to remove the specific folder only if it is empty and then set application's root folder to be removed. Something like the following:</p>
  
  <pre><code>     [UninstallDelete]
       Type: dirifempty; Name: C:\MyApp\FolderA
       Type: filesandordirs; Name: C:\MyApp\
  </code></pre>
  
  <p>Would this second approach work? Is there a more reasonable way to achieve this?</p>