gpt4 book ai didi

.net - 如何使用 .NET 2 System.Configuration.Install 检测更新?

转载 作者:行者123 更新时间:2023-12-01 05:47:52 26 4
gpt4 key购买 nike

我为我的安装程序创建了一个派生自 System.Configuration.Install 的类。
但是当我尝试更新应用程序时,会调用 Uninstall() 中的代码。
如何检测用户是否尝试更新而不是卸载?

也许 this post解释得比我好:

My problem boils down to: when the user performs an update (i.e. double clicks on MyAppVer2.msi when they already have MyAppVer1.msi installed) the Uninstall method inside my Installer is called first, but I have no apparent property to check from inside this method to detect that an update is being performed so that I can branch my code appropriately.

最佳答案

您的安装项目中有一个设置,默认情况下会“卸载”以前的版本,关闭此标志,然后您就不必担心了!

关于.net - 如何使用 .NET 2 System.Configuration.Install 检测更新?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/159513/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com