Having the same issue in my pc (Windows 7 x64).
What I found so far:
1- Open "Windows Firewall with Advanced Security" window.
1.1- Select "Inbound Rules" on the left.
1.2- Select "New Rule..." action on the right.
1.3- In the "New Inbound Rule Wizard", the Predefined option is grey out.
2- Select "Windows Firewall with Advanced Security on Local Computer".
2.1- Select "Restore Default Policy" on the right.
2,2- "Could not restore the default policy. Error : 3".
2.3- Found nothing in the events logs.
3- Select "Windows Firewall with Advanced Security on Local Computer".
3.1- Select "Import Policy" on the right.
3.2- Opening a .wfw file from a working windows 7 pc.
3.3- "Policy import failed. Error : Access is denied. Code : 5".
4- Cleaned pc with different tools:
4.1- Cleaned pc with "Malwarebytes Anti-Malware".
4.2- Cleaned pc with "Combofix".
4.3- Cleaned pc with "Eset Online Scanner".
5- When restarting the pc, the icon for "Microsoft Security Essential" in not showed in the icon tray.
5.1- "Startup" tab of "Msconfig" is showing the following command "C:\Program Files\Microsoft Security Client\msseces.exe" -hide -runkey". Need to start it in startup menu to make it appeared in process list and icon tray.
6- Looked permissions in regedit but found nothing unsual for keys containing "Firewall".
7- Compared all the "Services" with another Windows 7 pc. No difference.
8- Also look the local group policy (gpedit.msc) for this policy: "Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\
System Cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing" = Disabled. Found this in another thread. But not working for me.
9- Also tried this command (running as administrator) without success: "C:\Windows\system32>netsh advfirewall reset".
9.1- Returned error: "An unrecoverable Windows Firewall error (0x3) occurred."
10- Created a new admin user and tried to turn on network discovery. No luck.
11- The only way I'm able to turn on network discovery is to turn off Windows Firewall. Once done, Network discovery is turned on automatically. Also just one inbound rule is automatically added: "Core Networking - Teredo (ICMPv6-In).
12- Also used the "System File Checker" command "sfc /scannow" to troubleshoot missing or corrupted system files. It reported that some system files were corrupted. It said that it was unable to repair some of those files and to check c:\windows\logs\CBS\CBS.log
for details. When I look into that file, there is a bunch of very long technical-looking messages, and no clear indication of just which files were repaired successfully and which files were not repaired.
13- All "Windows Updates" are installed.
14- Also done a "System Restore" but the older "Restore Point" was after I encountered this problem.
15- Done a clean boot. Did nothing.
16- Exported the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess" registries from a working Windows 7 then imported on the failing Windows 7 = PARTLY SUCCESSFUL! Now able to communicate with other computers
on the local network. The "Homegroup" is working normally. Network discovery is activated. Firewall is ON. But... there's still issues not fixed. Points 2 and 3 above are still there. Sounds like some permissions not set as it should be.
Patrick