When Inno Setup is installed or uninstalled, it determines whether the program is running. When the installation is complete, the web page script is automatically opened.

Source: Internet
Author: User
[Code] var errorcode: integer; isrunning: integer; // determines whether the client is running the function initializesetup (): Boolean; begin result: = true; // Installation Program Continue isrunning: = findwindowbywindowname ('dongfang broadband network TV '); While isrunning <> 0 do begin if msgbox (' the installer detects that the client is running. '#13 # 13' you must first close it and then click "yes" to continue the installation, or press "no" to exit! ', Mbconfirmation, mb_yesno) = IDNO then begin result: = false; // The installer exits isrunning: = 0; end else begin result: = true; // The installer continues isrunning: = findwindowbywindowname ('dongfang broadband network TV '); end; // determines whether the client is running the function initializeuninstall (): Boolean; begin result: = true; // The installer continues isrunning: = findwindowbywindowname ('dongfang broadband network TV '); While isrunning <> 0 do begin if msgbox ('installer detects that the client is running. '#13 # 13' you must first close it and then click "yes" to continue the installation, or press "no" to exit! ', Mbconfirmation, mb_yesno) = IDNO then begin result: = false; // The installer exits isrunning: = 0; end else begin result: = true; // The installer continues isrunning: = findwindowbywindowname ('dongfang broadband network TV '); end; Procedure curuninstallstepchanged (curuninstallstep: tuninstallstep); begin case curuninstallstep of usuninstall: Begin // start to uninstall end; uspostuninstall: begin // uninstall completed // msgbox ('curuninstallstepchanged: '#13 #13' uninstall just finished. ', mbinformation, mb_ OK );//... insert code to perform post-uninstall tasks here... shellexec ('open', 'HTTP: // www.baidu.com ', '','', sw_shownormal, ewnowait, errorcode); end;

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.