Solved

Delete Registry Key using .reg file

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In a hurry?.. scroll down to "HERE's HOW TO DO IT" Section. Greetings All, I was going to post this as question/solution, but its seems more appropriate as an article considering its length.  I felt it important to illucidate all the details c…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
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…
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…

911 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

19 Experts available now in Live!

Get 1:1 Help Now