自动升级msi文件 [英] Automatic Upgradation of msi file

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

问题描述





如何通过visual studio 2008定制设置和部署项目。实际上我想要

包括自动升级功能。像Skype一样,每当我们的产品有新版本可用时,它应该会显示一个弹出窗口

此产品的更新版本可用。你想立即安装......是或者没有。

如何做到这一点。请通过视觉工作室给我任何想法或步骤。



问候,

Kirti

Hi,

How to customized the setup and deployment project through visual studio 2008.Actually i want
to include automatic up gradation feature .Means like Skype ,whenever a new version of our product will available it should display a popup window
"A updated version of this product is available.Do you want to install now ...yes or no ".
How to do this .Please give me any idea or steps to do this through visual studio.

With Regards,
Kirti

推荐答案

首先,我建议你考虑一下你真正想要的东西,使用改进问题小部件并添加更多信息。 什么和如何必须完成取决于你的需求,可能非常非常不同。我会给你一些要澄清的要点。



如果你想这样做,那么我会说它几乎与安装程序无关。



一种可能性是在后台创建一个服务,一直检查新的更新,但我认为这不是一个好主意(我个人不认为就像软件那样)。我认为应该放在程序的InitInstance中,因此它会在启动时检查可用的更新。



一旦你知道是否有新的更新或不,您开始下载新版本的例程。下载后,软件的运行实例应该关闭。如果你想让它自动化,你应该跟踪文件的下载位置。



现在开始棘手的部分,难度与你的愿望成正比,以及如何安装了软件。



如果所有的软件文件都在同一个文件夹中(对于中小型软件是最好的选择)并且你不想定制安装,这是最简单的方法。运行更新程序,检查以前的版本,删除旧版本,安装新版本。



如果软件在操作系统的系统文件夹中有一些文件或如果你想跟踪已安装的组件,然后提供定制升级的可能性......这将很难。



评论后添加1

请仔细阅读。我告诉过你了。您希望在新的更新可用时弹出窗口,因此:

1)创建一个将在自动启动时执行并保留在后台的服务,每天检查(假设)2次,如果有新的更新。

2)如果有新的更新,生成弹出窗口下载

3)下载时,跟踪文件保存的路径

4)一旦下载,检查程序是否正在运行并关闭它是否

5)(可选)卸载以前的版本(注意其他常见文件)软件)

6)安装你的新版本(如果你没有做第5步,请覆盖你以前的版本)



之后添加评论2

创建Windows服务 [ ^ ]
First of all, I would suggest you to think about what you really want, use the "improve question" widget and add more information. "What" and "How" has to be done depends a lot on your needs and can be very, very different. I'll give you some points to be clarified.

If you want to do that, then I would say it has almost nothing to do with the installator.

One possibility is to create a service in background checking all the time for new updates, but I don't think it is a good idea (I personally don't like software doing that). I think that should be placed at the InitInstance of the program, so it checks for an available update, when starting up.

Once you know if there is a new update or not, you start the routine to download the new version. Once downloaded, the running instance of the software should close. If you want it automated, then you should keep track of where the file was downloaded.

Now starts the tricky part, difficulty is directly proportional to you wishes and how the software is installed.

If all the software-files are in the same folder (for tiny and middle software is the best option) and you don't want a customized install, that's the easiest way. Run the updater, check for previous versions, delete the old one, install the new one.

If the software has some files in the system folder of the operating system or if you want to keep track of installed components and then give the possibility of customized upgrade... that's going to be hard.

Addition after comment 1
Please read carefully. I have told you the steps. You want to popup a window whenever a new update is available, so:
1) create a service that will be executed at autostart and remain in background, checking (let's say) 2 times a day, if there is new update.
2) If new update available, generate pop-up to download
3) When downloading, keep track of the path where the file is being saved
4) once downloaded, check if the programm is running and shut it down if yes
5) (optional) Uninstall your previous version (watch out with common files to other softwares)
6) install your new version (overwriting your previous if you didn't make Step 5)

Addition after comment 2
Create Windows Service[^]


这篇关于自动升级msi文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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