It is currently April 27th, 2024, 6:56 am

SSID does not show the right information

Get help with installing and using Rainmeter.
Hankman
Posts: 2
Joined: November 2nd, 2023, 12:47 pm

SSID does not show the right information

Post by Hankman »

Hi.
I used the code below as part of a windows widget.
It has always been working ok.
I'm a Windows insider and received the last Canary build yesterday: 25987.1000.

Now the SSID shows -1 instead of the name of the connected device.

Code: Select all

[MeasureSSID]
DynamicVariables=1
Measure=WiFiStatus
#Measure=Plugin
#Plugin=WiFiStatus
WiFiInfoType=SSID
WiFiIntfID=0

[MeterWiFiText]
Meter=String
MeasureName=MeasureSSID
X=86
Y=10R
FontColor=247,249,185,255
#FontColor=245,225,129,255
#FontColor=229,224,224,255
FontSize=8
FontFace=Century Gothic
UpdateDivider=-1
AntiAlias=1
InlineSetting=Case | Upper
Text="SSID         %1"
Is it just a windows bug or can I change some rainmeter coding?
Last edited by balala on November 3rd, 2023, 8:24 pm, edited 1 time in total.
Reason: Please use [code] tags when postând codes. It's the </> button.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: SSID does not show the right information

Post by Yincognito »

Hankman wrote: November 2nd, 2023, 1:00 pm Hi.
I used the code below as part of a windows widget.
It has always been working ok.
I'm a Windows insider and received the last Canary build yesterday: 25987.1000.

Now the SSID shows -1 instead of the name of the connected device.

[MeasureSSID]
DynamicVariables=1
Measure=WiFiStatus
#Measure=Plugin
#Plugin=WiFiStatus
WiFiInfoType=SSID
WiFiIntfID=0

[MeterWiFiText]
Meter=String
MeasureName=MeasureSSID
X=86
Y=10R
FontColor=247,249,185,255
#FontColor=245,225,129,255
#FontColor=229,224,224,255
FontSize=8
FontFace=Century Gothic
UpdateDivider=-1
AntiAlias=1
InlineSetting=Case | Upper
Text="SSID %1"

Is it just a windows bug or can I change some rainmeter coding?
I can't speak for Win 11 or the latest versions, but bar the commenting using ; instead of # in the .ini syntax (which doesn't affect the result here), the code is fine. The culprit might be either a Windows bug or some change they operated in that version preventing Rainmeter from getting the right value. Alternatively / in the meantime, I guess you could try some PowerShell (both directly to see if it's really a Windows bug, and in a RunCommand measure in your skin afterwards) to get the SSID instead.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Hankman
Posts: 2
Joined: November 2nd, 2023, 12:47 pm

Re: SSID does not show the right information

Post by Hankman »

I found a solution and don't use the WifiStatus anymore, because of the problem in Windows 11 Insider Builds.

I was peeking around in the registry and found the WLanProfileName:

Code: Select all

[MeasureSSID]
DynamicVariables=1
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE\Stats
RegValue=WlanProfileName


[MeterWiFiText]
Meter=String
MeasureName=MeasureSSID
etc.....

It works fine now !!
Last edited by balala on December 21st, 2023, 9:19 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting codes. It's the </> button.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: SSID does not show the right information

Post by Yincognito »

Hankman wrote: December 21st, 2023, 8:51 pm I found a solution and don't use the WifiStatus anymore, because of the problem in Windows 11 Insider Builds.

I was peeking around in the registry and found the WLanProfileName:

[MeasureSSID]
DynamicVariables=1
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE\Stats
RegValue=WlanProfileName


[MeterWiFiText]
Meter=String
MeasureName=MeasureSSID
etc.....

It works fine now !!
Glad you found a solution that works for you - thanks you for sharing! Note, however, that this might not work for another computer, operating system version and so on - which is something to consider if by any chance you want to release your skin. For example, in my case (Windows 10), this is how the key you mentioned looks like:
OOBE.jpg
Notice how the RegValue is missing.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth