Search code examples
c#wixwindows-installerwix3.8

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


I have found similar issues listed on StackOverflow but I've not been able to get those suggested fixes to work. Please see the code section below. I'm new at this and I'm not sure what I'm missing. I was trying to follow the examples on in the WIX documentation. Thank you for your help.

<Fragment>
 <Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
   <Directory Id="INSTALLFOLDER" Name="MedusaPerf" />
  </Directory>
  <Directory Id="ProgramMenuFolder">
   <Directory Id="ApplicationProgramsFolder" Name="MedusaPerf"/>
  </Directory>
 </Directory>
</Fragment>

<Fragment>
 <DirectoryRef Id="ApplicationProgramsFolder">
  <Component Id="ApplicationShortcut" Guid="*">
   <Shortcut Id="ApplicationStartMenuShortcut"
             Name="MedusaPerf"
             Description="MedusaPerf multi-query stress test tool."
             Target="[#MedusaPerfApp.exe]"
             WorkingDirectory="INSTALLFOLDER"/>
   <RemoveFolder Id="RemoveProgramFilesFolder" 
                 Directory="ProgramFilesFolder" On="uninstall"/>
   <RemoveFolder Id="RemoveApplicationProgramsFolder" 
                 Directory="ApplicationProgramsFolder" On="uninstall"/>
   <RegistryValue Root="HKCU" Key="Software\Microsoft\MedusaPerf" 
                  Name="installed" Type="integer" Value="1" KeyPath="yes"/>
  </Component>
</DirectoryRef> 
</Fragment>

Solution

  • I had a co-worker look at the code and he found I was not utilizing the ApplicationShortcut component. Adding the following to the Component Group resolved my issue:

    <ComponentRef Id="ApplicationShortcut" />