Jump to content

Registry Parsing


Wenadude
 Share

Recommended Posts

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

Link to comment
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!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...