title: Install IIS from batch file - get error windows package manager
body: <p>I try to install the IIS role from a batch file.</p>
  
  <p>If I call my batch file directly by clicking on it or from the command line, <strong>everything works perfectly</strong>.</p>
  
  <p>But <strong>if I call from my program "C #" I see an error window</strong> (see below).</p>
  
  <p><img src="https://i.stack.imgur.com/vh0vx.png" alt="enter image description here"></p>
  
  <p>Here is my code to call my "Batch" file  from my "C #" program .</p>
  
  <pre><code>string path = myPathWork.FullName + "\\install\\installIIS.bat";
  System.Diagnostics.Process.Start(path);
  </code></pre>
  
  <p>Someone you have an idea? I feel that this is due to permissions but I execute the program as well as administrator.
  Thanks a lot</p>
  
  <p>Here my batchFile for install iis (if i execute this from command line all work fine) :</p>
  
  <pre><code>start /w pkgmgr /l:log.etw /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;
  IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;
  IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-BasicAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;
  IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;
  IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI
  </code></pre>