ShellExec Directive

Sets the path/file name of the executable that is started from the server using WinExec().

Purpose

The ShellExec directive allows you to control which executable that httpd will run to begin the external script execution process. Normally, this is a PIF file that starts up a DOS VM which initially runs a DOS shell.

It is possible to exec specific DOS or Windows programs directly from httpd by changing this parameter. Such a change affects all scripts that your server executes. If you want to exec a DOS program (such as a perl or icon interpreter), create a PIF file to run the desired program, then change this parameter to specify that PIF file. If you want to exec a Windows program (such as Visual Basic), specify the path to the executable (e.g., VB.EXE).


Syntax

ShellExec path/file

path/file is the DOS path and file specifying the executable to run.

Only one ShellExec directive is allowed in the configuration file.


Default

If you do not specify a ShellExec, httpd assumes:

ShellExec HSCRIPT.PIF


Examples

ShellExec C:\PERL\PERL.PIF

This will cause the server to exec the specified PIF file instead of the default.

ShellExec C:\VB\VB.EXE

The server will start Microsoft Visual Basic for Windows. It is theoretically possible to use VB as an execution engine behind NCSA httpd, with other appropriate shell setup options. Use your imagination.


Return to Wizard Scripting Overview
Robert B. Denny <rdenny@netcom.com>