Benutzerdefinierte Aktionen auf Installieren ODER Major Upgrade

Ich habe eine Wix-installer für einige TopShelf services bin ich bereitstellen. Wie Konfiguriere ich eine komplette deinstallation & re-installieren, während ein major upgrade?

Derzeit habe ich ein stimmiges UPGRADECODE, eine inkrementelle VERSION und so:

<MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />

<InstallExecuteSequence>

  <!-- always run configure/install/start after installation OR after upgrading -->
  <Custom Action="ConfigureFor" Before="InstallFinalize">(NOT INSTALLED OR UPGRADINGPRODUCTCODE)</Custom>
  <Custom Action="InstallExporter" After="ConfigureFor">(NOT INSTALLED OR UPGRADINGPRODUCTCODE)</Custom>
  <Custom Action="StartExporter" After="InstallExporter">(NOT INSTALLED OR UPGRADINGPRODUCTCODE)</Custom>
  <Custom Action="InstallScheduler" After="ConfigureFor">(NOT INSTALLED OR UPGRADINGPRODUCTCODE)</Custom>
  <Custom Action="StartScheduler" After="InstallScheduler">(NOT INSTALLED OR UPGRADINGPRODUCTCODE)</Custom>

  <!-- always run stop/uninstall before uninstallation OR before upgrading -->
  <Custom Action="StopExporter" Before="UninstallExporter">(INSTALLED OR UPGRADINGPRODUCTCODE)</Custom>
  <Custom Action="StopScheduler" Before="UninstallScheduler">(INSTALLED OR UPGRADINGPRODUCTCODE)</Custom>
  <Custom Action="UninstallExporter" After="InstallInitialize">(INSTALLED OR UPGRADINGPRODUCTCODE)</Custom>
  <Custom Action="UninstallScheduler" After="InstallInitialize">(INSTALLED OR UPGRADINGPRODUCTCODE)</Custom>

</InstallExecuteSequence>

Das problem scheint zu sein, dass die benutzerdefinierte Aktion ConfigureFor, aufgerufen wird, während der deinstallation Teil eines major-upgrade...

