Sign in to follow this  
Followers 0
Wenadude

Registry Parsing

3 posts in this topic

Hi

I need to write a value to the registry to set the screen saver (SCRNSAVE.exe) and to make it active in all users.

All user GUIDs start with S-1-5-........(.....=rest of GUID number which is different per user and per machine.)

I cannot work out how to read just the first section of the GUID so as to write to it.

For testing purposes, I am just trying to read it for now(unsuccessfully)

regread("HKEY_USERS\%S-1-5-%\CONTROL PANEL\DESKTOP","FONTSMOOTHING"

Any clues for a newbie?

Thanks

Alistair

Share this post


Link to post
Share on other sites



Hi.

Welcome to the forum! ;)

What you need is:

1.) use regenumkey() to step through all user account keys, see help file

If the values found are put into the variable $NextKey, then...

2.) compare, if it's a "User Key":

if stringleft($NextKey,6) = "S-1-5-" then .... (modify the values you want to)

regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

Hi Rudi

Thanks for your help.

I used the first part of your advice and got it to work.

Much appreciated

Alistair

South Africa

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0