I have this WiX source, which is intended to create a shortcut on the start menu. This is based on the example in the WiX docs at https://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/create_start_menu_shortcut.html#:~:text=How%20To%3A%20Create%20a%20Shortcut%20on%20the%20Start,3%20Tell%20Windows%20Installer%20to%20install%20the%20shortcut
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include $(sys.CURRENTDIR)\Config.wxi?>
<Fragment>
<DirectoryRef Id="dirStartMenuFolder">
<Component Id="cMyShortcut" Guid="my-guid">
<Shortcut Id="shMyShortcut"
Name="MyApp"
Description="My Great App"
Target="[#fMyApp]" WorkingDirectory="dirIniFolder" />
<RegistryValue Root="HKCU" Key="Software\$(var.Manufacturer)\$(var.ProductName)" Name="InstalledMyShortcut" Type="integer" Value="1" KeyPath="yes" />
<RemoveFolder Id="rmStartMenuFolder" Directory="dirStartMenuFolder" On="uninstall" />
</Component>
</DirectoryRef>
</Fragment>
</Wix>
Candle.exe
is OK with this, but Light.exe
complains as follows:
D:...\Installer\Directories.wxs(27) : error LGHT0204 : ICE64: The directory dirStartMenuFolder is in the user profile but is not listed in the RemoveFile table.
I'm a bit dumbfounded by that, because the directory has an explicit <RemoveFolder>
element.
Any ideas?