RootKey
Previous  Next

Sets the current root key.
Syntax: RootKey (Root As RegistryKey)
Root must be one of these properties:
rtClassesRoot - for HKEY_CLASSES_ROOT.
rtCurrentConfig - for HKEY_CURRENT_CONFIG (only on the desktop).
rtCurrentUser - for HKEY_USERS
rtLocalMachine - for HKEY_LOCAL_MACHINE
rtUsers - for HKEY_USERS

You must set the root key using this method before trying to access the registry.
Example:
Sub App_Start
      reg.New1
      reg.RootKey(reg.rtCurrentUser)
      ...
End Sub