Inno Setup Introduction (iv)--Create desktop shortcuts for programs

Source: Internet
Author: User

Icons This optional shortcut defines all the shortcuts created in the Start menu and \ or other locations (such as the desktop). An example is as follows:

[Setup]

Global settings, this paragraph must be

Appname=test

Appvername=test

Defaultdirname= "E:\TEST"

appversion=1.0

[Files]

Source: "F:\desktop\ipmsg.exe"; DestDir: "{app}"

[Icons]

Name: "{The userdesktop}\ flies the Pigeon biography book"; Filename: "{app}\ipmsg. EXE "; Workingdir: "{app}"

Note Some of the options in the icons section:

Name: The names and locations of the shortcuts to be created, in the example above, will create a shortcut icon named "Flying Pigeon Biography" on the current user's desktop, which is a mandatory option.

FileName: The command-line file name of the shortcut, which is the actual executable that the shortcut points to, here is the Ipmsg.exe file, which is required.

Parameters: Optional command-line arguments to the shortcut, if you are writing a command-line executable file, the amount can pass parameters through this option, which is not required by the generic executable file.

Workingdir: The work (or startup) directory of a shortcut indicates which directory the program is running on.

HotKey: Shortcut's Hotkey (or shortcut) setting, which is a key combination that can be used to start a program

Comment: Specifies a comment (or description) object for the shortcut, and a small yellow window gives a hint when the mouse moves to the shortcut, usually a description of the program.

IconFileName: The file name of the custom icon to display. This can be an executable image that contains an icon file (. exe or. dll) or an. ico file, with the icon for the original executable file by default.

IconIndex: The zero-based icon index used in the specified file, This is because some icons can be stored in a. dll file, such as the Shell32.dll file in the operating system, and save more than 100 icon, if IconFileName specifies the file (typically located in the C:\WINDOWS\system32 directory), Then iconindex specifies which icon to use.

The following is a script for more options:

[Setup]

Global settings, this paragraph must be

Appname=test

Appvername=test

Defaultdirname= "E:\TEST"

appversion=1.0

[Files]

Source: "F:\desktop\ipmsg.exe"; DestDir: "{app}"

[Icons]

Name: "{The userdesktop}\ flies the Pigeon biography book"; Filename: "{app}\ipmsg. EXE "; Workingdir: "{app}"; iconfilename:{sys}\shell32.dll;iconindex:12; Comment: "My Shortcuts"

After installation, the desktop icons are as follows:

It is clear from the Properties window that the item corresponding to our settings is visible.

Inno Setup Get Started (iv)--Create desktop shortcuts for programs

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.