title: Why is neither the executable nor its launcher script found despite being added to PATH
body: <p>I followed the instruction to install <code>pygmentize</code> in order to use syntax highlight in Latex environment, however TexMaker always produces an error says <code>pygmentize</code> is not found. I then tested to run the .cmd file itself using command prompt and the system says:</p>
  
  <pre><code>C:\Python27\Scripts&gt;pygmentize.cmd
  C:\Python27\python.exe: can't open file 'C:\Python27\Scripts\pygmentize': [Errno
   2] No such file or directory
  </code></pre>
  
  <p>I added path variable for both directories: <code>C:\Python27</code> and <code>C:\Python27\Scripts</code>. Within <code>C:\Python27\Scripts</code>, there are two files:</p>
  
  <ol>
  <li>pygmentize.exe</li>
  <li>pygmentize.cmd</li>
  </ol>
  
  <p>Where the content of <code>pygmentize.cmd</code> is as follows:</p>
  
  <pre><code>@echo off
  set PYTHONPATH=C:\Python27
  %PYTHONPATH%\python.exe %PYTHONPATH%\Scripts\pygmentize %*
  </code></pre>
  
  <p>The original instruction doesn't contain a <code>\</code> after <code>%PYTHONPATH%</code>, I added because the I realize the error message is kinda odd when it says <code>C:\Python27Scripts\python.exe</code>.
  So my question is, why doesn't the Tex system recognize the executable <code>pygmentize</code>? Following an instruction from a SO from <a href="https://tex.stackexchange.com/questions/23458/how-to-install-syntax-highlight-package-minted-on-windows-7">https://tex.stackexchange.com/questions/23458/how-to-install-syntax-highlight-package-minted-on-windows-7</a>, I added a line:</p>
  
  <pre><code>\newcommand\TestAppExists[3]{#2}
  </code></pre>
  
  <p>in my .tex file and it worked only under Ubuntu. So what's the purpose of the .cmd file in this case? </p>