Solved

Delete Registry Key using .reg file

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SCCM 2012 14 34
Show shut-down message as Windows 8 shuts down. 9 99
URL to download Windows 10 Home 7 134
ost file to pst 10 164
This article covers how to install the Microsoft Windows Operating System (OS). What is covered in this article:  > Different Versions and Editions of the Windows OS  > Upgrading versus Fresh Installation of the OS           - Steps to take pr…
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…
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…

809 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