Re: Allow asp in Win2003 automatically?

From: Hernan de Lahitte (hernan_at_lagash.com)
Date: 04/13/04


Date: Tue, 13 Apr 2004 16:30:58 -0300

Check out this code if it helps you.
You can call this method like this: EnabledExtension("aspnet_isapi.dll")

public static void EnabledExtension(string fileNameExtend)
{

 string scriptPath = Environment.SystemDirectory;
 string webExtension =
System.IO.Path.Combine(System.IO.Path.Directory.GetParent(HttpRuntime.Machin
eConfigurationDirectory).ToString(), fileNameExtend);

 ProcessStartInfo pInfo = new ProcessStartInfo("cscript");
 pInfo.Arguments = String.Format("iisext.vbs /EnFile {0}",webExtension);

 try
 {
  using(Process p = Process.Start(pInfo))
  {
   string info = p.StandardOutput.ReadToEnd();
   if (!p.WaitForExit(60000))
    // Log timeout message
  }
 }
 catch(Exception ex)
 {
  // Log ex
  }
}

-- 
Hernan de Lahitte
Lagash Systems S.A.
http://weblogs.asp.net/hernandl
Shadowfax Dev Team
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ariel Erlijman" <ariel@interactiveni.com> wrote in message
news:OVgcDSXIEHA.3144@TK2MSFTNGP10.phx.gbl...
> Hello,
>
> How can Allow ASP in Win2003 in a script or some automatic way to be run
in
> my installer?
>
> Regards,
> Ariel
>
>