以下是我的自定义操作列表
<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>
我想在“CloseApp”之后立即执行Action'DirectOldSomeFile'我将如何指定?
答案 0 :(得分:0)
您可以使用序列号而不是前/后属性:
<Custom Action="CloseApp" Sequence="1398" />
<Custom Action="DeleteOldSomeFile" Sequence="1399" />
您可以设置“之前”依赖关系,如下所示:
<Custom Action="CloseApp" Before="DeleteOldSomeFile" />
<Custom Action="DeleteOldSomeFile" Before="InstallValidate" />