[Delphi] InnoSetup : 설치 시 강제로 프로세스 죽이기

[Files]

Source: "progtest.exe"; DestDir: "{app}"; BeforeInstall: TaskKill(progtest.exe)


[Code]

procedure TaskKill(FileName: String);

var

  ResultCode: Integer;

begin


    Exec(ExpandConstant('taskkill.exe'), '/f /im ' + '"' + FileName + '"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);


end;