+-"PERSONAL"-+
>>-deleteDesktopIcon--(--name--,---+------------+-)------------><
+-"COMMON"---+Deletes a shortcut from the Windows desktop that was previously created with AddDesktopIcon.
The arguments are:
The name of the shortcut to be deleted.
Either of the following locations:
The shortcut was previously created with AddDesktopIcon and the location option "PERSONAL". This is the default.
The shortcut was previously created with AddDesktopIcon and the location option "COMMON".
Return codes:
Shortcut deleted successfully.
Shortcut not found.
Path to shortcut not found.
Access denied or busy.
Not a DOS disk.
Sharing violation.
Sharing buffer exceeded.
Does not exist.
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"