# Function Reference

FileGetShortcut

Retrieves details about a shortcut.

FileGetShortcut ( "lnk" )

Parameters

lnk | Full path and file name of the shortcut.

Return Value

Success: | Returns an array that contains the shortcut information. See Remarks.
Failure: | Sets @error to 1 if the shortcut could not be accessed.

Remarks

The array returned from this function is a single dimension array containing the following elements:
$array[0] = Shortcut target path
$array[1] = Working directory
$array[2] = Arguments
$array[3] = Description
$array[4] = Icon filename
$array[5] = Icon index
$array[6] = The shortcut state (@SW_SHOWNORMAL, @SW_SHOWMINNOACTIVE, @SW_SHOWMAXIMIZED)

Related

FileCreateShortcut

Example

; Sets a shortcut with ctrl+alt+t hotkey
FileCreateShortcut(@WindowsDir & "\Explorer.exe",@DesktopDir & "\Shortcut Test.lnk",@WindowsDir,"/e,c:\", "This is an Explorer link;-)", @SystemDir & "\shell32.dll", "^!t", "15", @SW_MINIMIZE)
; Read in the path of a shortcut
$details = FileGetShortcut(@DesktopDir & "\Shortcut Test.lnk")
MsgBox(0, "Path:", $details[0])