title: Using batch file for running SQL Server Express with parameter silently
body: <p>I use this code for running Microsoft SQL Server 2008 R2 Express in silent mode but this program exit with error</p>
  
  <pre><code>@echo off
  set DIRPATH=%~dp0%Sql Express 2008 R2
  set Auth=""NT Authority\SYSTEM""
  if exist "%DIRPATH%" goto installProg
  echo file not found
  
  goto end
  
  :installProg 
  
  start "Running Rahbordi App" "%DIRPATH%\SQLEXPR_x86_ENU" "/QS /HIDECONSOLE /ACTION=Install /IAcceptSQLServerLicenseTerms /FEATURES=SQL /INSTANCENAME=SQLEXPRESSR2 /SQLSVCACCOUNT=%Auth% /AddCurrentUserAsSQLAdmin"
  
  :end 
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>SQL Server Setup has encountered the following error:</p>
    
    <p>The argument '/QS /HIDECONSOLE /ACTION=INSTALL /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SQL /INSTANCENAME=SQLEXPRESSR2 /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" /ADDCURRENTUSERASSQLADMIN' is formatted incorrectly.<br>
    The delimiter '=' is missing.</p>
    
    <p>Error code 0x84B40006.</p>
  </blockquote>
  
  <p>I don't know that why this error happen. Many thanks for any help.</p>
  
  <p>Edit: ]n detail of error i just say that after <strong>NT</strong> an enter character printed.</p>