tags:

views:

20

answers:

1

How do I read a particular vb program settings or registry entry from the registry of the key "HKEY_USERS\S-1-5-21-1390067357-1965331169-725345543-1003\Software\VB and VBA Program Settings".A standardized way to read as the part after hikey_users and before software changes with the pc used,but the vb programs do write perfectly at the right place.Is there some variable that defines the registry key location ?

+2  A: 

VB6 has built-in functions for manipulating the registry, like GetSetting. These functions use registry keys underneath HKEY_CURRENT_USER\Software\VB and VBA Program Settings

HKEY_USERS\S-1-5-21-1390067357-1965331169-725345543-1003\Software\VB and VBA Program Settings is just another path to the same set of keys: the long string in the middle identifies the current user by their ID, rather than just saying "the current user".

So the answer is:

  • If you are using VB6, just use GetSetting.
  • If you are using VBScript, use WshShell.RegRead and work on HKEY_CURRENT_USER\Software\VB and VBA Program Settings. Example code in this article.
MarkJ
Thanks for the help.It worked fine.
Dario Dias