MSI Factory 2.3

Shell.CreateShortcut

Shell.CreateShortcut

This is the first topic This is the last topic  

Shell.CreateShortcut

This is the first topic This is the last topic  

OverviewExamples

Shell.CreateShortcut (

string Folder,

string Description,

string Target,

string CmdLine = "",

string WorkingFolder = "",

string IconPath = "",

number IconIndex = 0,

number WindowMode = SW_SHOWNORMAL,

table HotKey = nil,

string Comment = "" )

Example 1

Shell.CreateShortcut(Shell.GetFolder(SHF_DESKTOP), "My Shortcut", "C:\\Program Files\\MyApp\\app.exe", "", "", "C:\\Program Files\\MyApp\\myicon.ico", 0, SW_MAXIMIZE, nil, "This is the comment");

Creates a shortcut on the user's Desktop with the "myicon.ico" file icon and the label "My Shortcut." The shortcut is set to point to the file "app.exe" and will launch it in "maximized" mode.

Example 2

Shell.CreateShortcut(Shell.GetFolder(SHF_DESKTOP), "My Shortcut", "C:\\Program Files\\MyApp\\app.exe", "", "", "C:\\Program Files\\MyApp\\myicon.ico", 0, SW_MAXIMIZE, {shift=true,ctrl=true,keycode=72});

Creates a shortcut on the user's Desktop with the "myicon.ico" file icon and the label "My Shortcut." The shortcut is set to point to the file "app.exe" and will launch it in "maximized" mode. A hotkey is also assigned to the shortcut so that when you hold down the shift key, the alt key and press the "h" key (Virtual Key Code 72) the application pointed to by the shortcut will be launched.

See also: Related Actions


Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us