A more complete Inno setup script, added to the INI file settings, a package of common features are available.[Plain] view plaincopy [setup] ; Note: The value of appid is to identify the application separately. ; do not use the same AppID values for other installers. ; (Generate a new GUID, click Tool | To generate a GUID in the IDE.) ) appid={{a9861883-31c5-4324-bd9a-dc3271eeb675} ; program name appname=issample Version number appvername=issample 1.0.0.0 , publisher name apppublisher=hkiss RELATED LINKS apppublisherurl=http://zwkufo.blog.163.com appsupporturl=http:// zwkufo.blog.163.com appupdatesurl=http://zwkufo.blog.163.com ; default installation directory defaultdirname={pf}\issample ; default Start menu name defaultgroupname=issample ; open-> Optional installation Start menu item ; allownoicons=yes ; installation protocol ; Licensefile=c:\example\ Original file \agreement.txt The text file that was viewed before installation infobeforefile=c:\example\ original file \ setup_new.txt ; View text files infoafterfile=c:\example\ original files \setup_old.txt ; output Folders outputdir=c:\example\innosetup\out ; output file name outputbasefilename=setup Installation icon setupiconfile=c:\example\ original file \title.ico ; installation needs to enter password ; password=123 ; encryption=yes Compression related compression=lzma solidcompression=yes allows users to ignore selection language related showlanguagedialog = yes memo version Information Versioninfocompany=http://www. hkiss.com versioninfodescription=issample Enhanced version versioninfoversion=1.0.0.0 versioninfocopyright=copyright (C) 2007-2008 Hkiss production Choice language [languages] name: "CHS"; messagesfile: "COMPILER:DEFAULT.ISL" ; LICENSEFILE&NBSP: "C:\Example\ original document \chs\agreement.txt" name: "en"; messagesfile: " COMPILER:LANGUAGES\ENGLISH.ISL "; LICENSEFILE&NBSP: "C:\Example\ original file \en\agreement. txt " user Customized tasks [tasks] name: " Desktopicon "; description: ' {Cm:createdesktopicon} '; groupdescription: ' {cm:additionalicons} '; flags: unchecked name: "Quicklaunchicon"; description: "{Cm:createquicklaunchicon}"; groupdescription: "{cm:additionalicons}"; flags: unchecked Name: "Tasks_1" ; description: "User-defined Task 1"; flags: unchecked name: "Tasks_2" ; Description: "User-defined Task 2"; flags: unchecked , custom tasks that are selected for components name: "Tasks_3" ; description: "User-defined Task 3"; components: c1 ; flags: unchecked File Installation [files] Multi-language installation environment settings Public parameters languages to set up source: "C:\Example\ original files \ Enfile.txt "; destdir: " "{app}"; languages: en ; flags: ignoreversion source: "C:\Example\ original file \chsfile.txt"; destdir: "{app}"; languages: chs ; flags: ignoreversion user-defined tasks Tasks source: "C:\Example\ Original file \tasks\tasks_1.txt "; destdir: " {app}\tasks "; flags: ignoreversion ; tasks : tasks_1 source: "C:\Example\ original file \tasks\tasks_2.txt"; destdir: "{ App}\tasks "; flags: ignoreversion ; tasks :tasks_2 source: "C:\Example\ original file \tasks\tasks_components.txt"; destdir: " {App}\tasks "; flags: ignoreversion ; tasks :tasks_2 user-defined component installation source: "C:\Example\ original file \components\components_1.txt" ; destdir: "{app}\components"; flags: ignoreversion ; components: a1; source: "C:\Example\ original file \components\components_2.txt"; destdir: "{app}\components"; Flags: ignoreversion&nbSP;; Components: a2; source: "C:\Example\ original document \components\components_3.txt"; destdir : "{app}\components"; flags: ignoreversion ; components: a3; Source: "C:\Example \ Original file \components\components_4.txt"; destdir: "{app} \components"; flags: ignoreversion ; components: a1 a2 a3; User registers a custom DLL file regserver Registration noregerror do not display error messages source: "C:\ Example\ Original file \jmail.dll "; destdir: " {app} "; flags: ignoreversion regserver ; Add Readme file source: "C:\Example\ original file \issample.txt"; destdir: "{app}"; flags: ignoreversion add a file to the cached folder {tmp} deleteafterinstall after installation delete source: "C:\ Example\ The original file \test.exe "; destdir: " {tmp} "; flags: ignoreversion deleteafterinstall &Nbsp; source: "C:\Example\ original file \issample.chm"; destdir: "{app}"; flags: ignoreversion source: "C:\Example\ original file \issample.exe"; destdir: "{app}"; flags: ignoreversion source: "C:\Example\ original file \issample.dll"; destdir: "{app}"; flags: ignoreversion source: "C:\Example\ original file \issample.ini"; destdir: "{app}"; Flags: ignoreversion source: "C:\Example\ original file \issample.rar"; destdir: "{ App} "; flags: ignoreversion source: " C:\Example\ original file \issample_sys.dll "; destdir : "{win}\system32"; flags: ignoreversion source: "C:\Example\ original file \log\*"; destdir: "{App}\log"; flags: ignoreversion recursesubdirs createallsubdirs ; Note: do not use "flags: ignoreversion" installation type settings on any shared system files [types] Name: full ;D escription: "Fully Installed"; flags: iscustom name: compact ;D escription: "Simple Installation"; name: custom; description: "Custom Install"; Component installation [components] name: c1; description: "custom Task 3" ; Types: Full name: a1; description: "Install Components_1"; types: full compact custom ; Name: a2; Description: "Install components_2"; types : full compact name: a3; description: "Install Components_3"; types : full Start menu, desktop shortcuts [icons] name: "{group}\issample"; filename: "{app}\ ISsample.exe " name: " {group}\{cm:programontheweb,issample} "; filename: " http:// Zwkufo.blog.163.com " name: " {group}\{cm:uninstallprogram,issample} "; filename: " { Uninstallexe} "   name: "{commondesktop}\issample"; filename: "{App}\issample.exe"; tasks: desktopicon name: "{userappdata}\microsoft\internet explorer\quick launch\issample"; filename: "{App}\issample.exe"; tasks: quicklaunchicon ; add a Help text block Name: {group}\ISsample 1.0.0.0 Help documentation; filename: {app}\issample.chm used to execute programs Common and run main programs before the program is installed before the installer displays the final dialog box Show Readme file Delete temporary file [run] filename: "{App}\issample.exe"; description: "{cm:launchprogram,issample}"; flags: nowait postinstall skipifsilent filename: "{app}\issample.txt"; description: "View display Readme File"; flags: postinstall skipifsilent shellexec Change the message text displayed in the program [messages] Beveledlabel=hkiss Technology Uninstall dialog box Description confirmuninstall= You really want to uninstall Issamp from your computer%n%n Press [is] to completely remove %1 and all of its components;%n Press [No] let the software stay on your computer . ; define decompression Instructions ; Statusextractfiles= extract and copy the main program files and related library files ... to create, modify or delete the INI file health value [ini] in the user's system filename: "{App}\cfg.ini"; section: "Startup options"; flags: uninsdeletesection filename: "{app}\cfg.ini"; section: "Startup Options"; key: "Server ip"; string: "127.0.0.1" filename: "{App}\cfg.ini"; section: "Startup options"; key: "Server port"; string: "8080" for creating, modifying, or deleting registry health [registry] root: hklm ; in a user's system Subkey: "Software\issample"; Valuetype:dword; Valuename:config; valuedata:10 ; flags:uninsdeletevalue in Execute script [code] //global variable var myprogchecked : boolean; //Judge whether the procedure exists Initial Chinese program event Function initializesetup (): boolean; var isbl: boolean; //declaration Variable var isstr: string; begin //start isbl := true; //variable assignment isstr := ' Welcome '; If regvalueexists (hkey_local_machine, ' software\issample ', ' config ') then begin msgbox (' installed, please uninstall in install ', MBCONFIRMATION, MB_OK); isbl := false; end else begin //msgbox (' No value ', MBCONFIRMATION, MB_OK); isbl := true; end; //Below is a troublesome conditional statement end else Note / /if mSgbox (isstr, mbconfirmation, mb_okcancel) = IDOK then //begin / / isbl := true; // msgbox (' executed ',  MBCONFIRMATION, MB_OK); /end else //begin // isbl := false; //MsgBox (' Executed ', MBCONFIRMATION, MB_OK); //end; result := isbl; End ; //End procedure curstepchanged (curstep: tsetupstep); var isstr :string; begin if CurStep= ssinstall then //prior to actual installation call begin //msgbox (' curstepchanged: Call before actual installation ', mbconfirmation, mb_okcancel); Call end; after //installation is complete if curstep= Sspostinstall then begin isstr := expandconstant (' {tmp}\ Tmp.rar '); // if fileexists (isstr) then // begin // msgbox (' file Presence ', MBCONFIRMATION, MB_OK); // end else // begin // msgbox (' File not present ', MBCONFIRMATION, MB_OK); // end; // msgbox (' curstepchanged: Call after actual installation ', mbconfirmation, mb_okcancel); end; end; //Next button button Event Function nextbuttonclick (Curpageid: integer): boolean; var ResultCode: integer; var issetup : boolean; begin IsSetup := True ; case curpageid of wpSelectDir: msgbox (' Nextbuttonclick: ' #13 #13 ' you selected: ' + WizardDirValue + '. ',  MBINFORMATION, MB_OK); //wizarddirvalue path wpSelectProgramGroup: msgbox (' Nextbuttonclick: ' #13 #13 ' you selected: ' + wizardgroupvalue + '. ',  MBINFORMATION, MB_OK); //Start Menu name wpready: begin if not regvalueexists (hkey_local_machine, ' software\test ', ' config ') then begin if msgbox (' Program execution needs test.ext, whether to install! ',  MBCONFIRMATION, MB_YESNO) = idYes then begin extracttemporaryfile (' Test.exe '); if not exec (Expandconstant (' {tmp}\test.exe '), ' ', ', sw_shownormal, ewwaituntilterminated, resultcode) then msgbox (' Test.exe error: ' #13 #13 ' ' + syserrormessage (resultcode) + '. ',  MBERROR, MB_OK); end else begin IsSetup := false ; end ; &nBsp; bringtofrontandrestore (); end; end; end; result := IsSetup; end;