我想在开始菜单中创建一个子文件夹,在我的情况下,PMFCompanyFolder
已经存在并包含链接,我不想在卸载产品时删除。
所以我不推RemoveFolder
属性,我得到:
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="SoftwareMicrosoftMyCompanyMyProduct" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<Feature Id="ProductFeature" Title="" Level="1">
<ComponentRef Id="PMFProductFolderComponent"/>
</Feature>
您应该传递文件夹id:
<RemoveFolder Id="PMFCompanyFolder" On="uninstall"/>
在卸载时删除它是安全的-预先存在的项目不会被删除。