powershell - Using Start-Process for starting a process having its full command line -


how can use powershell's start-process cmdlet start process using full command line (with executable path , arguments). instance let have following line

"<dir_path>/myprog.exe" -arg1 "val1" -arg2 "val2" 

stored on string variable , want run via start-process.

i know start-process -filepath '<dir_path>/myprog.exe' -argumentlist '-arg1 "val1" -arg2 "val2"' work. point don't know how executable's path , arguments full command line.

so there way run process using full command line via start-process, or if there no such way, how can file path , argument list command line?

do need start-process? can invoke executable directly?

& "c:\dir 1\dir 2\executable.exe" -arg1 "value 1" -arg2 "value 2" 

see help about_operators , info on & (call) operator.

bill


Comments