title: How to call Pyinstaller via a .bat file?
body: <p>Currently to use Pyinstaller I open a Python command console then go to the location of my .spec file using <code>cd</code> and type <code>pyinstaller Software.spec</code>. It works well but I'd like to automate that and have a .bat file do those operations for me.</p>
  <p>I have made small .bat files to execute my programs (see below) and I thought the structure for calling Pyinstaller would be close but I'm groping.</p>
  <pre><code>C:\Python\python-3.6.3.amd64\python Software.py
  pause
  </code></pre>
  <p>Failed attempts of .bat files to run Pyinstaller include:</p>
  <p><code>C:\Python\python-3.6.3.amd64\python\Scripts\pyinstaller.exe Software.spec</code></p>
  <p><code>C:\Python\python-3.6.3.amd64\python CALL :pyinstaller Software.spec</code></p>
  <p>Any idea would be welcome.</p>
  <h1>Solution</h1>
  <p>We need to execute Pyinstaller.exe with Python like so:</p>
  <pre><code>&quot;path\to\python.exe&quot; &quot;path\to\pyinstaller.exe&quot; &quot;path\to\my\Software.spec&quot;
  </code></pre>