Comment créer un raccourci avec VB.net

azerty012 -  
hassen major Messages postés 1 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour
Je voudrai savoir quel est le code en vb.net pour créer un raccourci sur le bureau ?
Merci.
A voir également:

2 réponses

hassen major Messages postés 1 Date d'inscription   Statut Membre Dernière intervention   4
 
Bonjour, Voila !
----------------------------------------Code-------------------------------------------
Dim Bureau As IWshRuntimeLibrary.WshShell
Dim Raccourci As IWshRuntimeLibrary.WshShortcut
Dim VarTrav As String

Bureau = New IWshRuntimeLibrary.WshShell

' Chemin et nom du raccourci
VarTrav = My.Computer.FileSystem.SpecialDirectories.Desktop &_ "\NomDeMonRaccourci.lnk"
Raccourci = Bureau.CreateShortcut(VarTrav)

' Cible
Raccourci.TargetPath = "C:\MonRepertoire\MonExecutable.exe"

' Icône
Raccourci.IconLocation = "D:\MonRepertoire\ico\MonIcone.ico"

' Enregistrement
Raccourci.Save()
----------------------------------------------------------------------------------------
4
hugodecasta Messages postés 106 Date d'inscription   Statut Membre Dernière intervention  
 
la meme
c'est vraiment important
0