Reading more than on registry roots

RobVanBrunschot

Member
Licensed User
Longtime User
Hello,

I am trying to read in more than one registry root but it does not work!

Normally I work with the rtCurrentUser rootkey but now I also need to read in the rtLocalMachine rootkey but hat allways fails.

Can anyone show me a small example how to do that?

Thanks in advance.

Regards,
Rob
 

specci48

Well-Known Member
Licensed User
Longtime User
Hello RobVanBrunschot,

see the attached sample...


specci48
 

Attachments

  • Registry.sbp
    1.2 KB · Views: 206

RobVanBrunschot

Member
Licensed User
Longtime User
Hello RobVanBrunschot,

see the attached sample...


specci48

specci48, thanks for your response.

The only thing is that it does not work for me.
The error message is:
The object reference is not stated on a object

The component registry is added and two objectes are added, reg1 and reg2.

regards, Rob
 

RobVanBrunschot

Member
Licensed User
Longtime User
Erel,

I did try it on the desktop (under Windows Vista) and the error comes at the command Label4.Text = reg2.GetValue(key, "Value")

Rob
 

specci48

Well-Known Member
Licensed User
Longtime User
I developed the example under xp.

Maybe vista stores that value at a different place or does anyone know, if these values can only be read with administrator rights?


specci48
 

RobVanBrunschot

Member
Licensed User
Longtime User
I got it working, my paths were not correct.

Thanks for all the help.

Regards, Rob
 
Top