It is currently April 18th, 2024, 7:44 pm

4.5.9 - Added USER_SID SysInfoType option

Changes made during the Rainmeter 4.5 Release Cycle
User avatar
Brian
Developer
Posts: 2678
Joined: November 24th, 2011, 1:42 am
Location: Utah

4.5.9 - Added USER_SID SysInfoType option

Post by Brian »

Added a new SysInfoType to the SysInfo measure. SysInfoType=USER_SID
https://docs.rainmeter.net/manual/measures/sysinfo/#SysInfoType

While not too terribly useful, this security identifier is often used in the Windows Registry to store various user settings.

One use for the users security identifier, is to find the location of the users Windows 10/11 profile picture.
Here is an example skin:
ProfilePicture_1.0.rmskin

-Brian
You do not have the required permissions to view the files attached to this post.
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: 4.5.9 - Added USER_SID SysInfoType option

Post by ikarus1969 »

When running your example skin, i get no result. I noticed that on my system not all resolutions you mentioned in your skin (1080, 448, 424, 240, 208, 192, 96, 64, 48, 40, 32) exist.

On my computer only the following resolutions exist:
Screenshot Reg.png
Do you know if and how i can determine the resolutions (or the highest one) available?
You do not have the required permissions to view the files attached to this post.
User avatar
Brian
Developer
Posts: 2678
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: 4.5.9 - Added USER_SID SysInfoType option

Post by Brian »

Hmmm, I don't know of a way off the top of my head. It probably depends on the size of the original picture chosen.

If you could read the registry from within Lua, you could probably parse all the keys and find the largest number...but that seems pretty involved. A quick search on the internet shows a few examples.

You could probably create a measure for each "size", and then if the largest size doesn't exist, you could enable the measure with the next size smaller...and so on. That might take some doing to get "right" though.

-Brian
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: 4.5.9 - Added USER_SID SysInfoType option

Post by ikarus1969 »

Brian wrote: January 30th, 2022, 12:46 am You could probably create a measure for each "size", and then if the largest size doesn't exist, you could enable the measure with the next size smaller...and so on. That might take some doing to get "right" though.
-Brian
I will do that as a workaround.

From your point of view would it make sense to adapt the registry-measure in a way that, when no RegValue is given (or an empty RegValue) the measure gives a list of available values in the given RegKey? Maybe comma-separated (or another delimiter character).
User avatar
Brian
Developer
Posts: 2678
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: 4.5.9 - Added USER_SID SysInfoType option

Post by Brian »

ikarus1969 wrote: January 30th, 2022, 8:14 am From your point of view would it make sense to adapt the registry-measure in a way that, when no RegValue is given (or an empty RegValue) the measure gives a list of available values in the given RegKey? Maybe comma-separated (or another delimiter character).
This is a pretty good idea, however, an empty RegValue will actually retrieve the key's default value (if there is one).

This would probably require a new option, that could define the behavior of the measure. You could presumably want the RegValue like today, or maybe a list of any sub key names, or a list of values (like you suggested).

We will discuss this and hopefully come up with a solution.

-Brian
User avatar
Brian
Developer
Posts: 2678
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: 4.5.9 - Added USER_SID SysInfoType option

Post by Brian »

So, as of Rainmeter 4.5.9, we added a few options to the Registry measure.
https://docs.rainmeter.net/manual/measures/registry/#AlternativeBehavior

They aren't going to be too terribly useful, however, for this profile picture project - they come in handy.

Here is the updated skin:
ProfilePicture_2.0.rmskin

The only difference between version 1.0 and 2.0 of this skin is the extra step of retrieving the list of values from the Account Pictures\Users\S-1-5-21-.... key, then parsing the list with lua to get the largest image size.

-Brian

Edit: Fixed version. :oops:
You do not have the required permissions to view the files attached to this post.
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: 4.5.9 - Added USER_SID SysInfoType option

Post by ikarus1969 »

Thank you for implementing this! I agree it's not too terribly useful - but who knows what we can think of in the future.
User avatar
Jeff
Posts: 327
Joined: September 3rd, 2018, 11:18 am

Re: 4.5.9 - Added USER_SID SysInfoType option

Post by Jeff »

Brian wrote: February 1st, 2022, 7:34 pm So, as of Rainmeter 4.9.10, we added a few options to the Registry measure.
Be careful with that time machine Brian
User avatar
Brian
Developer
Posts: 2678
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: 4.5.9 - Added USER_SID SysInfoType option

Post by Brian »

Jeff wrote: March 12th, 2022, 9:47 pm Be careful with that time machine Brian
Oh dang! We released it too early! :sly:


Good catch! I edited that post.

-Brian