3
3
Using netsh wlan connect name="your network_name"
you can request to connect to a WiFi network, but can't be sure whether or not you are connected.
So, in CMD/Batch, what would be a command line to check whether or not I am connected to a WiFi network? (The WiFi network may, or may not, have network access.)[It should also work for Mobile hotspots too]
If Connected, It should display YES
,
If NOT Connected, It should display NO
,
because I want to run a loop depending upon the results I get.
1
Use a vbscript to check your connection status, you'll have to insert your adapter name.
– LotPings – 2016-12-17T12:16:59.413Welcome to Super User! Please note that https://superuser.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?.
– DavidPostill – 2016-12-17T15:19:47.093Changing your question after you've received answers is inappropriate, as it invalidates the answers you've received. It can even make those answers wrong, and adversely affect the reputation of those who answered. If you now have a new or additional question, create a new post and ask it there; you can link back to this one if needed for reference. – DavidPostill – 2016-12-17T15:25:55.257
@DavidPostill You have mistaken me! I dont change the question after i got the answer! First of all , i dont change i Added! Second, I added because the answers which i got were not the answer that i expected! So I MADE THE QUESTION MORE CLEAR, WHAT I WANT! Anyway sorry, I should have done that earlier. – Aravind .KEN – 2016-12-17T15:39:47.597
You did change it. You added extra requirements. – DavidPostill – 2016-12-17T15:41:12.400
@DavidPostill Yeah, I did! because the answer which got was not that i wanted so i added! As i said " Anyway sorry, I should have done that earlier." – Aravind .KEN – 2016-12-17T15:43:15.437