Monthly Archives: February 2009

Killing the right svchost.exe process

Today I had an issue whilst deploying some Sharepoint code locally where the “World Wide Web Publishing” (W3SVC) service had hung in the Stopping state.

This was very annoying as I couldn’t identify the process in Task Manager to just end task it, this was leaving me with only one option – reboot. Going in to the properties of the service simply tells me that the service is started with “C:\Windows\system32\svchost.exe -k iissvcs” so I know that the process is called svchost.exe giving me a choice:

As you can see I have rather a lot of svchost and killing them randomly is likely to end in tears, thus I must be more scientific and execute tasklist /svc

This helpfully tells me the ProcessID (PID) together with the service name (W3SVC). I can now re-open Task Manager, go to View->Select Columns and select PID. This allows me to easily identify the process and end it!

Advertisements