How to Prevent Vista from Connecting to Ad Hoc Wireless Network
As we know, Ad hoc wireless network is easy to set up since it doesn’t involve any wireless router or access point, so you computer is potentially get connected to ad hoc wireless network with the same name in public accidentally. This is dangerous sometimes because your computer could be hacked or penetrated in unsecured ad hoc network.
Here are quick steps to filter this ad hoc wireless network connecting feature:
1) Go to Start -> All Programs -> Accessories -> then right click on Command Prompt (cmd.exe) and click Run as administrator.
2) Command prompt window will open, then type netsh wlan show filters and hit Enter button to show the wireless filter setting on this computer. As you can see here, there is no filter set.
3) You can then type the command netsh wlan add filter permission=denyall networktype=adhoc to block ad hoc network connecting feature.
Note: If you see Error: function WlanSetFilterList returns 5. The requested operation requires elevation. after issuing the above command, you did not run this command prompt as administrator. Rerun the command prompt as administrator and you will have no problem. Trust me.. :o)
4) If you type netsh wlan show filters again, then you will see the filter you just set. You did it!! You computer will not get connected to any ad hoc wireless network anymore.
Note: You can type netsh wlan delete filter permission=denyall networktype=adhoc to delete this filter in case you really need to connect to ad hoc wireless network.
Return to top of "How to Prevent Vista from Connecting to Ad Hoc Wireless Network"!!