2016-08-05 50 views
0

後,執行下面是我的自定義操作維克斯工具箱另一個自定義操作

<CustomAction Id="LaunchApp" Directory="INSTALLDIR" Return="ignore" ExeCommand="[SystemFolder]cmd.exe /C start somefile.exe" /> 
      <CustomAction Id="CloseApp" Directory="LocalAppDataFolder" Return="ignore" ExeCommand="[SystemFolder]taskkill.exe /F /IM app.exe /t" /> 
      <CustomAction Id="LaunchUninstallPrompt" Directory="dir3D8C2B6BEC447DDCC50D1386BD4CD865" ExeCommand="[SystemFolder]cmd.exe /C start /wait %LOCALAPPDATA%/runtime/bin/java -jar" Return="check" Impersonate='no'/> 
      <CustomAction Id="DeleteOldSomeFile" Directory="LocalAppDataFolder" ExeCommand="[SystemFolder]cmd.exe /C IF EXIST %LOCALAPPDATA%\someproj (
      del %LOCALAPPDATA%\someproj\*.* /s /q 
     rmdir %LOCALAPPDATA%\someproj /s /q 
    )" Return="ignore"/> 

列表,這裏是我安裝最新的序列

<InstallExecuteSequence> 
      <Custom Action="CloseApp" Before="InstallValidate" /> 
      <Custom Action="LaunchApp" After="InstallFinalize">NOT REMOVE</Custom> 
      <Custom Action="LaunchUninstallPrompt" Before="InstallValidate">REMOVE AND NOT UPGRADINGPRODUCTCODE</Custom> 
     </InstallExecuteSequence> 

我希望行動「DeleteOldSomeFile」被之後執行「 CloseApp「我將如何指定?

回答

0

您可以使用序列號,而不是前/後的屬性:

<Custom Action="CloseApp" Sequence="1398" /> 
<Custom Action="DeleteOldSomeFile" Sequence="1399" /> 

你可以像這樣的依賴關係 「之前」 設置:

<Custom Action="CloseApp" Before="DeleteOldSomeFile" /> 
<Custom Action="DeleteOldSomeFile" Before="InstallValidate" />