Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Editing Desktop Shortcuts
Message
From
04/06/2016 05:17:55
 
 
To
04/06/2016 04:22:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01636993
Message ID:
01636994
Views:
84
This message has been marked as the solution to the initial question of the thread.
>Hi All,
>
>Is there a way to edit a desktop shortcut, to change the description it has or perhaps even the icon?
>
>TIA

Yes x 3.
LOCAL loShell AS WScript.Shell
LOCAL loShortcut

m.loShell = CREATEOBJECT("WScript.Shell")

* edit a desktop shortcut
m.loShortcut = m.loShell.CreateShortcut(GETFILE("lnk"))

* change its description
m.loShortcut.Description = "A new description"

* and set its icon
m.loShortcut.IconLocation = GETFILE("ico") + ",0"

* done
m.loShortcut.Save()
More info at https://msdn.microsoft.com/en-us/library/f5y78918(v=vs.84).aspx
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform