设置其他进程的应用程序用户模型ID
我有一个启动器应用程序可以启动另一个应用程序。为了使其他应用程序能够与 Windows 7 的任务栏完美配合,我必须设置 应用程序用户模型 ID。
通常,一个进程必须通过调用 SetCurrentProcessExplicitAppUserModelID() 为自己设置此 id,但在这种特定情况下,我无法控制其他应用程序的启动代码,因此我必须在外部设置此 ID,最好使用某种 ShellExecute它将 ID 传递给应用程序。
这可能吗?
I have a launcher app that starts another app. For the other App to play nicely with Windows 7's taskbars, I have to set the Application User Model ID.
Usually a process has to set this id for itself, by calling SetCurrentProcessExplicitAppUserModelID(), but in this specific case I do not have control about the other apps startup code, so I have to set this externally, at best by using some kind of ShellExecute which passes the ID to the app.
Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果 Windows 不调用 SetCurrentProcessExplicitAppUserModelID,它将自动为进程生成一个 id,这对于最近的文件跳转列表部分来说应该足够了。
如果您出于某种原因确实想为第 3 方应用程序设置特定 id,我会尝试其中之一(我没有尝试过这些建议中的任何一个),
Windows will auto generate a id for the process if it does not call SetCurrentProcessExplicitAppUserModelID, this should be enough for the recent files jumplist section.
If you for whatever reason really want to set a specific id for a 3rd party app, I would try one of these (I have not tried any of these suggestions)