deleteDesktopIcon

                                   +-"PERSONAL"-+
>>-deleteDesktopIcon--(--name--,---+------------+-)------------><
                                   +-"COMMON"---+

Deletes a shortcut from the Windows desktop that was previously created with AddDesktopIcon.

The arguments are:

name

The name of the shortcut to be deleted.

location

Either of the following locations:

"PERSONAL"

The shortcut was previously created with AddDesktopIcon and the location option "PERSONAL". This is the default.

"COMMON"

The shortcut was previously created with AddDesktopIcon and the location option "COMMON".

Return codes:

0

Shortcut deleted successfully.

2

Shortcut not found.

3

Path to shortcut not found.

5

Access denied or busy.

26

Not a DOS disk.

32

Sharing violation.

36

Sharing buffer exceeded.

87

Does not exist.

206

Shortcut name exceeds range error.

Note:: Return code 2 is also returned when a "PERSONAL" should be deleted that was previously created with "COMMON" and vice versa.

Example:

pm = .WindowsProgramManager~new
if pm~InitCode \= 0 then exit

rc = pm~deleteDesktopIcon("MyNotepad1", ,
     "%SystemRoot%\system32\notepad.exe")
if rc \= 0 then do
  say "Error deleting shortcut: My Notepad 1"
  exit
end

exit

::requires "winsystm.cls"