本文介绍了通过Internet更新MSI安装的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过Internet更新MSI安装的最佳方法是什么?

What is the best way to update an MSI installation over the internet?

ClickOnce不支持MSI.

ClickOnce doesn't support MSIs.

我需要以与Windows更新相同的方式通过Internet自动进行更新.

I need the update to occur automatically over the internet, in the same manner as Windows updates occur.

理想情况下,我希望我的应用程序自动检测到有可用更新,然后下载并安装.

Ideally, I would want my application to automatically detect that an update is available and download it and install it.

答案仅应处理MSI的安装.我不介意是否需要安装Windows服务来监视更新.

Answers should only deal with MSIs installations. I don't mind if there needs to be a Windows Service installed to monitor for updates.

推荐答案

这是我最近为客户做的事情:

Here's what I've done for a customer recently:

用户界面以登录用户身份运行.

The UI is running as the logged on User.

该服务正在作为系统运行.该服务检查内容并将其下载到临时目录.然后,它使用/JM命令播发MSI.现在,非特权用户可以安装该安装程序.

The service is running as System. The service checks for content and downloads it to a temp directory. It then advertises the MSI using the /JM command. The installer can now be installed by the non-priviledged user.

该服务将IPC消息发送到应用程序,表明该安装了.该应用程序启动安装程序,并向其传递一个标志,指示重新启动该应用程序.该应用程序退出以释放锁定的文件.

The service sends an IPC message to the application saying that it's time to install. The application kicks off the installer passing it a flag that indicates to restart the application. The application the quits releasing the locked files.

在安装程序结束时,该标志使安装程序重新启动应用程序.

At the end of the installer the flag causes the installer to relaunch the application.

还可以看看wuw4库.它有助于创建很多这种解决方案.

Also take a look at the wuw4 library. It helps in creating a lot of this solution.

这是一个复杂的模式,但效果很好.我拥有一家可以协助您制定此解决方案的公司. :)

This is a complex pattern but works very well. I own a company that can assist you in making this solution. :)

这篇关于通过Internet更新MSI安装的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 07:37