tags:

views:

24

answers:

1

When iam trying to create the installer i am getting the following error:

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

How do i resolve this issue? below is the directory structure i am using.

   <Directory Id="ProgramMenuFolder" Name="Programs">
        <Directory Id="ProgramMenuDir" Name="EFI">
              <Directory Id="EFIMonarch" Name="EFI Monarch">
                  <Component Id="EFIMonarch" Guid="E510F3DA-82AA-11DF-8814-8970DFD72085">                       
                        <RemoveFolder Id='EFIMonarch' On='uninstall' />
                <RemoveFolder Id='ProgramMenuDir' On='uninstall' />

                    <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]' Type='string' Value='' KeyPath='yes' />
                  </Component>
              </Directory>
        </Directory>
    </Directory>
+1  A: 

As far as I can see, the problem is in the usage of <RemoveFolder/> element. If the 'Directory' attribute is omitted, it takes the directory of the parent component. In your case, it is a directory with Id="EFIMonarch". This explains why you get the warning for the outer directory (ProgramMenuDir), but don't get it for EFIMonarch directory.

Try replacing:

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

with

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

Also, it is a good idea to be explicit for every RemoveFolder element.

Hope this helps.

Yan Sklyarenko