Sa ne marche toujours pas...bon voici mon code...
Public L_Welcome_MsgBox_Message_Text, L_Welcome_MsgBox_Title_Text
Private Sub Command1_Click()
L_Welcome_MsgBox_Message_Text = "Cet exemple va créer un raccourci vers le Bloc- notes sur votre Bureau."
L_Welcome_MsgBox_Title_Text = "Environnement d'exécution de scripts Windows"
Call Welcome
Dim WSHShell
Set WSHShell = CreateObject("Wscript.Shell")
Dim MyShortcut, MyDesktop, DesktopPath
DesktopPath = WSHShell.SpecialFolders("Desktop") 'voir commentaire joint pour mettre le raccourci a un autre
Set MyShortcut = WSHShell.CreateShortcut(DesktopPath & "\Raccourci vers le Bloc-notes.lnk") 'ici on mets le texte qui doit se trouver sous l'icone
MyShortcut.TargetPath = WSHShell.ExpandEnvironmentStrings(Chr(31) & "c:\program files\diablo II\Diablo II.exe" & Chr(13) & " -w")
MyShortcut.WorkingDirectory = WSHShell.ExpandEnvironmentStrings("c:\program files\diablo II\")
MyShortcut.WindowStyle = 4
MyShortcut.Save
End Sub
Private Sub Welcome()
Dim intDoIt
intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _
vbOKCancel + vbInformation, _
L_Welcome_MsgBox_Title_Text)
If intDoIt = vbCancel Then
WScript.Quit
End If
End Sub
Bon maintenant, utilise n'importe quel racoursi, fais un click droit deçu et regarde dans la cible, l'adresse est marqué entre guillement. le -w ne doit pas etre inclus dans ces guillements, et il doit pas être inclus dans dans rien...donc lorsque je fais un click droit sur le racourci et le je regarde dans cible il doit etre marqué:
"C:\Program Files\Diablo II\Diablo II.exe" -w