在 Windows 7 中将广告快捷方式固定在任务栏上
我的应用程序使用 Windows 开始菜单中公布的快捷方式启动。这意味着该快捷方式不会直接链接到我的 exe,尽管该 exe 最终是运行的。
我的问题是:当我右键单击 Windows 7 任务栏中的快捷方式并选择固定到任务栏,然后启动我的应用程序时,我最终在任务栏中出现两个图标。 (因此正在运行的应用程序不会重复使用现有的任务栏图标。)有谁知道如何解决此问题?
不幸的是,选择使用广告而不是直接的快捷方式并不取决于我。
顺便说一下,在 Windows 7 中还有另一种将程序固定到任务栏的方法:右键单击正在运行的应用程序的图标。如果我这样做,我不会得到重复的图标,所以我相当确定问题出在广告的快捷方式上。
谢谢, 艾米
My application launches using an advertised shortcut in the Windows Start Menu. This means the shortcut doesn't link directly to my exe, though the exe is ultimately what runs.
My problem is: when I right click the shortcut in the Windows 7 taskbar and select Pin to Taskbar, and then launch my application, I end up with two icons in the taskbar. (So the running app does not re-use the existing taskbar icon.) Does anyone know how to fix this?
Unfortunately, the choice of using an advertised rather than a direct shortcut is not up to me.
By the way, there is another way to pin a program to the taskbar in Windows 7: right click the icon of the running application. If I do it this way, I don't end up with the duplicate icons, so I'm fairly certain the problem is the advertised shortcut.
Thanks,
Amy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这种情况下,您需要使用显式的 AppUserModelID。创建快捷方式时,您可以指定 AppUserModelID。同时你还需要在以下地方指定相同的AppUserModelID:所有正在运行的窗口或进程、文件关联、跳转列表。
有关 AppUserModelID 的更多信息,您可以参考 http://msdn .microsoft.com/en-us/library/dd378459(VS.85).aspx。
In this case you need to use explicit AppUserModelID. When you create the shortcut you can specify AppUserModelID. At the same time you also need to specify the same AppUserModelID at the following places: all running windows or process, file association, jumplist.
For more information about AppUserModelID you can reference http://msdn.microsoft.com/en-us/library/dd378459(VS.85).aspx.