title: How to do a silent install of MySQL in Inno Setup?
body: <p>I would create a setup program for my Java application. It uses a MySQL database. So the installation of my program must include the installation of MySQL server 5.5, the configuration of server and loading of my database. I use Inno Setup to do this, but I found some problems. I found this code but it is a little old.</p>
  <pre><code>[Files]
  Filename: msiexec; \
      Parameters: &quot;/i mysql-5.5.11-win32.msi /qn INSTALLDIR=&quot;&quot;C:\mysql&quot;&quot;&quot;; \
      WorkingDir: C:\Users\Gabriele\Desktop\setup; \
      StatusMsg: Sto installando Mysql 5.5.11;  Flags: runhidden
  
  Filename: C:\mysql\bin\mysqld-nt.exe; \
      Parameters: --install; WorkingDir: C:\mysql\bin; \
      StatusMsg: Sto installando il Servizio MySQL; \
      Description: Installing MySQL Service; Flags: runhidden
  
  Filename: net.exe; Parameters: start mysql; \
      StatusMsg: Sto Avviando il Servizio MySQL; \
      Description: Avvio Servizio MySQL; Flags: runhidden
  
  Filename: C:\mysql\bin\mysql.exe; \
      Parameters: &quot;-e &quot;&quot;insert into mysql.user(host,user,password) values ('localhost','root', PASSWORD('emmaus');&quot;&quot; -u root&quot;; \
      WorkingDir: {tmp}; StatusMsg: Configurazione del Server della Base di Dati; \
      Flags: runhidden
  
  Filename: C:\mysql\bin\mysql.exe;
      Parameters: &quot;-u root -h localhost -e &quot;&quot;create database ata&quot;;
  
  Filename: C:\mysql\bin\mysql.exe; \
      Parameters: &quot;-e &quot;&quot;grant all privileges on ata.* to ata;&quot;&quot; -u root&quot;; \
      WorkingDir: {tmp}; StatusMsg: Configurazione Server Base di Dati; \
      Flags: runhidden
  
  Filename: C:\mysql\bin\mysql.exe; \
      Parameters: &quot;-e &quot;&quot;flush privileges;&quot;&quot; -u root&quot;; \
      WorkingDir: {tmp}; StatusMsg: Configurazione Server Base di Dati; \
      Flags: runhidden
  
  Filename: C:\mysql\bin\mysql.exe; \
      Parameters: &quot;-u root -h localhost -e &quot;&quot;use ata; source ata.sql;&quot;; \
      WorkingDir: {tmp}; StatusMsg: Caricamento base di dati; \
      Flags: runhidden  
  </code></pre>
  <p>When I debug, it generates an error after the first statement. Can not find the specified program in the second instruction. I tried to use <code>mysqld</code> instead of <code>mysqld-nt</code> but nothing changes.</p>
  <p>Can someone help me?</p>