Good afternoon.
I'm creating a system that lists some windows settings in VB.NET.
I wonder if anyone knows where windows picks up the values to populate the Button option on the "Advanced Sharing Settings" screen (Control Panel \ All Control Panel Items \ Network and Sharing Center \ Settings sharing)
I found some things on the internet talking about regedit, I did some tests I rebooted the machine and nothing changed in the values, follow the path:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Lsa
In the right pane of the Lsa key, look for the DWORD (REG_DWORD) record called everyoneincludeanonymous that can have the value set to 0
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ LanmanServer \ Parameters
Finally, in the right pane of the Parameters key, set the DWORD (REG_DWORD) registry called restrictnullsessaccess from 1 to 0
I found an api of windows itself that lists the rules of the firewall, everything related to sharing and discovery of network, I deactivated and enabled only changed the information of network discovery, this already helps, but needed to know where the windows get the password-protected sharing value.
Link API do Firewall: