我有以下情况。
我的产品将二进制文件安装在内部c:\Program Files (x86)\MyCompany\MyApp\
,并在C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MyCompany
.
我使用这个很好的例子构建了 msi:https ://helgeklein.com/blog/2014/09/real-world-example-wix-msi-application-installer/
我刚刚添加了以下代码
<!-- ApplicationShortcut-->
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="!(loc.ManufacturerName)">
<Component Id="ApplicationShortcut" Guid="F4B7EAFA-FF19-41B4-8267-3AEFC12235A7">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="!(loc.ApplicationName)"
Description="!(loc.ProductDescription)"
Target="[INSTALLDIR]MyApp.exe"
WorkingDirectory="INSTALLDIR"
/>
<RemoveFolder Id="RemoveApplicationProgramsFolder" Directory="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\!(loc.ManufacturerName)\!(loc.ApplicationName)" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</Directory>
</Directory>
问题如下
- 我第一次安装应用程序,它会安装快捷方式就好了
- 现在我启动应用程序并选择
Pin to taskbar, this will create a shortcut in
C:\Users\\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar` - 如果我重建 msi 并再次执行设置,任务栏快捷方式不再可点击,因为
C:\Users\<user>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
缺少快捷方式
是否可以在更新期间维护任务栏快捷方式?