gpt4 book ai didi

wix - Windows Installer 错误 1316。安装程序查找错误的文件名

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

我正在尝试为我的应用程序实现以下 self 更新机制:如果有更新可用,我的应用程序会下载(WiX 生成的)MSI 包并使用任意名称将其写入其 AppData 文件夹。然后应用程序通过调用启动更新过程

msiexec /fvomus "<ArbitraryName>.msi" /qn /L "<ArbitraryName>.msi.log" REINSTALL=ALL REINSTALLMODE=vomus

有了这个,我得到一个错误 1316,然后安装以错误状态 1603 终止。

MSI 的原始文件名为 CCWirelessServer.msi,但正如我之前所说,我的应用程序使用任意名称编写安装程序包,例如 ba17b82d-0ab8-4fc9-aea8 -62830042d49f.msi。现在我注意到 Windows Installer 出于某种原因正在寻找 CCWirelessServer.msi 文件,而不是寻找正确的临时文件名。您可以在下面的日志中看到这一点。

为什么 Windows Installer 不使用我通过命令行提供的文件名?是我的命令行参数有问题还是安装程序包有问题?

这是日志:

=== Logging started: 24.02.2014  09:16:30 ===
Action start 09:16:30: INSTALL.
Action start 09:16:30: FindRelatedProducts.
Action ended 09:16:30: FindRelatedProducts. Return value 0.
Action start 09:16:30: ValidateProductID.
Action ended 09:16:30: ValidateProductID. Return value 1.
Action start 09:16:30: CostInitialize.
Action ended 09:16:30: CostInitialize. Return value 1.
Action start 09:16:30: FileCost.
Action ended 09:16:30: FileCost. Return value 1.
Action start 09:16:30: CostFinalize.
Action ended 09:16:30: CostFinalize. Return value 1.
Action start 09:16:30: MigrateFeatureStates.
Action ended 09:16:30: MigrateFeatureStates. Return value 0.
Action start 09:16:30: InstallValidate.
Action ended 09:16:30: InstallValidate. Return value 1.
Action start 09:16:30: RemoveExistingProducts.
Action ended 09:16:30: RemoveExistingProducts. Return value 0.
Action start 09:16:30: InstallInitialize.
Action ended 09:16:30: InstallInitialize. Return value 1.
Action start 09:16:30: ProcessComponents.
Action ended 09:16:30: ProcessComponents. Return value 1.
Action start 09:16:30: UnpublishFeatures.
Action ended 09:16:30: UnpublishFeatures. Return value 1.
Action start 09:16:30: RemoveRegistryValues.
Action ended 09:16:30: RemoveRegistryValues. Return value 1.
Action start 09:16:30: RemoveShortcuts.
Action ended 09:16:30: RemoveShortcuts. Return value 1.
Action start 09:16:30: CAUninstallAsService.
Action ended 09:16:30: CAUninstallAsService. Return value 1.
Action start 09:16:30: RemoveFiles.
Action ended 09:16:30: RemoveFiles. Return value 1.
Action start 09:16:30: InstallFiles.
Action ended 09:16:30: InstallFiles. Return value 1.
Action start 09:16:30: CAInstallAsServiceRollback.
Action ended 09:16:30: CAInstallAsServiceRollback. Return value 1.
Action start 09:16:30: CAInstallAsService.
Action ended 09:16:30: CAInstallAsService. Return value 1.
Action start 09:16:30: CreateShortcuts.
Action ended 09:16:30: CreateShortcuts. Return value 1.
Action start 09:16:30: WriteRegistryValues.
Action ended 09:16:30: WriteRegistryValues. Return value 1.
Action start 09:16:30: RegisterUser.
Action ended 09:16:30: RegisterUser. Return value 0.
Action start 09:16:30: RegisterProduct.
MSI (s) (4C:50) [09:16:30:406]: Product: Wireless Server -- Error 1316. A network error occurred while attempting to read from the file: C:\ProgramData\MyCompanyName\Wireless Server\Updates\CCWirelessServer.msi

Error 1316. A network error occurred while attempting to read from the file: C:\ProgramData\MyCompanyName\Wireless Server\Updates\CCWirelessServer.msi
Action ended 09:16:30: RegisterProduct. Return value 3.
Action ended 09:16:30: INSTALL. Return value 3.
MSI (s) (4C:50) [09:16:30:419]: Windows Installer reconfigured the product. Product Name: Wireless Server. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: MyCompanyName. Reconfiguration success or error status: 1603.

=== Logging stopped: 24.02.2014 09:16:30 ===

编辑 1:

只是为了验证问题是否出在任意文件名上,我尝试使用安装程序的原始文件名编写更新包,并且成功了!

最佳答案

不支持尝试更改 MSI 的文件名和执行次要升级。见:

Windows Installer Best Practices

Keep package names and package codes consistent.

The .msi file can be given any name that helps users identify the package, but the name should not be changed without also changing the product code.

•Give your .msi file a user-friendly name that enables the user to identify the contents of the Windows Installer package.

•The product code is the principal identification of an application and must change whenever there is a comprehensive update to the application. For information, see ProductCode and Changing the Product Code. Changing the name of the application's .msi file is considered a comprehensive change and always requires a corresponding change of the product code to maintain consistency.

•The package code is the primary identifier used by the installer to search for and validate the correct package for a given installation. No two nonidentical .msi files should ever have the same package code. If a package is changed without changing the package code, the installer may not use the newer package if both are still accessible to the installer. The package code is stored in the Revision Number Summary Property of the Summary Information Stream.

•Note that letters in product code and package code GUIDs must all be uppercase.

Changing the Product Code

The product code must be changed if any of the following are true for the update:

•Coexisting installations of both original and updated products on the same system must be possible.

•The name of the .msi file has been changed.

•The component code of an existing component has changed.

•A component is removed from an existing feature.

•An existing feature has been made into a child of an existing feature.

•An existing child feature has been removed from its parent feature.

Why does changing the name of your MSI file require a Major Upgrade?

关于wix - Windows Installer 错误 1316。安装程序查找错误的文件名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21982496/

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