启动子进程和 Windows 7 任务栏 [英] Launching a Child Process and the windows 7 taskbar

查看:35
本文介绍了启动子进程和 Windows 7 任务栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个应用程序,它使用 Laucher.exe 进程进行自我更新,该进程从服务器复制新的 App.exe 和 DLL,然后在单独的进程中运行它们.

We have an application that self-updates using a Laucher.exe process which copies down new App.exe and DLLs from a server then runs them in a separate process.

在 Windows 7 任务栏到来之前,这一切都运行良好......

This was all working very well until the arrival of the Windows 7 taskbar...

问题出在 Windows 7 中,如果用户将 Launcher.exe 固定到任务栏(通过右键单击 Launcher.exe 的快捷方式),则会发生这种情况...当您启动程序时,固定"任务栏图标会在启动器运行时暂时获得焦点,但在 App.exe 运行时会出现一个完全独立的新图标.如果用户随后决定右键单击正在运行的 App.exe 中的图标并将其固定到任务栏,则他们会绕过该过程的应用程序更新部分.

Problem is in Windows 7, if the user pins the Launcher.exe to the task bar (by right-clicking the shortcut to Launcher.exe) then this happens... When you start the program the "pinned" taskbar icon momentarily gets focus while the launcher is running but then a totally separate new icon appears when App.exe is running. If the user then decides to right click the icon from the running App.exe and pin that to the taskbar, they bypass the application update part of the process.

我们尝试过的事情...我们已经考虑让 Launcher.exe 加载 App.exe 程序集并在 Launcher.exe 进程中运行它,但这还有一些其他问题...... Launcher.exe 是 .NET 2 我认为它无法加载.NET 4 程序集集,将来我们将 App.exe 升级到 .net 4 或 .net 5 等时......

Things we've tried to far... We have looked into making the Launcher.exe load the App.exe assembly and run it inside the Launcher.exe process but this has a few other issues… Launcher.exe is .NET 2 I don’t think it will be able to load a .NET 4 set of assemblies when in the future we upgrade the App.exe to .net 4 or .net 5 etc…

我们目前正在研究使用 ApplicationUserModelID 来帮助解决这个问题,但这对我们来说是一个新领域......进展缓慢......

We are currently investigating using ApplicationUserModelIDs to help with this but this is a new area for us.. progress is slow...

有什么想法吗?... 都感激地收到了.

Any ideas? ... all gratefully recieved.

推荐答案

ApplicationUserModelIDs 是我们最终使用的,确实是简单的解决方案,效果很好.

ApplicationUserModelIDs is what we used in the end, simple solution really and works well.

这篇关于启动子进程和 Windows 7 任务栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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