I'm writing a batch script that should connect to a specific wireless network and begin a download from a NAS share drive on that network.
Obviously, before any download can be performed, I must check that the machine is connected to the correct network.
How can I check that I have connected to the correct network?
The relevant section of my batch script is thus:
...netsh wlan add profile filename=%_SCRIPT_PATH%MyWireless.xmlnetsh wlan connect name=MyWireless...
Where MyWireless.xml is a netsh exported network profile generated by:
C:\Users\Daemon>netsh wlan export profile folder=C:\Users\Daemon\ name=MyWireless