title: How to Install IIS with NSIS?
body: <p>I am building an installer which installs and configures iis and php.</p>
  
  <p>My iis-install.bat file:</p>
  
  <pre><code>Start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-Security;IIS-RequestFiltering;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;IIS-ManagementConsole;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;IIS-CGI
  </code></pre>
  
  <p>My setup.nsi:</p>
  
  <pre><code>Section -iis_installation
    installIIS:
    ;MessageBox MB_YESNO "Allow To Install IIS?" /SD IDYES IDNO permissionModifier
      File "iis-install.bat"
      nsExec::Exec "iis-install.bat"
    endInstall:
  SectionEnd
  </code></pre>
  
  <p>Both the bat file and setup.nsi are in same folder.</p>
  
  <p>Problem:
  When i compile and run the setup.exe file it will giv an error as below:</p>
  
  <p><strong>"atempt was made to load the progrom in an incorrect format"</strong></p>
  
  <p>And other batch files run properly with nsis except iis-install.bat why?</p>
  
  <p>Please help to solve the issue or suggest any other idea to install iis with nsis.</p>