windows安装脚本,在安装后和卸载前分别发送安装和卸载日志

This commit is contained in:
luoliangyi 2022-06-30 17:51:28 +08:00
parent e1a9323888
commit 2ffa7d8c8f
1 changed files with 13 additions and 1 deletions

View File

@ -76,6 +76,17 @@ SubKeyName := 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{7076DC53-5C
end;
end;
function InitializeUninstall(): Boolean;
var
ErrorCode: Integer;
bRes: Boolean;
begin
if not ShellExec('', ExpandConstant('{app}\HuagoScanUpgrade.exe'), '-type=postuninstallinfo -src=package -desc=uninstall', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
begin
end;
Result := true;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpFinished then
@ -93,4 +104,5 @@ begin
end;
[Run]
Filename: "{app}\HuagoScan.exe"; Description: "{cm:LaunchProgram, {#MyAppName}}"; Flags: postinstall nowait skipifsilent
Filename: "{app}\HuagoScanUpgrade.exe"; Parameters:"-type=postinstallinfo -src=package -desc=install"
Filename: "{app}\HuagoScan.exe"; Description: "{cm:LaunchProgram, {#MyAppName}}"; Flags: postinstall nowait