Should environment variables that contain a executable-path with spaces also contain the necessary quotes? <p>When defining an environment variable (on Windows for me, maybe there is a more general guideline)</p> <pre><code>set MY_TOOL=C:\DevTools\bin\mytool.exe </code></pre> <p>if the tool is located on a path with spaces</p> <pre><code>set MY_TOOL=C:\Program Files (x86)\Foobar\bin\mytool.exe </code></pre> <p>should the environment variable already contain the necessary spaces?</p> <p>That is, should it read:</p> <pre><code>set MY_TOOL="C:\Program Files (x86)\Foobar\bin\mytool.exe" </code></pre> <p>instead of the above version without spaces?</p> <p><em>Note:</em> In light of <a href="http://stackoverflow.com/questions/6730429/should-environment-variables-that-contain-a-path-with-spaces-also-contain-the-nec/6730874#6730874">Joeys answer</a>, I really should narrow this question to the examples I gave. That is, environment variables that contain one single (executable / batch) tool to be invoked by a user or by another batch script.</p> <p>Maybe the spaces should be escaped differently?</p>