CGI and Perl Applications Do Not Run in a New Console

The information in this article applies to:
  • Microsoft Internet Information Server version 4.0

SYMPTOMS

CGI and Perl applications do not run in a new console.

WORKAROUND

With the Windows Scripting Host enabled, start the command prompt and go to the following directory:

   <%System_Root%>\System32\Inetsrv\Adminsamples



Then, type the following command:

   adsutil set w3svc/CreateCGIWithNewConsole "1"



How to force IIS to launch all CGI applications with their own console.

  • Under IIS 3.0 this is done through the CreateProcessWithNewConsole DWORD registry entry under HKLM\CurrentControlSet\Services\W3SVC\Parameters to 1.

  • Under IIS 4.0, this is done by setting the MD_CREATE_PROC_NEW_CONSOLE entry in the metabase with IIS Admin Base Objects or corresponding CreateCGIWithNewConsole property with IIS Admin Objects to TRUE (see IIS 4.0 online documentation).
  

MORE INFORMATION

To run CGI applications in Internet Information Server (IIS) 3.0 and earlier, "CreateProcessWithNewConsole" was added as a REG_DWORD with a value of "1" to the following registry key:

   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters



This method does not work in IIS 4.0.

Additional query words: reg

Keywords          : kbfaq

Version           : WINNT:4.0

Platform          : winnt

Issue type        : kbprb

Solution Type     : kbpending