运行时静默更新应用程序

发布于 2024-10-02 19:08:54 字数 256 浏览 0 评论 0原文

我的应用程序最初将使用 Windows Installer 进行部署。

我正在寻找的解决方案的主要特征包括:

  • 在应用程序运行时支持静默更新 运行(或自动重启 客户端)

  • 易于维护和管理包装 流程

  • 避免复杂的定制或 安装脚本

您对如何实现此目标有什么想法吗?即使这意味着修改应用程序代码以支持任何想法。

应用程序是.net 2.0

My App will be initially deployed with Windows Installer.

The key characteristics of the solution I am looking for include:

  • Support silent update while app is
    running (or automatically restart
    client)

  • Easy to maintain and manage packing
    process

  • Avoid complex customizations or
    installation scripts

Do you have any ideas on how can I achieve this? Even if it means to modify the app code to support any idea.

Application is .net 2.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

平安喜乐 2024-10-09 19:08:54

您是否考虑过使用 ClickOnce 进行部署?它具有以编程方式检查更新并可选择强制安装更新的功能 - 请参阅 http ://msdn.microsoft.com/en-us/library/ms404263.aspx

Have you considered using ClickOnce for deployment? It has a facility to programatically check for updates and optionally force them to be installed - see http://msdn.microsoft.com/en-us/library/ms404263.aspx

幻梦 2024-10-09 19:08:54
  • 您可以使用重新启动管理器(在 Vista 中提供)以静默方式更新您的应用程序和Win7)。
  • 不要忘记用户并不总是管理员。从 Vista 开始,如果您签署 Windows Installer 程序包,您就可以更新应用程序,而无需当前用户的管理员权限。
  • 为了使这一切发挥作用,您需要使用 Windows Installer 技术来安装您的应用程序。您可以使用 Wix 创建 xml 文件并将其编译为 .msi 包。 Wix 与 VS 集成得很好。
  • You can silently update your application by using the Restart Manager (available in Vista and Win7).
  • Don't forget that a user is not alway the administrator. Since Vista if you sign your Windows Installer package you can update the application without needing administrator rights from the current user.
  • For all this to work you need to install your application using the Windows Installer technology. You can use Wix to create an xml file and compile it to an .msi package. Wix integrates nicely with VS.
剩余の解释 2024-10-09 19:08:54

代理设计模式将帮助您实现这一点,而这就是模式用于插件。

另一个简短的解释是使用四人帮 - 代理设计模式

留意卷影复制程序集对于这一技巧绝对有用,当您将更新的程序集影子复制到应用程序程序集文件夹时,您可以使应用程序意识到更改,然后卸载旧程序集并加载新程序集以使更改生效,即,甚至无需重新启动应用程序,这对于最终用户来说是绝对透明的。

更简单的方法可能是 ClickOnce 部署< /code>您可能有兴趣阅读建议的链接。

The Proxy Design Pattern will help you achieve this while this is the pattern used for plugins.

Another short explanation is with the Gang of Four - Proxy Design Pattern.

Having an eye out the Shadow Copying of assemblies is definitely useful for the trick, as you shadow copy your updated assembly to your application assemblies folder, then you can make your application aware of changes, then unload the old assembly and load the new one for the changes to take effect, that is, without even having to restart your application, and this will be absolutely transparent for the end-user.

A more simple approach might be the ClickOnce Deployment which you might be interested to read about following the sugested link.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文