I need to run
start cmd.exe /k "C:\Program Files (x86)\Mozilla Firefox\sdk\bin\activate & cd d:\home\name\addon\ & cfx run"
The problem is that first path has spaces (Program Files). I can’t use quotes, because they are used for full command already.
How can I use spaces in this command?
Who says you can’t add quotes around the exe path when the /C command is already quoted? It works fine ! 🙂
The outer quotes around the /C command are removed prior to execution, leaving only the quotes around your exe path. You can read about how CMD process quotes in the help. Simply type
CMD /?orHELP CMDfrom a command prompt. It does get confusing.Your command has more than 2 quotes, so option 2 is followed.
The only time the above won’t work is if your exe name contains a special character like
&, for examplethis&that.exe. That causes a problem because the exe name is not quoted when the START command is initially parsed. That can be fixed by escaping the problem character within the file name.