title: How can I create an auto-executing, WinRar SFX file from a batch file?
body: <p>I have a 3rd-party installer program that I would like for my users to be able to download and run as a pre-requisite to an application that I have written.  The installer can take parameters that allows for a passive installation, where the user can watch the progress of the process but doesn't have to interact with the installation.</p>
  
  <p>Previously, I've accomplished this behavior by creating an SFX file in WinRar.  From within the options of the WinRAR GUI, you can specify a file to launch after the archive has been decompressed, as well as parameters to the application.</p>
  
  <p>Is there a way to create an SFX file and set these auto-execution properties using the console?  I am trying to create a batch file that takes care of all of this.</p>
  
  <p>Below is my batch file content so far:</p>
  
  <pre><code>C:\Progra~1\WinRAR\rar a -m0 installer_archive.rar install_me.exe
  C:\Progra~1\WinRAR\rar s installer_archive.rar installer_auto_extractor.exe
  </code></pre>
  
  <p>After the final step, what should I do hear to update the SFX?</p>