Action start 17:36:08: INSTALL.
Action start 17:36:08: FindRelatedProducts.
Action ended 17:36:08: FindRelatedProducts. Return value 0.
Action start 17:36:08: AppSearch.
Action ended 17:36:08: AppSearch. Return value 1.
Action start 17:36:08: LaunchConditions.
Action ended 17:36:08: LaunchConditions. Return value 1.
Action start 17:36:08: ValidateProductID.
Action ended 17:36:08: ValidateProductID. Return value 1.
Action start 17:36:08: CostInitialize.
Action ended 17:36:08: CostInitialize. Return value 1.
Action start 17:36:08: FileCost.
Action ended 17:36:08: FileCost. Return value 1.
Action start 17:36:08: CostFinalize.
Action ended 17:36:08: CostFinalize. Return value 1.
Action start 17:36:08: MigrateFeatureStates.
Action ended 17:36:08: MigrateFeatureStates. Return value 0.
Action start 17:36:08: InstallValidate.
Action ended 17:36:22: InstallValidate. Return value 1.
Action start 17:36:22: RemoveExistingProducts.
Action ended 17:36:22: RemoveExistingProducts. Return value 0.
Action start 17:36:22: InstallInitialize.
Action ended 17:36:22: InstallInitialize. Return value 1.
Action start 17:36:22: SetUninstallExporter.
Action ended 17:36:22: SetUninstallExporter. Return value 1.
Action start 17:36:22: SetStopExporter.
Action ended 17:36:22: SetStopExporter. Return value 1.
Action start 17:36:22: SetUninstallScheduler.
Action ended 17:36:22: SetUninstallScheduler. Return value 1.
Action start 17:36:22: SetStopScheduler.
Action ended 17:36:22: SetStopScheduler. Return value 1.
Action start 17:36:22: ProcessComponents.
Action ended 17:36:22: ProcessComponents. Return value 1.
Action start 17:36:22: UnpublishFeatures.
Action ended 17:36:22: UnpublishFeatures. Return value 1.
Action start 17:36:22: RemoveRegistryValues.
Action ended 17:36:22: RemoveRegistryValues. Return value 1.
Action start 17:36:22: RemoveFiles.
Action ended 17:36:22: RemoveFiles. Return value 1.
Action start 17:36:22: InstallFiles.
Action ended 17:36:22: InstallFiles. Return value 1.
Action start 17:36:22: WriteRegistryValues.
Action ended 17:36:22: WriteRegistryValues. Return value 1.
Action start 17:36:22: RegisterUser.
Action ended 17:36:22: RegisterUser. Return value 0.
Action start 17:36:22: RegisterProduct.
Action ended 17:36:22: RegisterProduct. Return value 1.
Action start 17:36:22: PublishFeatures.
Action ended 17:36:22: PublishFeatures. Return value 1.
Action start 17:36:22: PublishProduct.
Action ended 17:36:22: PublishProduct. Return value 1.
Action start 17:36:22: SetConfigureFor.
Action ended 17:36:22: SetConfigureFor. Return value 1.
Action start 17:36:22: ConfigureFor.
Action ended 17:36:22: ConfigureFor. Return value 1.
Action start 17:36:22: SetInstallExporter.
Action ended 17:36:22: SetInstallExporter. Return value 1.
Action start 17:36:22: InstallExporter.
Action ended 17:36:22: InstallExporter. Return value 1.
Action start 17:36:22: SetStartExporter.
Action ended 17:36:22: SetStartExporter. Return value 1.
Action start 17:36:22: StartExporter.
Action ended 17:36:22: StartExporter. Return value 1.
Action start 17:36:22: SetInstallScheduler.
Action ended 17:36:22: SetInstallScheduler. Return value 1.
Action start 17:36:22: InstallScheduler.
Action ended 17:36:22: InstallScheduler. Return value 1.
Action start 17:36:22: SetStartScheduler.
Action ended 17:36:22: SetStartScheduler. Return value 1.
Action start 17:36:22: StartScheduler.
Action ended 17:36:22: StartScheduler. Return value 1.
Action start 17:36:22: InstallFinalize.
CAQuietExec:  The term 'c:\Program Files (x86)\Sunshine\configureFor.ps1' is not recognized a
CAQuietExec:  s the name of a cmdlet, function, script file, or operable program. Check the s
CAQuietExec:  pelling of the name, or if a path was included, verify that the path is correct
CAQuietExec:   and try again.
CAQuietExec:  At line:1 char:2
CAQuietExec:  + & <<<<  'c:\Program Files (x86)\Sunshine\configureFor.ps1' -environment   > '
CAQuietExec:  c:\Program Files (x86)\Sunshine\configureFor.log.txt'
CAQuietExec:      + CategoryInfo          : ObjectNotFound: (c:\Program File...onfigureFor.p 
CAQuietExec:     s1:String) , CommandNotFoundException
CAQuietExec:      + FullyQualifiedErrorId : CommandNotFoundException
CAQuietExec:   
CAQuietExec:  Error 0x80070001: Command line returned an error.
CAQuietExec:  Error 0x80070001: CAQuietExec Failed
CustomAction ConfigureFor returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 17:36:25: InstallFinalize. Return value 3.
Action ended 17:36:26: INSTALL. Return value 3.

Habe ich aktualisiert meine Konfiguration oben. dies ist, was ich bin derzeit mit. Im Grunde, was wir brauchen, um passieren wird:

  • immer ausführen, konfigurieren/installieren/starten nach der installation ODER nach dem Upgrade
  • immer run stop/deinstallieren vor der deinstallation ODER vor dem Upgrade

Auf weitere Tests. Es erscheint wie ConfigureFor ist laufen die ganze Zeit, auch während der "RemovePreviousProducts" phase - Warum ist es nicht respektieren meine Bedingungen?

InformationsquelleAutor mwjackson | 2012-11-15
Schreibe einen Kommentar