Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wix - The directory is in the user profile but is not listed in the RemoveFile table

I want to create a subfolder in start menu, in my case PMFCompanyFolder already exists and contains links and I don't want remove when uninstalling my product.

So I don't push the RemoveFolder Property and I get :

ICE64: The directory PMFCompanyFolder is in the user profile but is not listed in the RemoveFile table.

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramMenuFolder">
    <Directory Id="PMFCompanyFolder" Name="MyCompany">
      <Directory Id="PMFProductFolder" Name="MyProduct"/>
    </Directory>
  </Directory>
</Directory>

<DirectoryRef Id="PMFProductFolder">
  <Component Id="PMFProductFolderComponent" Guid="A13A7784-4C82-4CBE-9018-CEC6F266743B">
    <RemoveFolder Id="null" On="uninstall"/>
    <RegistryValue Root="HKCU" Key="Software\Microsoft\MyCompany\MyProduct" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
  </Component>
</DirectoryRef>

<Feature Id="ProductFeature" Title="" Level="1">
  <ComponentRef Id="PMFProductFolderComponent"/>
</Feature>
like image 477
Arnaud F. Avatar asked Feb 27 '12 14:02

Arnaud F.


1 Answers

You should pass the folder id:

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

It is safe to remove it on uninstall - pre-existing items will not be removed.

like image 59
KMoraz Avatar answered Sep 20 '22 19:09

KMoraz