Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get SSID
#1
Hi,

how do i get the SSID when already connected to WLAN?
pi
#2
Hi __pi
- that rhymes Big Grin

I have been a stalker in this forum for too long, now it's time to pay back for all the help I have found in here..

I would find network info in the Windows Registry.
if your Windows is 64bit, you need the 64bit flag like this:

Code:
Copy      Help
str SSID
rget(SSID "SelectedWiFiProfile" "SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Settings\Network\Preferences" HKEY_LOCAL_MACHINE|HKEY_64BIT)
out SSID
#3
Thanks for you help, but unfortunatly the registry key has only the last SSID from the manually selected WLAN.
When WLAB connection is set to automatic connect, then the SSID will not saved into the key.
pi
#4
try this 

Function GetCurrentSSID
Code:
Copy      Help
str s ss
if(RunConsole2("NETSH WLAN SHOW INTERFACE" s)) end "failed"
if(findrx(s "   SSID .+"  0 1 ss)>0)
,ss.trim
,out ss 
else
,out s

@ Gintaras 
the actual command line is
NETSH WLAN SHOW INTERFACE | findstr /r "^....SSID"
Is there a way to do this in  RunConsole2  other than what i have done?
I couldn't get it to work directly with the full command in RunConsole2
it just ignored the findstr argument and just gave the results as if i sent NETSH WLAN SHOW INTERFACE
#5
nevermind figured it out
Function GetCurrentSSID2
Code:
Copy      Help
str s cl="cmd.exe /C NETSH WLAN SHOW INTERFACE | findstr /r ''^....SSID''"
RunConsole2 cl s
s.trim
out s
#6
Works fine.
Thanks!
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)