Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Editing Desktop Shortcuts
Message
From
04/06/2016 13:31:52
 
 
To
04/06/2016 05:17:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01636993
Message ID:
01636997
Views:
58
>>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

Thanks Antonio. I have it working. Cheers!
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Reply
Map
View

Click here to load this message in the networking platform