Complete IIS and Windows Environment Variables Knowledge Base

Windows Environment Variables Reference

What are Environment Variables?

Environment variables are system-defined values that programs use to find files and folders regardless of which drive Windows is installed on or how the system is configured.

System Location Variables

User Profile Variables

System Information Variables

Network and Domain Variables

Development and System Variables

Special Shared Folders

How to View Environment Variables

Command Prompt:


set                    # Show all variables
echo %windir%         # Show specific variable
set windir            # Show variables starting with "windir"

PowerShell:


Get-ChildItem Env:           # Show all variables
$env:windir                  # Show specific variable
$env:windir = "C:\Windows"   # Set variable

Windows GUI:

Why Use Environment Variables?

---

IIS Knowledge Base Guide

Why Install IIS on F: Drive Instead of C:

Performance Benefits

Management Advantages

IIS Manager vs Log Files

#### IIS Manager

What it is: Graphical management console for configuring IIS

#### IIS Log Files

What they are: Automatically generated records of all web requests

W3C Log Format - Why Use It?

Industry Standard

Customizable and Efficient

Tool Integration

IIS Server Configuration Options

#### .NET Authorization

Purpose: Controls access to .NET applications and resources

What it manages:

#### .NET Compilation

Purpose: Defines how ASP.NET code is compiled and executed

Key settings:

#### .NET Error Pages

Purpose: Controls how application errors are displayed to users

Configuration options:

- On - Always show custom errors

- Off - Always show detailed errors (development only)

- RemoteOnly - Show custom errors to remote users, detailed to local users

#### MIME Types

Purpose: Tells web browsers how to handle different file types

How it works:

- .pdfapplication/pdf

- .jpgimage/jpeg

- .jsonapplication/json

Common MIME types:

IIS Environment Variables

Quick Reference Commands

Check Environment Variables


echo %windir%              # Windows directory
echo %SystemDrive%         # System drive
echo %UserProfile%         # User profile path
echo %ComputerName%        # Computer name
echo %UserName%           # Current user

IIS Quick Paths

Log File Information