I'm trying to execute a SAS code with VBScript through the command line. However, I'm having issues with passing the commands from VBScript to command line properly. I'm pretty sure it is a matter of using quotes and chr(34) correctly, but I cannot figure it out.
So I want to run the follow command in command line:
"C:\Program Files\SAS 9.4\sas.exe" -SYSIN "C:\Program Files\test.sas"
I've tried something like
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "cmd.exe /K copy ""C:\Program Files\SAS 9.4\sas.exe"" -SYSIN ""C:\Program Files\test.sas"" ", 1, True
Set oShell = Nothing
But I get an invalid syntax error in command line. Any good ideas?