Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Editing Desktop Shortcuts
Message
De
04/06/2016 05:17:55
 
 
À
04/06/2016 04:22:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01636993
Message ID:
01636994
Vues:
85
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform