Solved

Delete Registry Key using .reg file

Posted on 2012-03-20
4
717 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 39

Expert Comment

by:Kyle Abrahams
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The way I use Experts Exchange to assist me in analyzing and diagnosing a problem is I first enter a Verbose Question at Experts Exchange like: Office 2007 will hang when opening and saving files I then launch WordPad (any text editor will do) an…
This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now