I'm running a Visual Studio post build event that shuts down IIS if it's still running after compilation:
taskkill /f /im w3wp.exe
The following works perfectly if IIS is still running, but throws an error if it has already stopped:
Error 1 The process "w3wp.exe" not found. xxx\EXEC
Is there a way to tell taskkill to ignore the problem if it can't find a matching running process?