<P>Batch files can be used sometimes as CGI scripts. This technique is also useful if you
want to display in the browser the output of certain console application. 
</P>
<P>As like IIS ALP supports only 32-bit executebles as CGI handlers. So this is possible only
with the 32-bit BAT files processor - CMD.EXE available on Windows NT/2k/XP and not on
the consumer versions of the Windows OS - Windows 95/98/ME where the BAT file processor is
a DOS application.
</P>
<P>Depending on the way you want to use CMD.EXE as CGI processor you will need to create entries
in the alp.application file for the application that contains your batch files.
</P>
<p>To just run a CMD file as CGI you need to configure ALP to run it:</p>
<PRE>
{ cmd: (CG.newObjects.GateCGI)
    (int)Timeout=60
    (int)RequireAsynch=2
    (int)CheckThatFileExists=0
} cmd;
</PRE>
<p>A section like the sample above in the ExecutionMap section will set up CMD files
as CGI executables for the application containing them.
</p>
<p>You may want to configure some other files as CGI scripts in a bit different way - as
parameters to a single batch file. E.g. the links that point such files will invoke certain
batch file to process them. This is done with similar section in the alp.application but it
also describes how they are passed as parameters to the CGI processor (the batch file in this 
case).
</p>
<PRE>
{ textfile: (CG.newObjects.GateCGI)
    (string)Engine=cmd.exe /Q /C ""%r\cgi\lister.cmd" "%s" %q"
    (int)Timeout=60
    (int)RequireAsynch=2
    (int)CheckThatFileExists=0
} textfile;
</PRE>
<p>The above sample specifies that the files with extension .textfile will be processed
by the lister.cmd CMD script. See the detailed description of the special parameters used by
the ALP CGI module in the ALP documentation.
</p>