There are really two issues here: you do want to connect automatically to secure networks you know and trust, but you don’t
ever want to connect (automatically or otherwise) to unsecured networks or secure networks you do not know or trust (like your neighbor’s networks). If possible, you don’t even want to
see these networks cluttering your connect dialog.
Step 1: Disable searching. In the Wireless Network Properties for the network(s) you do want to use, make sure “Look for other wireless networks while connected to this network” is
unchecked.
Step 2: Add your network(s) to the “Allow” filter. Open a command prompt and execute the following command, replacing XXXX with the SSID of each network you do want to use:
netsh wlan add filter permission=allow ssid=”XXXX” networktype=infrastructure
Step 3: Add all networks not specifically allowed to the “Block” filter.
netsh wlan add filter permission=denyall networktype=infrastructure
The downside is that connecting to networks you do not yet know (such as at a hotel) becomes more difficult. Consider creating the following command script as
AllowSSID.bat:
@netsh wlan add filter permission=allow ssid=%1 networktype=infrastructure
If the SSID has embedded blanks, be sure to enclose it in quotes (e.g., “Hidden Network”) when you execute this command.
Last, if you “allow” the local Starbucks’ network be sure to mark it as Public so sharing is disabled.