应用程序快捷方式,无需固定到Windows 8使用C ++的开始屏幕 [英] App Shortcut without pinning to Start Screen in Windows 8 using C++

查看:118
本文介绍了应用程序快捷方式,无需固定到Windows 8使用C ++的开始屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们公司有一个使用C ++编写的安装程序,使用IShellLink创建程序快捷方式,如下所述:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb776891%28v=vs.85%29.aspx



在Windows 8上,在开始菜单中创建的所有快捷方式也将在开始屏幕上显示为标题。我们要做的是通过程序控制哪些图标显示在开始屏幕上。在下面的文章中,它将选项System.AppUserModel.StartPinOption描述为:


要创建添加应用程序快捷方式,开始屏幕
视图,您可以在快捷方式上设置以下属性:
System.AppUserModel.StartPinOption = 1. 1的符号名称是
APPUSERMODEL_STARTPINOPTION_NOPINONINSTALL。


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



这似乎是可能使用Windows安装程序,但是我没有找到一种方法来实现相同的功能在C ++给出的上下文中以编程方式。


解决方案

如果有任何人有任何相关资讯或某个例子,事情我发现是..新安装字面意思是。即使在删除/更新.lnk文件后,图块的用户自定义也会保留。这可能是一件好事,因为更新不会重置用户的环境,但这意味着我需要在测试期间使用全新安装的Windows 8。我使用VM盒,以减少疼痛。至少我不知道如何从环境中删除一旦设置的属性。


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.

解决方案

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.

这篇关于应用程序快捷方式,无需固定到Windows 8使用C ++的开始屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