TheWommies
TheWommies

Reputation: 5072

WIX RemoveFIle error LocalAppDataFolder

I am getting the error

"The directory TestDir is in the user profile but is not in the RemoveFile table"

Basically I want my app to install into the local Common "All Users" folder instead of the Program Files folder.

so I have my directory structure as

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="CommonAppDataFolder">
  </Directory>
  <Directory Id="SystemFolder"/>
  <Directory Id="StartupFolder"/>
  <Directory Id="DesktopFolder"/>
  <Directory Id="ProgramMenuFolder">
    <Directory Id="ProgramMenuVendorFolder" Name="Orion Integration">
    </Directory>
  </Directory>
  <Directory Id="LocalAppDataFolder">
     <Directory Id="ORIONDIR" Name="Orion Integration">
      <Directory Id="INSTALLDIR" Name="TestApp">
        <Directory Id="TestDir" Name="Test">

          <Component Id="BUILDINGFLOORMODELSDIR_C" Guid="A6BD61D8-FAC8-4D7D-881E-58CC2C4F9753"
            SharedDllRefCount="no" KeyPath="no" NeverOverwrite="no" Permanent="no" Transitive="no"
             Location="either">                
            <RegistryValue
              Root="HKCU"
              Key="Software\Orion Integration\Orion CMS"
              Name="InstalledBuildingFloorModels"
              Type="integer"
              Value="1" />
           <CreateFolder/>
           <RemoveFolder Id="BUILDINGFLOORMODELSDIR" On="uninstall"/>
          </Component>

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

...........

I have placed RemoveFIle in the compnent section and still getting errors

Upvotes: 0

Views: 505

Answers (1)

BryanJ
BryanJ

Reputation: 8563

You need to specify a directory using the <RemoveFolder /> element.

Instead of

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

try

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

Upvotes: 1

Related Questions