GuiMakeShortcut()

Creates a shortcut (ie, an icon link to some file).

error = GuiMakeShortcut(Filename, LinkName, Description, StartInName, Iconname, Iconindex, Arguments, Show)


Args

Filename is the name of the file to which the shortcut will point. This should include the full path (ie, drive and directory) name to the file.

Linkname is the name of the Shortcut. This should include the full path. (The full path to the current user's Desktop can be gotten with Reginald's SearchPath() function). Also, the name should end with a .lnk extension.

Description is any text that is set as the Shortcut's description. If omitted, no description is set.

StartInName is the full path in which the program (which is associated with this shortcut) starts. This becomes the "Start in" parameter of the Shortcut.

IconName is the full path of the file which contains the icon for the shortcut (for example C:\Windows\System\moricons.dll).

Iconindex is the index number (from 0) of the icon within the 'Iconname' file (in case you're dealing with a file containing numerous icons). If not supplied, this defaults to the first icon in the file.

Arguments are any arguments that would be automatically passed to the program (which is associated with this icon).

Show determines how the program's window opens, and may be one of the following:

Show
Meaning
'MIN' Start the program minimized.
'MAX' Start the program maximized.

If Show is omitted, then it defaults to normal size window.


Returns

If successful, an empty string is returned. If an error, an error message is returned.


Notes

A shortcut can be deleted, by passing its Linkname to Reginald's DeleteFile() function.

Examples
/* Get the current user's Desktop directory */
desktop = SearchPath('%DESKTOP%')

/* Create a shortcut named 'My Editor' to notepad.exe
 * (assumed to be in the Windows directory).
 */
win = SearchPath('%WIN%')
err = GuiMakeShortcut(win || 'Notepad.exe', desktop || '\My Editor.lnk')
IF err \== "" THEN SAY 'Error in creating the shortcut:' err