Sep 25, 2017 at 9:56pm UTC
Windows (and mostly everything else) requires you to put quotation marks (") between file paths that have spaces in them.
Without quotations, it treats the file path as two separate command arguments.
Further more, your code is probably getting warnings because you're using unescaped backslashes. Change the backslashes to forward slashes, or escape them ('\\').
"start /max \"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe\""); EDIT:
If you do it this way, it might not run correctly because... Windows®....
You have to "fake" a window title like this (first arg is empty string):
"start \"\" /max \"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe\"");
In cmd, that would translate to
"" /max "C:/file path/with spaces.exe"
Last edited on
Sep 25, 2017 at 10:22pm UTC
Sep 25, 2017 at 10:15pm UTC
Ganado makes good points. This is what I did to get it to work for me:
"start /max C:\\\"Program Files (x86)\"\\Google\\Chrome\\Application\\chrome.exe");
When I tried Ganado's example of the \" before the C and \" after .exe it did not work for me. The part about putting "" around anything that has a space in it is good advice.
Hope this helps,