如何向用户显示安装程序

问题描述:

当用户单击我的应用程序上的更新时,我想显示安装程序. 安装程序驻留在服务器上.

When the user clicks update on my application, I want to show the installer. The installer resides on a server.

向用户显示msi或安装程序的最佳方法是什么?

What is the best way to show msi or installer to the user?

有什么例子吗?

谢谢

首先,您需要将安装包复制到客户端.您可以使用WebClient传输二进制数据或下载.

First of all you need to copy your installation package to the client. You can transfer binary data or download using WebClient.

然后,您可以使用Process.Startmsiexec实用程序

Then you can execute the installation package using Process.Start and msiexec utility

msiexec /quiet /i "c:\myinstallationpackage.msi" // for hidden installation
msiexec /qb /i "c:\myinstallationpackage.msi" // for installation with base steps without any actions from the user
msiexec /i "c:\myinstallationpackage.msi" // usual installation