Articles > Misc.
Printer Friendly Version
Views: 5406

svchost.exe Errors

Last Updated: 2/14/10

Related Articles:
KB916089
KB927891
KB262490
System Internals Forum Article

Article Date: 2/4/07

Problem: svchost.exe errors can have many causes, but most of the links above deal with a more specific issue caused by a bug in msi.dll. This bug should be resolved soon, but this article should help with svchost.exe errors in general. Generally when svchost.exe crashes multiple windows services crash.

Solution: The solution is to run services prone to crashing in their "own" memory space instead of a "shared" space where a problem can effect other services. There are two techniques to do this:

Technique 1 (simple) :

Type this command at a command prompt: "sc config <service name> type= own"
Example: "sc config wuauserv type= own" (This is the command I used to help with my problems)

Note 1: The space after the "=" is important!
Note 2: If you change the 'own' to 'shared' it will reverse the command.
Note 3: This command manipulate the value of [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv\Type] - it is set to 0x20 normally ("share" - SERVICE_WIN32_SHARE_PROCESS), and 0x10 when changed to "own" - SERVICE_WIN32_OWN_PROCESS.




Technique 2:

Remove the service you want to change from any group it may appear under. Service groups show up as registry keys under this location:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost\

Delete the applicable service string value from they key it shows up under, then create a new string value in the root key defined above. Then change the service image path. Located here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<service name>


Example for the Windows Update Service:
1) remove the "wuauserv" from the REG_MULTI_SZ value [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost\netsvcs]

2) create a new "AutomaticUpdates" REG_MULTI_SZ value in [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost].  Add "wuauserv" to the value.

3) at [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv], change the ImagePath setting from "%systemroot%\system32\svchost.exe -k netsvcs" to "%systemroot%\system32\svchost.exe -k AutomaticUpdates"



Keywords: svchost error msi.dll services svchostUnreadable