How can I disable command shell from within IIS?

John Savill

February 4, 2000

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. Its possible to use #exec commands from within a HTML page toenable calling commands on the web server. By default this is enabled in IIS 4.0but DISABLED by default in IIS 5.0. The default state change was changed toprevent the running of unauthorized server-side executables. To manuallyset/confirm the state perform the following:

  1. Start the registry editor (regedit.exe)

  2. Move to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW3SVCParameters

  3. If SSIEnableCmdDirective does not exist create it of type REG_DWORD

  4. Double click SSIEnableCmdDirective value and set to 1 to enable or 0 to disable. Click OK

  5. Close the registry editor

  6. Stop and start the WWW service (or reboot) for the change to take effect

To stop and start from the command line perform the following:

C:> net stop w3svc
C:> net start w3svc

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like