安装项目的困难 [英] Difficulties with Setup Project

查看:61
本文介绍了安装项目的困难的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图在安装项目中了解安装/卸载的机制。在我看来,安装一个新项目将完全卸载以前的版本,并安装新版本。

这是一个真正的痛苦,因为我只想更新应用程序,并且真的很想做到没有删除所有已安装的现有文件,并且不提示用户选择再次安装应用程序的位置。

除了使用外部安装构建器之外,我无法找到解决方法,而且我会如果可能的话,我真的很想避免

解决方案

如果我理解你的话,你正试图摆脱弹出的对话框告诉用户卸载现有的安装此版本之前的版本。

如果这样,我很久以前就遇到了类似的问题。解决方案很简单,只需增加安装程序的版本号,并确保在安装项目中设置以下属性;


  1. DetectNewerInstalledVersion = true

  2. RemovePreviousVersions = true



至于删除目录中的文件,如Jack建议的那样,如果要安装文件并希望它们保留,请标记他们是永久的。如果文件是从您的应用程序创建的,例如备份或错误日志,则在卸载应用程序时,默认情况下会将这些文件保留在那里。搜索结果


I'm trying to get my head around the mechanics of Install / Uninstall in the setup project. It seems to me that Installing a new project will uninstall the previous version completely, and install the new version.

This is a real pain as i only want to update the application, and would really like to do it without removing all the existing files that are installed, and without prompting the user to choose where to install the application again.

I can't figure out a way around this besides using an external install builder, and i'd really like to avoid that if possible.

解决方案

If I'm understanding you right, you are trying to get rid of the dialog that pops up telling the user to uninstall the existing version before installing this version.

If thats right, I had a similar problem not to long ago. The solution is simple just increment the version number on your installer and make sure the following properties are set on your Setup project;


  1. DetectNewerInstalledVersion = true

  2. RemovePreviousVersions = true



As far as the removing files that are in the directory, like Jack suggested, if you are installing the files and you want them to remain, flag them as Permanent. If the files are created from your app, such as backups or error logs, when you uninstall the application it will leave those files there by default.


这篇关于安装项目的困难的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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