Wednesday, February 15, 2012

Windows 7 Firewall Service will not start

So let us say you are having trouble getting the Windows 7 Firewall service to start, and you have googled everything and tried it all to no avail. This worked for me:

Find and download ProcMon.exe

Apply a filter with the "result" = "ACCESS DENIED"

Try starting the firewall service from the services portion of the control panel, you will get errors like below if there is a registry problem.



If it is a registry problem, got to the folder in regedit with the problem, right click on it and choose permissions.

choose add. and enter "NT Service\MpsSvc" and click check names . Then give MpsSvc full control of those keys. Then try running the firewall service again, you should see fewer Access denied messages, keep going until you get all of the keys and have no more access denied messages. At this point the firewall service should start if it doesn't you have more problems.

Good Luck, this is a PITA.

-Matt

In addittion this will fix the  Diagnostic Policy Service from not running with Code 5 errors as well...

Windows 7 Reset registry permissions

If for some reason, and it better be a good one because this could totally hose your system. (AKA Back up your registry completely first). You need to reset all registry permissions back to having full access for administrator you can go here to this link http://www.windowsreference.com/security/reset-the-entire-registry-permissions-to-defaults/

If you need an even more drastic reset, including taking ownership of every single registry key (could be a very bad idea....) you can use this script instead of the one in the above link. Do so at your own risk...

subinacl /subkeyreg HKEY_LOCAL_MACHINE /setowner=administrators
subinacl /subkeyreg HKEY_CURRENT_USER /setowner=administrators
subinacl /subkeyreg HKEY_CLASSES_ROOT /setowner=administrators
subinacl /subdirectories %SystemDrive% /setowner=administrators

subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f
subinacl /subdirectories %SystemDrive% /grant=administrators=f

subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=system=f
subinacl /subdirectories %SystemDrive% /grant=system=f

using that script will force access to administrators for every registry key.... Not recommended, but the information might be useful to someone....

-Matt