Créer un chemin de raccourci (rallongé) avec des " "
Bonjour à tous,
Je cherche à créer un chemin de raccourci clavier un peu spéciale (avec des "<lignecomande>")
Voila mon code en VBS:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Set net = CreateObject("Wscript.Network")
Set WSHShell = CreateObject("WScript.Shell")
DesktopPath = WSHShell.SpecialFolders("Desktop")
Set Shortcut = WSHShell.CreateShortcut(DesktopPath & "\STC.lnk")
With Shortcut
.TargetPath = WSHShell.ExpandEnvironmentStrings("C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE")
.Arguments = ("C:\Documents and Settings\" & net.username & "\STC.mdb" & " " & "/WRKGRP" & " " & "C:\Documents and Settings\" & net.username & "\STC.mdw")
.WorkingDirectory = WSHShell.ExpandEnvironmentStrings("C:\Documents and Settings\" & net.username & "\")
.IconLocation = WSHShell.ExpandEnvironmentStrings("C:\Documents and Settings\" & net.username & "\STC.ico, 0")
.Description = "Démarre la base de données STC"
'.HotKey = "Aucun"
.WindowStyle = 4
End With
Shortcut.Save |
Au final sa me donne ceci :
Citation:
"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" C:\Documents and Settings\a185247\STC.mdb /WRKGRP C:\Documents and Settings\a185247\STC.mdw
Alors que je veux cela:
Citation:
"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" "C:\Documents and Settings\a185247\STC.mdb" /WRKGRP "C:\Documents and Settings\a185247\STC.mdw"
Quelqu'un peut m'aider ? :cry:
Merci d'avance