繁体   English   中英

Wix / MSI-静默模式下的重大升级

[英]Wix/MSI - Major Upgrade in silent mode

我有一个具有以前版本升级支持的安装程序:

<Product Id="*" 
   Name="$(var.ProductName)" 
   Language="1033" 
   Version="$(var.InstallerVersion)" 
   Manufacturer="$(var.Manufacturer)" 
   UpgradeCode="$(var.UpgradeCode)">

<Upgrade Id="$(var.UpgradeCode)">
  <UpgradeVersion Minimum="$(var.InstallerVersion)" IncludeMinimum="no" OnlyDetect="yes" Property="NEWERVERSIONFOUND" />
  <UpgradeVersion Minimum="5.0.0" IncludeMinimum="yes" Maximum="$(var.InstallerVersion)" IncludeMaximum="yes" Property="OLDERVERSIONFOUND" MigrateFeatures="yes" />
  <UpgradeVersion Minimum="0.0.0" IncludeMinimum="yes" Maximum="5.0.0" IncludeMaximum="no" Property="OLDESTVERSIONFOUND" MigrateFeatures="yes" />
</Upgrade>

<InstallExecuteSequence>
  <Custom Action="SetReInstallProperty" After="FindRelatedProducts">OLDERVERSIONFOUND OR OLDESTVERSIONFOUND</Custom>
  <Custom Action="SetReInstallModeProperty" After="FindRelatedProducts">OLDERVERSIONFOUND OR OLDESTVERSIONFOUND</Custom>
  <RemoveExistingProducts After="InstallInitialize">OLDERVERSIONFOUND OR OLDESTVERSIONFOUND</RemoveExistingProducts>

当我在UI模式下通过旧版4.2运行此安装程序时,升级工作正常。 但是,当我使用/ q在静默模式下运行它时,它将在维护模式下运行并尝试自行卸载。

这是日志的一部分:

MSI (s) (EC:00) [10:49:44:999]: PROPERTY CHANGE: Adding ACTION property. Its value is 'INSTALL'.
MSI (s) (EC:00) [10:49:44:999]: Doing action: INSTALL
Action start 10:49:44: INSTALL.
MSI (s) (EC:00) [10:49:44:999]: Running ExecuteSequence
MSI (s) (EC:00) [10:49:45:000]: Doing action: FindRelatedProducts
Action start 10:49:45: FindRelatedProducts.
MSI (s) (EC:00) [10:49:45:000]: PROPERTY CHANGE: Adding OLDESTVERSIONFOUND property. Its value is '{16DF8961-26DE-4A05-B759-102976C5EA22}'.
MSI (s) (EC:00) [10:49:45:000]: PROPERTY CHANGE: Adding MIGRATE property. Its value is '{16DF8961-26DE-4A05-B759-102976C5EA22}'.
MSI (s) (EC:00) [10:49:45:001]: Doing action: SetReInstallModeProperty
Action ended 10:49:45: FindRelatedProducts. Return value 1.
Action start 10:49:45: SetReInstallModeProperty.
MSI (s) (EC:00) [10:49:45:001]: Doing action: SetReInstallProperty
Action ended 10:49:45: SetReInstallModeProperty. Return value 1.
MSI (s) (EC:00) [10:49:45:001]: PROPERTY CHANGE: Adding REINSTALL property. Its value is 'all'.

...

MSI (s) (EC:00) [10:49:47:605]: Doing action: MigrateFeatureStates
Action ended 10:49:47: ReadNCPExtensions. Return value 1.
MSI (s) (EC:00) [10:49:47:605]: Migrating feature settings from product(s) '{16DF8961-26DE-4A05-B759-102976C5EA22}'
Action start 10:49:47: MigrateFeatureStates.
MSI (s) (EC:00) [10:49:47:606]: Doing action: InstallValidate
Action ended 10:49:47: MigrateFeatureStates. Return value 1.
Action start 10:49:47: InstallValidate.
MSI (s) (EC:00) [10:49:47:606]: PROPERTY CHANGE: Deleting MsiRestartManagerSessionKey property. Its current value is '0c59f7d17b575b409c4f5593caddd7f9'.
MSI (s) (EC:00) [10:49:47:606]: Feature: MainFeature; Installed: Absent;   Request: Null;   Action: Null
MSI (s) (EC:00) [10:49:47:606]: Component: C.Name1.dll; Installed: Absent;   Request: Null;   Action: Null
MSI (s) (EC:00) [10:49:47:606]: Component: C.Name2.dll; Installed: Absent;   Request: Null;   Action: Null

...

MSI (s) (EC:00) [10:49:47:621]: PROPERTY CHANGE: Adding REMOVE property. Its value is 'ALL'.
MSI (s) (EC:00) [10:49:47:622]: Doing action: SetARPINSTALLLOCATION
Action ended 10:49:47: InstallValidate. Return value 1.
MSI (s) (EC:00) [10:49:47:622]: PROPERTY CHANGE: Adding ARPINSTALLLOCATION property. Its value is 'C:\Program Files (x86)\SmartDrive Systems Inc\SmartDrive Data Forwarding Gateway\'.
Action start 10:49:47: SetARPINSTALLLOCATION.
MSI (s) (EC:00) [10:49:47:622]: Doing action: InstallInitialize
Action ended 10:49:47: SetARPINSTALLLOCATION. Return value 1.
MSI (s) (EC:00) [10:49:47:622]: Machine policy value 'AlwaysInstallElevated' is 0
MSI (s) (EC:00) [10:49:47:622]: User policy value 'AlwaysInstallElevated' is 0
MSI (s) (EC:00) [10:49:47:622]: BeginTransaction: Locking Server
MSI (s) (EC:00) [10:49:47:623]: SRSetRestorePoint skipped for this transaction.
MSI (s) (EC:00) [10:49:47:623]: Server not locked: locking for product {D097B768-E833-4511-A1F6-E51BD1A02258}
Action start 10:49:47: InstallInitialize.
MSI (s) (EC:00) [10:49:47:936]: Doing action: RemoveExistingProducts
Action ended 10:49:47: InstallInitialize. Return value 1.
MSI (s) (EC:00) [10:49:47:937]: Skipping RemoveExistingProducts action: current configuration is maintenance mode or an uninstall
Action start 10:49:47: RemoveExistingProducts.
MSI (s) (EC:00) [10:49:47:937]: Doing action: ProcessComponents
Action ended 10:49:47: RemoveExistingProducts. Return value 0.
Action start 10:49:47: ProcessComponents.
MSI (s) (EC:00) [10:49:47:938]: Doing action: UnpublishFeatures
Action ended 10:49:47: ProcessComponents. Return value 1.
Action start 10:49:47: UnpublishFeatures.
MSI (s) (EC:00) [10:49:47:938]: Doing action: StopServices
Action ended 10:49:47: UnpublishFeatures. Return value 1.
Action start 10:49:47: StopServices.
MSI (s) (EC:00) [10:49:47:939]: Doing action: DeleteServices
Action ended 10:49:47: StopServices. Return value 1.
Action start 10:49:47: DeleteServices.

两个安装程序中的主要功能名称均不同。 当我将新版本中的功能名称更改为与4.2中的功能名称相同时,升级将以静默方式运行,但会以类似的日志在UI模式下停止工作:MigrateFeatureState之后,所有组件均处于已安装状态:缺少; 请求:空; 行动:空和删除设置为全部。 任何想法为什么它如此奇怪?

我设置的主要功能名称与旧安装程序中的名称相同,并且删除了自定义操作SetReinstallProperty,并且升级现在可以在两种模式下进行。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM