Solved

Delete Registry Key using .reg file

Posted on 2012-03-20
4
745 Views
Last Modified: 2012-06-21
We are having some issues with the svchost.exe using 100% CPU.(windows XP)

After some research we have tested deleting HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\SvcHost\NetworkService and it fixes the problem. We are trying to create a .reg file to delete this key and it just doesn't seem to work. Here is the .reg file contents.

Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost\NetworkService]

Any suggestions?

Thanks
0
Comment
Question by:nmmcfk
  • 2
4 Comments
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 37744296
run this in a bat or logon script:

reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost\NetworkService" /f
0
 
LVL 10

Expert Comment

by:c_a_n_o_n
ID: 37744377
Interestingly, I have tested your regedit script and works fine on this Windows 7 as it does delete the registry value NetworkService.
Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost\NetworkService]

Open in new window

0
 

Accepted Solution

by:
nmmcfk earned 0 total points
ID: 37747060
canon,

Strange.....for some reason we had to write it like this for it to work

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost]
"NetworkService"=-

We will not be using this as we found in our test computers to cause some problems.

Thanks for the response
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost]
"NetworkService"=-

Open in new window

0
 

Author Closing Comment

by:nmmcfk
ID: 37913805
We had to write it this way for it to work. We did more testing here and also found it to cause some problems.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Log files are useful in diagnosing and repairing problems.  This is a list of common log files and their standard locations that I've compiled.   While this is not exhaustive, it is a pretty good list that I've found to be useful.  I may update it f…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question