How to Disable IIS Automatic Startup in Windows: A Developer’s Guide


2 views

html

Internet Information Services (IIS) typically configures itself to launch during Windows startup by default. As a developer working with multiple web servers or needing to conserve system resources, you might want to prevent this automatic behavior.

The most reliable way to modify IIS startup behavior is through Windows Services:

1. Press Win+R, type "services.msc" and hit Enter
2. Locate "World Wide Web Publishing Service" in the list
3. Right-click and select "Properties"
4. In the "Startup type" dropdown, select "Manual"
5. Click "Apply" then "OK"
6. Optionally, stop the service immediately by clicking "Stop"

For developers who prefer scripting, here's a PowerShell solution:

# Set IIS service to manual startup
Set-Service -Name "W3SVC" -StartupType Manual

# Optional: Stop the service immediately
Stop-Service -Name "W3SVC" -Force

# Verify the change
Get-Service -Name "W3SVC" | Select-Object Name, Status, StartType

Advanced users can edit the Windows Registry directly:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC]
"Start"=dword:00000003

Note: Create a backup before making registry changes. The value "3" sets the service to Manual startup.

After making these changes, restart your computer and verify that IIS doesn't automatically start:

# Check IIS status via command line
net start | find "World Wide Web Publishing Service"

# Alternative PowerShell check
(Get-Service -Name "W3SVC").Status

While IIS Manager doesn't provide direct control over the service startup, you can configure application pool startup behavior:

1. Open IIS Manager
2. Navigate to "Application Pools"
3. Select your pool and click "Advanced Settings"
4. Change "Start Mode" to "OnDemand"
5. Click "OK" to apply changes

Remember that:

  • Windows Updates might reset service configurations
  • Other dependent services (like WAS) might still start
  • Some development tools might expect IIS to be running

If you need to revert the changes:

# Via Services Console: Set to "Automatic"
# Via PowerShell:
Set-Service -Name "W3SVC" -StartupType Automatic
Start-Service -Name "W3SVC"

Internet Information Services (IIS) typically configures itself to start automatically with Windows through the Windows service management system. This behavior is controlled by the service's Startup Type setting rather than through IIS Manager itself. Many developers prefer to disable this automatic startup when they only need IIS intermittently for development purposes.

The most straightforward approach is through the Windows Services management console:

  1. Press Win+R, type services.msc and hit Enter
  2. Locate the World Wide Web Publishing Service in the list
  3. Right-click and select Properties
  4. In the Startup type dropdown, select Manual
  5. Click Apply then OK

For developers who prefer command line tools or need to script this change:

sc config W3SVC start= demand

This sets the service to manual start. To immediately stop a running IIS instance:

net stop W3SVC /y

PowerShell provides more control and scripting capabilities:

Set-Service -Name W3SVC -StartupType Manual
Stop-Service -Name W3SVC -Force

To verify the current status:

Get-Service W3SVC | Select-Object Name,Status,StartType

When disabling IIS auto-start, be aware that:

  • Related services like Windows Process Activation Service (WAS) may also need configuration
  • Application pools won't start until IIS service is manually initiated
  • Some development tools may attempt to start IIS automatically when needed

If IIS still starts automatically:

  • Check for dependent services that might trigger IIS startup
  • Verify no applications are configured to auto-start in IIS Manager
  • Review Task Scheduler for any related startup tasks