04-08-2026 10:15 AM
I am trying to detect a wifi by running in labview netsh wlan show net, but is giving this location service access denied error and on searching i found out this is an error associated with the latest windows. Is there a work around. Or is there any other way. I just need to detect a wifi signal , then connect to it and confirm the connection. Right now it is done using SSID. Is there a way to solve this problem or any other way to do this
04-09-2026 03:32 AM
Windows blocks the action unless you enable location services. The logic is to prevent nefarious app makers doing background wifi scans to determine the user/victims location based on nearby SSIDs.
To make matters worse, under windows 11, the system doesn't do a complete wifi scan when you disable/enable the wlan programmatically.
This regularly causes a present SSID to be absent from the cashed list that "netsh wlan show..." delivers.
To make it work reliably you will also need to invoke a WlanScan function. https://learn.microsoft.com/en-us/windows/win32/api/wlanapi/nf-wlanapi-wlanscan
After this, the "netsh wlan show..." will return valid information.
A few hoops to jump through, but hope this helps.
0xDEAD.
04-09-2026 03:36 AM
the location services is already turned on in my system and yet i get this error, i heard microsoft made it like that in windows 11