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:
-Brian
It is currently October 13th, 2024, 7:02 am
4.5.9 - Added USER_SID SysInfoType option
-
- Developer
- Posts: 2738
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
4.5.9 - Added USER_SID SysInfoType option
You do not have the required permissions to view the files attached to this post.
-
- Posts: 591
- Joined: February 28th, 2011, 3:20 pm
- Location: Vienna, Austria
Re: 4.5.9 - Added USER_SID SysInfoType option
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: Do you know if and how i can determine the resolutions (or the highest one) available?
On my computer only the following resolutions exist: 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.
-
- Developer
- Posts: 2738
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: 4.5.9 - Added USER_SID SysInfoType option
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
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
-
- Posts: 591
- Joined: February 28th, 2011, 3:20 pm
- Location: Vienna, Austria
Re: 4.5.9 - Added USER_SID SysInfoType option
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).
-
- Developer
- Posts: 2738
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: 4.5.9 - Added USER_SID SysInfoType option
This is a pretty good idea, however, an empty RegValue will actually retrieve the key's default value (if there is one).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 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
-
- Developer
- Posts: 2738
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: 4.5.9 - Added USER_SID SysInfoType option
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:
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.
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:
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.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 591
- Joined: February 28th, 2011, 3:20 pm
- Location: Vienna, Austria
Re: 4.5.9 - Added USER_SID SysInfoType option
Thank you for implementing this! I agree it's not too terribly useful - but who knows what we can think of in the future.
-
- Posts: 353
- Joined: September 3rd, 2018, 11:18 am
-
- Developer
- Posts: 2738
- Joined: November 24th, 2011, 1:42 am
- Location: Utah