Inno loading automatic End process plug-in useSeptember 21, 2013 ⁄ general ⁄ a total of 1355 characters ⁄ font size small medium big ⁄ comments off
[Code]
Determine if a process is running before installation, Istask.dll files together with packaged EXE files
function RunTask (filename:string; bfullpath:boolean): Boolean;
External '[email protected]: ISTask.dll stdcall delayload ';
function Killtask (exefilename:string): Integer;
External '[email protected]: ISTask.dll stdcall delayload ';
function Initializesetup (): Boolean;
Begin
result:= true;
If RunTask (' {#MyAppExeName} ', false) then
Begin
If MsgBox (' InstallThe program detected {#MyAppName} is running! ' #13 ' #13 ' click ' Yes ' button to close the program and continue installation; ' #13 ' #13 ' click No ' to exit the installation! ', mbconfirmation, mb_yesno) = Idyes Then
Begin
Killtask (' {#MyAppExeName} ');
result:= true;
End
Else
Result:= false;
End
else result:= true;
End;
//To determine if the process is running
function Runtasku (filename:string; bfullpath:boolean): Boolean;
External ' [email protected] {app} /istask.dll stdcall delayload uninstallonly ';
Function Killtasku (exefilename:string): Integer;
External ' [email protected] {app}/istask.dll stdcall delayload uninstallonly ';
Function Initializeuninstall (): Boolean;
BEGIN
result:= true;
if Runtasku (' {#MyAppExeName} ', false) then
begin
if MsgBox (' Uninstaller detected {#MyAppName} is running! ' #13 ' #13 ' click ' Yes ' button to close the program and proceed with uninstallation; ' #13 ' #13 ' click No ' to exit Uninstall! ', mbconfirmation, mb_yesno) = Idyes then
begin
Killtasku (' {#MyAppExeName} ');
result:= true;
End
else
result:= false;
End
else
result:= true;
Unloaddll (Expandconstant (' {app}/istask.dll '));
End
Inno loading automatic End process plug-in use