2013-12-19 7 views
1

У меня есть пара пользовательских действий, которые перемещают некоторые устаревшие файлы в каталог temp и еще один, который запускается, если установщик откатывается назад, чтобы вернуть их обратно. Я должен использовать настраиваемое действие, потому что предыдущим установщиком был installshield.Как передать свойства для отмены пользовательских действий в wix?

Ниже приведены мои пользовательские действия:

<CustomAction Id="DeleteUserAdminDeprecatedFiles" BinaryKey="FileSearchCA" DllEntry="DeleteUserAdminDeprecatedFiles" Execute="immediate" Return="check" /> 

    <CustomAction Id="RestoreDeprecatedFiles" 
        BinaryKey="FileSearchCA" 
        DllEntry="RestoreDeprecatedFiles" 
        Execute="rollback" 
        Return="ignore" 
       /> 

    <CustomAction Id="SetRollbackData" Property="RestoreDeprecatedFiles" Value="RootDir=[DEPRECATEDFILESROOTDIR];TempDir=[DEPRECATEDTEMPORARYDIR]" Execute="immediate" Return="ignore"/> 

Ниже приводится расписание этих действий:

  <Custom Action="SetRollbackData" After="DeleteUserAdminDeprecatedFiles"> 
      OLD_VERSION_FOUND OR      <!--Run if we are doing a major upgrade (msi -> msi).--> 
      REMOVEINSTALLSHIELD 
     </Custom> 
     <Custom Action="DeleteUserAdminDeprecatedFiles" Before="InstallFinalize"> 
      OLD_VERSION_FOUND OR      <!--Run if we are doing a major upgrade (msi -> msi).--> 
      REMOVEINSTALLSHIELD       <!--Run if we are upgrading installshield instance.--> 
     </Custom> 
     <Custom Action="RestoreDeprecatedFiles" After="InstallInitialize"/> 

Тогда в журнале я получаю:

MSI (s) (04:74) [11:31:22:162]: Doing action: DeleteUserAdminDeprecatedFiles 
Action 11:31:22: DeleteUserAdminDeprecatedFiles. 
Action start 11:31:22: DeleteUserAdminDeprecatedFiles. 
MSI (s) (04:3C) [11:31:22:171]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI8804.tmp, Entrypoint: DeleteUserAdminDeprecatedFiles 
SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSI8804.tmp-\ 
SFXCA: Binding to CLR version v4.0.30319 
Calling custom action FileSearchCA!FileSearchCA.FileSearchCA.DeleteUserAdminDeprecatedFiles 
Starting UserAdmin delete deprecated files Custom Action. 
MSI (s) (04!50) [11:31:22:376]: PROPERTY CHANGE: Adding DEPRECATEDFILESROOTDIR property. Its value is 'C:\Program Files\Duck Creek Technologies\ExampleUserAdmin\bin'. 
MSI (s) (04!50) [11:31:22:380]: PROPERTY CHANGE: Adding DEPRECATEDTEMPORARYDIR property. Its value is 'C:\Users\LMUser\AppData\Local\Temp\t3n1evfp.dwa'. 
Action ended 11:31:22: DeleteUserAdminDeprecatedFiles. Return value 1. 
MSI (s) (04:74) [11:31:22:429]: Doing action: SetRollbackData 
Action 11:31:22: SetRollbackData. 
Action start 11:31:22: SetRollbackData. 
MSI (s) (04:74) [11:31:22:437]: Note: 1: 2723 2: SetRollbackData 
DEBUG: Error 2723: Custom action SetRollbackData specifies unsupported type 

Любая помощь в решении этой было бы высоко оценено.

ответ

0

Я идиот, я исправился.

мне пришлось изменить:

<CustomAction Id="SetRollbackData" Property="RestoreDeprecatedFiles" Value="RootDir=[DEPRECATEDFILESROOTDIR];TempDir=[DEPRECATEDTEMPORARYDIR]" Execute="immediate" Return="ignore"/> 

To:

<CustomAction Id="SetRollbackData" Property="RestoreDeprecatedFiles" Value="RootDir=[DEPRECATEDFILESROOTDIR];TempDir=[DEPRECATEDTEMPORARYDIR]" />