gpt4 book ai didi

installation - 句柄 "Another version of this product is already installed. Installation of this version cannot continue..."

转载 作者:行者123 更新时间:2023-12-02 21:05:01 31 4
gpt4 key购买 nike

我的安装程序有 32 位和 64 位版本,它们具有(几乎)完全相同的代码和自定义操作序列(只有与此问题无关的细微差别)

我希望我的安装程序能够检测它之前是否已安装,并在这种情况下运行我自己的代码,而不是显示默认的 Windows Installer 错误:

Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.

我的 32 位安装程序工作得很好,因为如果我在产品已安装时运行安装程序,它会运行我的自定义代码,但我的 64 位安装程序中的相同代码和自定义操作无法正常工作并且始终显示不需要的错误消息。

CheckPreviousVersion 是在 UI 序列中作为自定义操作调用的第一个函数,我尝试将其放在不同的位置,例如 InstallValidate 之后,但没有任何效果。

我已经检查了详细日志文件,但找不到任何可以解释此行为的内容,以下是日志的一部分:

=== Verbose logging started: 05/03/2013  16:27:20  Build type: SHIP UNICODE 5.00.7601.00  Calling process: C:\Windows\system32\msiexec.exe
===

MSI (c) (0C:94) [16:27:20:331]: Machine policy value 'Debug' is 0 MSI (c) (0C:94) [16:27:20:331]: ******* RunEngine:
******* Product: foo.msi
******* Action:
******* CommandLine: ********** MSI (c) (0C:94) [16:27:21:546]: Machine policy value 'DisableUserInstalls' is 0 MSI (c) (0C:94) [16:27:21:557]: SOFTWARE RESTRICTION POLICY: Verifying package --> 'C:\Builds\.msi' against software restriction policy MSI (c) (0C:94) [16:27:21:557]: Note: 1: 2262 2: DigitalSignature 3:
-2147287038 MSI (c) (0C:94) [16:27:21:557]: SOFTWARE RESTRICTION POLICY: C:\Builds\.msi is not digitally signed MSI (c) (0C:94) [16:27:21:558]: SOFTWARE RESTRICTION POLICY: C:\Builds.msi is permitted to run at the 'unrestricted' authorization level. MSI (c) (0C:94) [16:27:21:584]: Cloaking enabled. MSI (c) (0C:94) [16:27:21:584]: Attempting to enable all disabled privileges before calling Install on Server MSI (c) (0C:94) [16:27:21:586]: End dialog not enabled MSI (c) (0C:94) [16:27:21:586]: Original package ==> C:\Builds\....msi MSI (c) (0C:94) [16:27:21:586]: Package we're running from ==> C:\Builds\.....msi MSI (c) (0C:94) [16:27:21:589]: APPCOMPAT: Uninstall Flags override found. MSI (c) (0C:94) [16:27:21:589]: APPCOMPAT: Uninstall VersionNT override found. MSI (c) (0C:94) [16:27:21:589]: APPCOMPAT: Uninstall ServicePackLevel override found. MSI (c) (0C:94) [16:27:21:589]: APPCOMPAT: looking for appcompat database entry with ProductCode '{B8CBA92E-2140-48AB-B4EA-A4C3FF10295B}'. MSI (c) (0C:94) [16:27:21:589]: APPCOMPAT: no matching ProductCode found in database. MSI (c) (0C:94) [16:27:21:599]: MSCOREE not loaded loading copy from system32 MSI (c) (0C:94) [16:27:21:608]: Machine policy value 'DisablePatch' is 0 MSI (c) (0C:94) [16:27:21:608]: Machine policy value 'AllowLockdownPatch' is 0 MSI (c) (0C:94) [16:27:21:608]: Machine policy value 'DisableLUAPatching' is 0 MSI (c) (0C:94) [16:27:21:608]: Machine policy value 'DisableFlyWeightPatching' is 0 MSI (c) (0C:94) [16:27:21:609]: APPCOMPAT: looking for appcompat database entry with ProductCode '{}'. MSI (c) (0C:94) [16:27:21:609]: APPCOMPAT: no matching ProductCode found in database. MSI (c) (0C:94) [16:27:21:609]: Transforms are not secure. MSI (c) (0C:94) [16:27:21:609]: PROPERTY CHANGE: Adding MsiLogFileLocation property. Its value is 'C:\Builds\Angoss\Products\Workstation\single-exec\INSTALL64.LOG'. MSI (c) (0C:94) [16:27:21:609]: Command Line: CURRENTDIRECTORY=C:\Builds\Angoss\Products\Workstation\single-exec CLIENTUILEVEL=0 CLIENTPROCESSID=7948 MSI (c) (0C:94) [16:27:21:609]: PROPERTY CHANGE: Adding PackageCode property. Its value is '{}'. MSI (c) (0C:94) [16:27:21:609]: Product Code passed to Engine.Initialize: '' MSI (c) (0C:94) [16:27:21:609]: Product Code from property table before transforms: '{}' MSI (c) (0C:94) [16:27:21:609]: Product Code from property table after transforms: '{}' MSI (c) (0C:94) [16:27:21:609]: Product registered: entering maintenance mode MSI (c) (0C:94) [16:27:21:609]: Determined that existing product (either this product or the product being upgraded with a patch) is installed per-machine. MSI (c) (0C:94) [16:27:21:609]: PROPERTY CHANGE: Adding ProductState property. Its value is '5'. MSI (c) (0C:94) [16:27:21:609]: PROPERTY CHANGE: Adding ProductToBeRegistered property. Its value is '1'. MSI (c) (0C:94) [16:27:21:609]: Entering CMsiConfigurationManager::SetLastUsedSource. MSI (c) (0C:94) [16:27:21:609]: Specifed source is already in a list. MSI (c) (0C:94) [16:27:21:609]: User policy value 'SearchOrder' is 'nmu' MSI (c) (0C:94) [16:27:21:609]: Machine policy value 'DisableBrowse' is 0 MSI (c) (0C:94) [16:27:21:609]: Machine policy value 'AllowLockdownBrowse' is 0 MSI (c) (0C:94) [16:27:21:609]: Adding new sources is allowed. MSI (c) (0C:94) [16:27:21:609]: PROPERTY CHANGE: Adding PackagecodeChanging property. Its value is '1'. Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.

最佳答案

此消息通常仅在开发阶段出现,而不是在最终用户计算机上出现。出现该消息的原因是您只修改了包中的资源并重新构建它,没有增加版本号,因此 Windows Installer 会看到计算机上有一个具有相同产品代码和名称的包,但带有不同的包代码。

您的用户永远不会收到此消息,因为我假设您在发布软件包时会增加版本号。这也基于您的函数名称,即“CheckPreviousVersion”。

如果您希望在计算机上发现旧版本时显示自定义消息,请确保您首先安装了旧版本,当前安装了最新版本,但使用了另一个先前构建的软件包(即不同的软件包代码) .

关于installation - 句柄 "Another version of this product is already installed. Installation of this version cannot continue...",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15234879/

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