UsuallyInnoThe icon of the generated installation file is a CD and a display, such. At the same time,ProgramAfter installation, the uninstall program icon in the installation directory is the same. In fact, you can modify it yourself.
First generate the installation file icon. This is relatively simple.SetupYou can add the corresponding statement to the Section:
Setupiconfile = jiong. ICO |
This statement specifies the icon of the output file. If the icon is not in the same directory as the script, you must provide the complete path.
Then there is the uninstall program icon. In fact, after compiling a program that contains the preceding replacement statement and installing it, you will find that the uninstallation program is replaced by the installation program icon, the installer automatically replaces the icon. The problem is, what should I do if I want to install different icons? The implementation method is as follows:
1.Prepare the icon file and the script in the agreed directory.
2.UseUpdateicon. dllPlug-ins
3.AddCodeSegment,CodeAs follows:
[Code] //Plug-in function usage /// parameter : handle ( parent handle of the plug-in error dialog box ), EXE full file path name , (exe file to be replaced ) icon Resource Name , full path name of the icon file , (exe where the icon resource to be replaced is located ) language //Return Value:Successful= TR,Failed= False Function updateicon (const hwnd: integer; const exefilename, exeicon, icofilename: string; wlangid: DWORD): Boolean; External 'updateicon @ files: updateicon. dll stdcall '; //Replace the uninstall program icon Function updateuninsticon (const icofilename: string): Boolean; Begin //TheEXEIf the file path name is left blank, the plug-in will be replaced automatically.InnoUninstall program icon,Other parameters are similar! Result: = updateicon (mainform. Handle, '','', icofilename, 0 ); //Replace the uninstall icon End; Procedure curstepchanged (curstep: tsetupstep ); VaR Sicon: string; Begin //Note::Replace the uninstall program icon, which must be before the uninstall program is generated! //The format and size of the installation icon are the same as that of the uninstall icon. Otherwise, the uninstall program may fail! If curstep = ssinstall then Begin Sicon: = expandconstant ('{TMP} \ Uninstall. ICO ');//Define the uninstall icon Extracttemporaryfile (extractfilename (Sicon ));//Release uninstall icon //TheEXEIf the file path name is left blank, the plug-in will be replaced automatically.InnoUninstall the program icon! Updateuninsticon (Sicon );//Replace the uninstall icon End; End; |
After compilation, you can. The output file and installed directory are as follows:
Installation File
Installation Directory
From: http://www.360doc.com/content/13/0327/14/4221543_274246432.shtml