Prevent Win 8/Win 8.1 connecting to an open/public network

You’ll find a lot out there about how you can make one or more networks, that you want to connect to, have higher priority than others. You do this by clicking the Connect automatically tick (check) box when connecting to your preferred networks, and un-ticking (unchecking) it for those that you don’t want to connect to. However, that won’t actually stop your computer from connecting to an unwanted network if it’s an open/public network and your preferred network isn’t available. To make sure it never connects to that unwanted network, you can use the magic of netsh:

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

You can either run this from a command prompt (don’t forget to replace UnWantedNetwork with your own unwanted network name) opened with administrator permissions: press the Start button, type


, right-click the Command Prompt item found by Search and choose Run as administrator); or, if you want to add to multiple machines, pop in in a batch file (create a file in Notepad, paste in the netsh command above, and save with a .bat extension), copy that batch file onto a USB stick then pop in the stick, right-click the batch file and choose Run as administrator.

In Win 8.1 it will no longer even appear in the list of available networks – result.