How to stop Windows 7 from automatically connecting to unsecure wifi network

From this Microsoft MVP:

To block a neighbor's unencrypted wireless network called WLAN, type this in a command window as an administrator:

netsh wlan add filter permission=block ssid=WLAN networktype=infrastructure

I just had it again: after a reboot, Windows 7 automatically connected to a public open (but non-working) network I have never connected to, and I didn't have any option (in the UI) to prevent that. The command above (with the network name in double quotes instead of WLAN) completely removed the network from Windows' radar!


There should be an option in the Manage Wireless Networks window, if not you can do one of these:

  1. Delete all shown networks there
  2. Disable the wireless device from Device Manager (right click on My Computer > Manage > Devices/Device Manager)
  3. Uninstall the device then install it again