Previous Topic: DeleteItem - Remove an Item from a GroupNext Topic: Initialization File (.ini) Functions


RemoveLink - Remove a Shortcut

Valid on Windows only

The RemoveLink function removes a shortcut.

Function format:

RemoveLink(Name as string, Group as string, Offset as integer) as Boolean
Name

Specifies the name of the shortcut to remove.

Group

Identifies the group (or folder) in which the shortcut to be removed is located. If this parameter is an empty string, the value of the Offset parameter determines where the shortcut will be removed.

LNK_PROGRAMS

The item is removed from the Programs group.

LNK_DESKTOP

The item is removed from the Desktop.

LNK_STARTMENU

The item is removed from the Start menu.

LNK_STARTUP

The item is removed from the Startup group.

LNK_ABSOLUTE

The item is removed from the specified directory.

On successful completion, the function returns TRUE; otherwise, returns FALSE.

Example:

if Not(RemoveLink("DMS Editor", "", LNK_DESKTOP)) Then
	MessageBox("Failed to deinstall dmsedit from desktop", "Desktop Management Scripting", MB_OK + MB_ICONEXCLAMATION)
	SetStatus(1)
	Exit
End If