When I use Windows Run tool to call my exe with argument it work fine I did below cmd.exe /C "C:\ex\abc.exe" skk Then my exe get a hit and i got skk as an argument. BUt I i did cmd.exe /C "C:\ex\abc.exe" "sk k" then my exe does not call. Why? But the same thing work fine in cmd line "C:\ex\abc.exe" "sk k"
This is by design
If more than two quote characters are present after the /C switch, then "behavior is to see if the first character is a quote character and if so, strip the leading character and remove the last quote character on the command line, preserving any text after the last quote character.", unless the following conditions are met:
So, when you do
it's trying to execute
which, obviously, doesn't work. If you want to run your exe with an argument containing the whitespace, try
Or wrap the the whole command in double quotes like so: