0

We have the following folder structure in our wix declaration:

<Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="ProgramFilesFolder" Name="$(var.ProgramFilesFolder)">
        <Directory Id="ManufacturerFolder" Name="$(var.Manufacturer)">
          <Directory Id="APPLICATIONFOLDER" Name="$(var.AppFolderName)">

            // further folders or files

          </Directory>
        </Directory>
    </Directory>
</Directory>

Target: We want to delete the APPLICATIONFOLDER on an uninstall. RemoveFolderEx and RemoveFolder will not work for this task, so we need to use a CustomAction. The CustomAction:

<CustomAction Directory="ManufacturerFolder" ExeCommand='/c rmdir /S /Q "[APPLICATIONFOLDER]"' Id="RemoveAppFolder" Execute="deferred" Impersonate="no" Return="ignore"/>

This custom action deletes nothing. What is the correct declaration?

Simon
  • 4,157
  • 2
  • 46
  • 87

1 Answers1

0

Why Don't you do it like this? It must work on uninstall. For example just place it in component where you have shortcut creation.

<RemoveFolder 
            Id="rem_folder" 
            Directory="APPLICATIONFOLDER" 
            On="uninstall"/>
<RemoveFile Id="rem_files"
            On="uninstall"
            Directory="APPLICATIONFOLDER"
            Name="*.*"/>
error505
  • 1,126
  • 1
  • 17
  • 29