App Shortcut without pinning to Start Screen in Windows 8 using C++

只愿长相守 提交于 2020-01-03 09:08:53

问题


Our company has an installer written in C++ that creates program shortcuts using IShellLink as described in: http://msdn.microsoft.com/en-us/library/windows/desktop/bb776891%28v=vs.85%29.aspx

On Windows 8 all shortcuts created in the Start Menu will also show as titles on the Start Screen. What we're looking to do is programmically control which icons are shown on the Start Screen. In the following article it describes the option "System.AppUserModel.StartPinOption" as:

To create add an app shortcut without pinning it to the Start screen view, you can set the following property on the shortcut: System.AppUserModel.StartPinOption = 1. The symbolic name for 1 is APPUSERMODEL_STARTPINOPTION_NOPINONINSTALL.

http://msdn.microsoft.com/en-us/library/windows/desktop/jj673981%28v=vs.85%29.aspx

This appears to be possible using the Windows Installer, however I haven't found a way to accomplish the same functionality programmatically in C++ given our context.

If anyone has any information about this, or an example of some sort, it would be much appreciated.


回答1:


One thing I found was that "..NewInstall" literally means that. User customizations to the tiles seem to be retained even after you delete/update the .lnk files. This is probably a good thing as updates won't reset the user's environment, but it does mean that I needed to use fresh installs of Windows 8 during testing. I used a VM box to minimize the pain. At least I don't know how to delete the properties once set from within the environment.



来源:https://stackoverflow.com/questions/13362685/app-shortcut-without-pinning-to-start-screen-in-windows-8-using-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!