This article Reprinted from: http://blog.csdn.net/augusdi/article/details/8564810
The icons option defines all shortcuts created in the Start menu and \ or other locations (such as the desktop. An example is as follows:
[Setup] ; Global settings, this section is required Appname = test Appvername = test Defaultdirname = "E: \ test" Appversion = 1.0 [Files] Source: "F: \ Desktop \ ipmsg.exe"; destdir: "{app }" [Icons] Name: "{userdesktop} \ "; filename: "{app} \ ipmsg. EXE"; workingdir: "{app }" |
Note the following options in the icons section:
Name: the name and location of the shortcut to be created. In the previous example, a shortcut icon named "Flying Pigeon book" will be created on the current user's desktop. This option is required.
Filename: Specifies the name of an executable line file, that is, the executable file specified by the parameter. This is the ipmsg.exe file, which is required.
Parameters: an optional command line parameter for shortcuts. If you are writing an executable file in the command line mode, you can pass parameters using this option, this option is not required for general executable files.
Workingdir: Specifies the directory in which the program starts to run.
Hotkey: shortcut key (or shortcut key) settings, which can be used to start the program.
Comment: Specifies the comment (or description) object of the shortcut. When you move the mouse over the shortcut, a yellow window is displayed, which is generally the description of the program.
Iconfilename: name of the custom icon file to be displayed. This can be an executable file like .exe or. dll, or a. ICO file. By default, the icon of the original executable file is used.
Iconindex: the zero-based icon Index Used in the specified file. This is because some icons can be stored in. DLL files, such as the shell32.dll file in the operating system, are saved with more than 100 icons. If iconfilename specifies the file (usually in the c: \ windows \ system32 directory ), the iconindex specifies which icon to use.
The following is a script for more options:
[Setup] ; Global settings, this section is required Appname = test Appvername = test Defaultdirname = "E: \ test" Appversion = 1.0 [Files] Source: "F: \ Desktop \ ipmsg.exe"; destdir: "{app }" [Icons] Name: "{userdesktop} \ "; filename: "{app} \ ipmsg. EXE "; workingdir:" {app} "; iconfilename: {sys} \ shell32.dll; iconindex: 12; Comment:" My shortcuts" |
After installation, the desktop icon is as follows:
The attribute window clearly shows the items corresponding to our settings.