chrisdynamite
Goto Top

VBS Anführungszeichen-Probleme

Guten Tag,

folgenden codeschnipsel möchte ich benutzen:

Const strProgramtitel="VLC Media Player"  
Const strProgram = "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"  
Dim objShortcut
Dim objShell
Set objShell= WScript.CreateObject("Wscript.Shell")  
strLPfad=objShell.SpecialFolders("")  
Set objShortcut=objShell.CreateShortcut(strLPfad & "C:\" & strProgramtitel & ".lnk")  
objShortcut.TargetPath= strProgram
objShortcut.Description= "strProgramtitel"  
objShortcut.Save

Diese VBS erstellt eine Verknüpfung in C:\

wie erreiche ich den Effekt, dass ich noch Parameter an das Ziel der Verknüpfung anhänge. Bei meinen Versuchen erhalte ich Laufzeitfehler. Ich möchte an das Ziel hinzufügen: --no-qt-privacy-ask --no-qt-updates-notif

So dass die Verknpfung heist: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --no-qt-privacy-ask --no-qt-updates-notif

Bis jetzt erreiche ich nur den Effekt: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe --no-qt-privacy-ask --no-qt-updates-notif"

oder eben Laufzeitfehler

Content-ID: 217807

Url: https://administrator.de/forum/vbs-anfuehrungszeichen-probleme-217807.html

Ausgedruckt am: 07.04.2025 um 01:04 Uhr

76109
76109 25.09.2013 um 10:27:31 Uhr
Goto Top
Hallo ChrisDynamite!

In etwa so:
objShortcut.Arguments = "--no-qt-privacy-ask --no-qt-updates-notif"  

Gruß Dieter
Bitboy
Bitboy 25.09.2013 aktualisiert um 10:30:39 Uhr
Goto Top
Hi,

mit so vllt?
objShortcut.Arguments = "--no-qt-privacy-ask --no-qt-updates-notif"

Hier gefunden: http://msdn.microsoft.com/en-us/library/yf7kaky2(v=vs.84).aspx


Edit: Zu langsam face-sad