title: How to create Batch file to execute sql script
body: <p>I'm in the last step to create an installation of a java swing application with inno setup.
  In this installation I call a batch file that get the installation of mysql . My problem is that I want to call a sql script from a batch file, that's what I do  but it's doesn't work:</p>
  
  <pre><code>@echo off
  C:\Program Files\MySQL\MySQL Server 5.1\bin\mysql -u root -p password &lt; dbase.sql;
  </code></pre>
  
  <p><strong>(  *<em>'dbase.sql</strong>' in this script a create the database with tables).</em>*</p>
  
  <p>and here I execute that batch file in inno setup:</p>
  
  <pre><code>[Run]
  
  Filename: "C:\Documents and Settings\esolutions\Mes documents\dumps\install.bat"; Flags: shellexec waituntilterminated
  </code></pre>
  
  <p>So when I install the program. I run mysql command line and I find that the script is not executed (no database created)</p>