(Switch) Inno Setup entry (4) -- create a desktop shortcut for the program

Source: Internet
Author: User

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.

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.