desktop = SEARCHPATH('%DESKTOP%') || 'Text Editors'
err = DIR(desktop, 'C')
IF err == "" THEN DO
win = SEARCHPATH('%WIN%')
err = RXMAKESHORTCUT(win || 'Notepad.exe', desktop || '\Notepad.lnk', 'A simple text editor', SEARCHPATH('%DOCS%'))
IF err \== "" THEN DO
RXSAY('Error creating the shortcut: ' || err || '0D0A'x || "Press ENTER to end")
END
ELSE DO
RXSAY('There is now a Shortcut to Notepad on your Desktop in the Text Editors folder.' || ,
'0D0A'x || 'Check it out, then click OK to remove that Shortcut/Folder.', 'OK|INFO')
err = DELETEFILE(desktop || '\Notepad.lnk')
err = DIR(desktop, 'D')
END
END
ELSE DO
RXSAY('Error creating Text Editors folder: ' || err || '0D0A'x || "Press ENTER to end")
END
|