The xx directory is in the user profile, but is not listed in the RemoveFile table.

When I try to create an installer, I get the following error:

The ProgramMenuDir directory is located in the user profile, but is not listed in the RemoveFile table.

How to solve this problem? below is the directory structure that I use.

<Directory Id="ProgramMenuFolder" Name="Programs"> <Directory Id="ProgramMenuDir" Name="E"> <Directory Id="Monarch" Name="Monarch"> <Component Id="Monarch" Guid="E510F3DA-82AA-11DF-8814-8970DFD72085"> <RemoveFolder Id='Monarch' On='uninstall' /> <RemoveFolder Id='ProgramMenuDir' On='uninstall' /> <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]' Type='string' Value='' KeyPath='yes' /> </Component> </Directory> </Directory> </Directory> 
+41
wix
Jul 20 '10 at 13:45
source share
2 answers

As far as I can see, the problem is using the <RemoveFolder/> element. If the Directory attribute is omitted, it accepts the directory of the parent component. In your case, this is a directory with Id = "EFIMonarch". This explains why you are getting a warning for the external directory (ProgramMenuDir), but not for the EFIMonarch directory.

Try replacing:

 <RemoveFolder Id='ProgramMenuDir' On='uninstall' /> 

from

 <RemoveFolder Id='RemoveProgramMenuDir' Directory='ProgramMenuDir' On='uninstall' /> 

It is also a good idea to be explicit for every RemoveFolder element.

Hope this helps.

+61
Jul 20 '10 at 20:43
source share

Just write this for some others who may still experience this problem even after answering this question.

I had the same problem, and even after explicitly specifying Directory in RemoveFolder, it did not help me, I tried to put this DirectoryRef containing the shortcut, install / remove somponents immediately after TARGETDIR inside the same fragment, and this helped fix my problem.

0
Oct 30 '17 at 6:45
source share