title: Installing PostGreSql with WiX Installer
body: <p>I'm trying to deploy a PostGreSqlServer with my WiX installer but it simply keeps on failing and I don't know why.</p>
  
  <p>The important part of my wxs file:</p>
  
  <pre><code>&lt;Binary SourceFile="postgresql-9.2.1-1-windows.exe" Id="PostGreInstaller"  /&gt;
  
  &lt;CustomAction  Id="InstallPostGre" BinaryKey="PostGreInstaller"
                 ExeCommand='"--serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended"'
                 Execute="deferred" Return="check"   Impersonate="yes" /&gt;
  
  &lt;InstallExecuteSequence&gt;
    &lt;Custom Action="InstallPostGre" Before="InstallFinalize" /&gt;
  &lt;/InstallExecuteSequence&gt;
  </code></pre>
  
  <p>Already tried the command in a cmd shell and it worked. Don't why it doesn't in the installer. </p>
  
  <p>I know for sure that the installer has embedded the installer because it has more then 50MB.</p>
  
  <p>I've also started my msi with logging turned on but that didn't really help me either...</p>
  
  <pre><code>Action 16:34:29: InstallPostGre. 
  MSI (s) (64:E0) [16:34:29:407]: Executing op: CustomActionSchedule(Action=InstallPostGre,ActionType=1026,Source=BinaryData,Target=--serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended,)
  MSI (s) (64:E0) [16:34:31:698]: Note: 1: 1721 2: InstallPostGre 3: C:\Windows\Installer\MSIE410.tmp 4: --serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended 
  MSI (s) (64:E0) [16:34:31:698]: Note: 1: 2205 2:  3: Error 
  MSI (s) (64:E0) [16:34:31:698]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1721 
  Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: InstallPostGre, location: C:\Windows\Installer\MSIE410.tmp, command: --serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended 
  MSI (s) (64:E0) [16:34:34:717]: Note: 1: 2205 2:  3: Error 
  MSI (s) (64:E0) [16:34:34:717]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709 
  MSI (s) (64:E0) [16:34:34:717]: Product: Hausverwaltung -- Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: InstallPostGre, location: C:\Windows\Installer\MSIE410.tmp, command: --serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended 
  </code></pre>
  
  <p>are there any WiX gurus out there? :)</p>