FileSystem.createShortcut() This page was last modified over 30 day(s) ago and has 0 comment(s)


Back to FileSystem Class Summary

Availability
Windows

Usage
mdm.FileSystem.createShortcut(targetPath:String, startInFolder:String, description:String, iconFilePath:String, iconID:Number, shorcutLinkPath:String):Void

Parameters
targetPath:String - Path of target

startInFolder:String - Path to shortcut target start folder

description:String - Tiptext for the shortcut

iconFilePath:String - Path to shortcut icon source

iconID:Number - Icon identifier within the icon source file

shorcutLinkPath:String - Path to new shortcut

Returns
Nothing

Description
Creates a shortcut.

Notes
The 'iconFilePath' parameter can be a link to an .ICO file, .EXE or .DLL that contains icons.

The 'iconID' parameter indicates is the identifier of the resource within the DLL or EXE file. For example, the value '0' will use the specified file's first resource.

Windows 98 Users must switch the 'icon' and 'iconID' values around so that 'iconID' comes before 'icon'. Also, 'iconID' must be left as "0".

Example Code
//Creates a shortcut to the current application and places the shortcut on the users desktop:
var appPath:String = mdm.Application.path+mdm.Application.filename;
var appFolder:String = mdm.Application.path;
var shortcutText:String = "My Zinc Application Tiptext";
var iconPath:String = mdm.Application.path+mdm.Application.filename;
var iconRes:Number = 0;
var shortcutLink:String = mdm.System.Paths.desktop+"My Zinc App.lnk";
mdm.FileSystem.createShortcut(apppath, appFolder, shortcutText, iconPath, iconRes, shortcutLink);

mdm.FileSystem Class Example Downloads
No Example Downloads Available


Registered Users must be logged in to 'MyAccount' to add a Comment - Log In Here
  After Logging In, Click Here to Refresh This Page