Microsoft KB Archive/150826

= Batch File to Display IIS Environment Variables from Browser =

Article ID: 150826

Article Last Modified on 6/23/2005

-

APPLIES TO


 * Microsoft Internet Information Server 1.0

-



This article was previously published under Q150826



We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 6.0 running on Microsoft Windows Server 2003. IIS 6.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:

http://www.microsoft.com/technet/security/prodtech/IIS.mspx



SUMMARY
The following batch file will create a listing of environment variables when a client connects to a Microsoft Internet Information Server (IIS).

Create a file with Notepad and type the following lines of code. Save the file in the scripts directory as Environment.cmd.

@echo off echo Content-Type: text/plain echo. set

From a browser, type the http:///

where, WWW.UNKNOWN.COM is the full qualified Domain Name, and SCRIPTS/ENVIRONMENT.CMD? is the Path to the Script file. For example:, HTTP://WWW.UNKNOWN.COM/SCRIPTS/ENVIRONMENT.CMD?

NOTE: The question mark is very important. It informs the server that this is a GET request instead of downloading the file.



MORE INFORMATION
For additional information, please see the following article in the Microsoft Knowledge Base:

150041 : Environment Variables Returned by IIS via CGI

Additional query words: prodnt

Keywords: kbsetup KB150826

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.