botanic Posted December 20, 2013 Posted December 20, 2013 (edited) I have the following code $PID = Run(@ComSpec & " /k " & @ScriptDir & "\" & $ConsoleCLI & ">" & $logfile, "") The @ScriptDir is "C:Program Files (x86)test" however when it tries to run i get the following error 'C:Program' is not recognized as an internal or external command, operable program or batch file. If anyone can help with why this isnt working, thanks a ton! I printed the whole string and it comes out to C:Windowssystem32cmd.exe /k C:Program Files (x86)testtest.exe >C:ProgramDatatestout.log Edited December 20, 2013 by botanic
Solution botanic Posted December 20, 2013 Author Solution Posted December 20, 2013 (edited) Got it the following code worked! Had to put " " on the path @ComSpec & " /k " & """" & @ScriptDir & "\" & $rsyncpath & """" & $ConsoleCLI & ">" & $logfile Edited December 20, 2013 by botanic
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now