user3859999 user3859999 - 21 days ago 5
C# Question

How to connect to hidden wireless network (no SSID) with NETSH command?

i want to connect to hidden wireless network (no SSID) with NETSH command.

my access point has SSID but i invisible it for security reasons.

is there a way to connect with simple commands and no user interface???

best regards.

Answer

after some days i founded a solution that is work well.

1: create a .xml file for example "c:\NOSSID.XML" and save below code into it:

<?xml version="1.0" encoding="US-ASCII"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
    <name>SampleWPA2PSK</name>
    <SSIDConfig>
        <SSID>
            <name>D.Mainoffice.Access</name>
        </SSID>
    </SSIDConfig>
    <connectionType>ESS</connectionType>
    <connectionMode>auto</connectionMode>
    <autoSwitch>true</autoSwitch>
    <MSM>
        <security>
            <authEncryption>
                <authentication>WPA2PSK</authentication>
                <encryption>AES</encryption>
                <useOneX>false</useOneX>
            </authEncryption>		
			<sharedKey>
				<keyType>passPhrase</keyType>
				<protected>false</protected>
				<keyMaterial>**** password ****</keyMaterial>
			</sharedKey>
        </security>
    </MSM>
</WLANProfile>

2: run netsh command:

Netsh wlan add profile filename="c:\noSSID.xml"

you could change your own hidden SSID in <name> tag and password in <keymaterial> tag !!!

that's so easy and i hope be useful for others.

Comments