gpt4 book ai didi

wix - 带刻录的条件卸载包

转载 作者:行者123 更新时间:2023-12-04 04:45:47 24 4
gpt4 key购买 nike

我创建了一个应用程序并使用 WiX 对其进行了打包。但是这个应用程序需要一个先决条件,比如 SQL CE 3.5。然后我使用 Burn 创建了一个 boostrapper。要求是如果之前没有安装在用户的计算机中,它只会安装 SQL CE。

我遇到的问题是,即使它没有安装(因为它已经安装),如果我卸载我的应用程序,它也会卸载 SQL CE。我该如何解决这个问题?

这是代码:

<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Classes\Installer\Products\PACKED_GUID" Value="Version" Variable="SQLCE_Installed" Result="exists" />

<Chain>
<MsiPackage Id="PkgA" SourceFile="PkgA.msi" DisplayInternalUI="yes" Visible="yes" InstallCondition="SQLCE_Installed" />

编辑:

bootstrap 只有在它自己安装时才应该删除先决条件 SQL CE。这样(伪代码):
function install() {
if isPrereqInstalled = false {
call installPreReq()
boolean bootstrapperInstalledApp = true
}
}
function uninstall() {
if bootstrapperInstalledApp = true {
call uninstallPreReq()
call uninstallMyApp()
} else {
call uninstallMyApp()
}
}

最佳答案

将包上的永久设置为"is"

<MsiPackage SourceFile="Enclosing1_1.msi" Id="Enclosing" Permanent="yes" Vital="no" Visible="yes">

关于wix - 带刻录的条件卸载包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18207833/

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