0

I try to install the IIS role from a batch file.

If I call my batch file directly by clicking on it or from the command line, everything works perfectly.

But if I call from my program "C #" I see an error window (see below).

enter image description here

Here is my code to call my "Batch" file from my "C #" program .

string path = myPathWork.FullName + "\\install\\installIIS.bat";
System.Diagnostics.Process.Start(path);

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

Here my batchFile for install iis (if i execute this from command line all work fine) :

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
Mehdi Bugnard
  • 3,889
  • 4
  • 45
  • 86

1 Answers1

0

I do not undesrtand why, but i have ony remove this line from my batch file and all it's work

/l:log.etw
Mehdi Bugnard
  • 3,889
  • 4
  • 45
  • 86