Inno loading automatic End process plug-in use

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.