Inno Setup Simple setup Script

Source: Internet
Author: User
;
Script generated by the Inno Setup Script Wizard. ;

See the documentation for DETAILS on CREATING inno SETUP SCRIPT files! #define MYAPPNAME "xxx Software" #define myappversion "1.1.0" #define Myapppublisher "XXX Co., Ltd." #define MYAPPURL "http://www.xxx. com/"#define MYAPPEXENAME" xxx software. exe "; The folder path where the Mysourcepath program is located #define MYSOURCEPATH "D:\Projects\XXX software \bin\release" [Setup];
Note:the value of AppId uniquely identifies this application. ;
The same AppId value in installers for other applications. ; (to generate a new GUID, click Tools |
Generate GUID inside the IDE.) APPID={{B9FB449D-761A-4A35-B874-807E55DBCDD7} appname={#MyAppName} appversion={#MyAppVersion}; appvername={#MyAppName} {#MyAppVersion} apppublisher={#MyAppPublisher} apppublisherurl={#MyAppURL} appsupporturl={ #MyAppURL} appupdatesurl={#MyAppURL};D efaultdirname={pf}\{#MyAppName} default installation path C:\Program Files defaultdirname =d:\xx x software \;D Isableprogramgrouppage If the key is set to Yes, the Setup program will not display the Select Program Group Wizard page. In this case, it will be used by the [Setup]The group name specified by the Defaultgroupname keyword of the segment, or "(Default)" If no group name is specified disableprogramgrouppage=yes; Usepreviousappdir is yes (the default) and Setup discovers that an earlier version of the same application was installed, which replaces the default directory name with the previously selected directory Usepreviousappdir=yes Outputdir=d:\inno Out Exe;D isabledirpage valid value: Yes or no default: No description: If the item is set to Yes, Setup will not display the Select Destination Folder Wizard page.
In this case, it will always use the default directory name. Disabledirpage=no outputbasefilename=xxx software _ver{#MyAppVersion} Compression=lzma solidcompression=yes; The uninstall information that is displayed in Control Panel Uninstallable=yes uninstalldisplayname={#MyAppName} {#MyAppVersion} Uninstalldisplayicon ={# Mysourcepath}\ico\uninstall.ico; The name of the folder in the Start menu, default defaultgroupname={#MyAppName} [Languages] name: "Chi"; Messagesfile: "COMPILER:DEFAULT.ISL" [Tasks] Name: "Desktopicon"; Description: "{Cm:createdesktopicon}"; Groupdescription: "{cm:additionalicons}"; flags:unchecked [Files] Source: "{#MySourcePath}\{#MyAppExeName}"; DestDir: "{app}"; Flags:ignoreversion Source: "{#MySourcePath}\*"; DestDir: "{app}"; Flags:ignoreversion Recursesubdirs Createallsubdirs; Note:don ' t use "Flags:ignoreversion" on any shared system files {#MyAppName} [Icons] Name: "{group}\{cm:uninstallprogram,}"; Filename: "{uninstallexe}" Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks:desktopicon [Run] Filename: "{app}\{#MyAppExeName}"; Description: "{cm:launchprogram,{#StringChange (myappname, ' & ', ' && ')}}"; Flags:nowait postinstall skipifsilent [Files] Source: "{#MySourcePath}\psvince.dll";
Flags:dontcopy noencryption [Code]//install to determine if the program is running function ismoduleloaded (modulename:ansistring): Boolean;
External ' ismoduleloaded@files:psvince.dll stdcall ';
function Initializesetup (): boolean;
var Isapprunning:boolean;
   Begin Result: = true;
    Begin result:= true;//Setup continues isapprunning:= ismoduleloaded (' {#MyAppExeName} '); While isapprunning does begin if MsgBox (' Setup detects that {#MyAppExeName} is running. ' #13 #13 ' you must close it and then click OK to continue with the installation, otherwise press Cancel to exit. ', Mbconfirmation, Mb_okcancel) = IDOK THEN begin isapprunning:= ismoduleloaded (' {#MyAppExeName} ') Result:
         = true;
         End else begin isapprunning:= false; Result:= false;
         The installation program exits exit;
       End
     End
End


 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.