This question already has an answer here:
How do I get the entire command line in a .vbs file? I'm looking to process it myself, with all special characters/quotes still intact.
For example, the command:
cscript.exe example.vbs /month:April /price:500 "Joe Smith" is "our" guy
I am NOT interested in:
WScript.Arguments.Named.Item("month")
= April
WScript.Arguments.Item(2)
= Joe Smith
Dim StrArgs
For Each arg In WScript.Arguments
StrArgs = StrArgs & " " & arg
Next
= /month:April /price:500 Joe Smith is our guy
These methods mangle and strip all quotes.
I want to get the raw arguments, unprocessed in any way:
/month:April /price:500 "Joe Smith" is "our" guy
You can use WMI:
output: