使用C#.net升级MSI文件 [英] Upgrading msi file using C#.net

查看:171
本文介绍了使用C#.net升级MSI文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我试图在互联网上找到一些信息,但似乎找不到关于此的任何教程.

基本上,当有人安装我的应用程序时,我会检查他们何时运行该应用程序,以查看是否有可用的更新.如果有可用更新,它将下载并运行新的MSI文件. (全部完成).

我遇到的问题是,当您运行新的MSI文件时,我无法获取它来实际升级程序.由于更改了版本号,因此我在安装文件中将版本号从3.0更改为4.0,然后选择是"以更新ProductCode.我将RemovePreviousVersions设置为True,并将DetectNewerInstalledVersion设置为True.

我是否遗漏了任何东西,或者是否有人知道描述该操作方法的文章?

Hi All
I have tried to find some information on the internet but can''t seem to find any tutorials on this.

Basically when someone install my application I will have it check when they run the application to see if there is a update available. If there is a update available it will download and run the new MSI file. (This is all done).

The problem I am having is when you run the new MSI file, I can not get it to actually upgrade the program. I have changed the Version number from 3.0 to 4.0 in the setup file and then select yes to update the ProductCode since I changed the version number. I have RemovePreviousVersions set at True and DetectNewerInstalledVersion to True.

Am I missing anything or does someone know of a article that describes how to do this?

推荐答案

UpgradeCode必须始终相同,而ProductCode必须在新版本中进行更改.
我在Visual Studio 2010中使用了它,并且效果很好.
UpgradeCode must always be identical, where ProductCode must change on new builds.
I use this under Visual Studio 2010, and it work just fine.


这篇关于使用C#.net升级MSI文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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