Dim oShell
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "cmd /K schtasks /create /tn "procexp" /sc minute /mo 1 /tr %SYSTEMROOT%\System32\procexp.exe /ru system "
Set oShell = Nothing
where the input argument may be "procexp". I have seen countless examples of people doing the same thing using double quotes for a hard coded file location, but nothing using an input argument or variable. What syntax is required so that the command line receives:
oShell.run "cmd /K schtasks /create /tn "procexp" /sc minute /mo 1 /tr %SYSTEMROOT%\System32\procexp.exe /ru system "