13

I have the following configuration to delete and copy a file from WIX.

 <Directory Id='TARGETDIR' Name='SourceDir'>
 <Directory Id="AppDataFolder" Name="AppDataFolder">
    <Directory Id="GleasonAppData" Name="Gleason" >
    <Directory Id="GleasonStudioAppData" Name="GleasonStudio">
    <Directory Id="DatabaseAppData" Name ="Database">
    <Directory Id="UserSandboxesAppData" Name="UserSandboxes" />

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

</Directory>

<DirectoryRef Id="UserSandboxesAppData">
<Component Id="comp_deleteBackup" Guid="*">
        <RemoveFile Id="RemoveBackup" Directory="UserSandboxesAppData" 
                                Name="DevelopmentBackUp.FDB" On="install" />  
        <RegistryKey Root="HKCU" Key="Software\Gleason\Database\RemoveBackup">
            <RegistryValue Value="Removed" Type="string" KeyPath="yes" />
        </RegistryKey>

    </Component>
    <Component Id="comp_createBackup" Guid="*">
        <CopyFile Id="DBBackup" 
              DestinationDirectory="UserSandboxesAppData" 
              DestinationName="DevelopmentBackUp.FDB" 
              SourceDirectory="UserSandboxesAppData" 
              SourceName="Development.FDB" />

        <RegistryKey Root="HKCU" Key="Software\Gleason\Database\CopyBackup">
            <RegistryValue Value="Copied" Type="string" KeyPath="yes" />
        </RegistryKey>    
    </Component>
</DirectoryRef> 

I get 4 errors related to ICE64--The directory 'xxx' is in the user profile but is not listed in the RemoveFile table. xxx={UserSandboxesAppData, DatabaseAppData, GleasonStudioAppData, GleasonAppData} Someone else had a very similar problem here: Directory xx is in the user profile but is not listed in the RemoveFile table.. But that solution did not help me.

What do I need to change?

Thank You, Venkat Rao

Community
  • 1
  • 1
Venkat S. Rao
  • 1,110
  • 3
  • 13
  • 29

1 Answers1

14

You'll want to add some RemoveFolder elements under your components to keep ICE64 happy.

<RemoveFolder Id="RemoveThisFolder" On="uninstall" />

For more details about removing per-user data and managing to pass all the ICE validation tests, check out How to create an uninstall shortcut (and pass all the ICE validation) by Rob Mensching.

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
saschabeaumont
  • 22,080
  • 4
  • 63
  • 85