title: Microsoft Visual C++ Compiler for Python 2.7
body: <p>I downloaded <a href="http://www.microsoft.com/en-us/download/details.aspx?id=44266" rel="noreferrer">Microsoft Visual C++ Compiler for Python 2.7</a> , and install it, the full path of <code>vcvarsall.bat</code> is:</p>
  
  <pre><code>C:\Users\UserName\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat
  </code></pre>
  
  <p>But the following code can't return the path of it:</p>
  
  <pre><code>from distutils import msvc9compiler
  msvc9compiler.find_vcvarsall(9.0)
  </code></pre>
  
  <p>The installer doesn't write the install information to the registry, and from the source code of <code>find_vcvarsall()</code>, it seems that it can't find the <code>vcvarsall.bat</code> file from <code>VS90COMNTOOLS</code> setting, because it requires that the name of the folder that contains <code>vcvarsall.bat</code> is <code>VC</code>:</p>
  
  <pre><code>productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC")
  </code></pre>
  
  <p>How can I use the compiler without modify registry or folder name? </p>