RegistryHandler

This class provides the functions around Windows registries.

Properties
Name Summary
ComputerName this property has the target computer name.
HiveNames hive names. See RegistryHandler.HiveNames.
ValueKinds value kinds. See RegistryHandler.ValueKinds.

Methods
RegistryHandler.CloseBaseSubKey()
RegistryHandler.GetSubKeyNames($hive, $path)
RegistryHandler.GetTree($hive, $path)
RegistryHandler.GetValue($hive, $path, $name)
RegistryHandler.GetValueNames($hive, $path)
RegistryHandler.Initialize($computername)
RegistryHandler.OpenBaseSubKey($hive, $path, $writing)
RegistryHandler.SetValue($hive, $path, $name, $value, $valuekind)
RegistryHandler.TranslateHive($from)
RegistryHandler.TranslateValueKind($from)

ex)
# create instance
$rh = new RegistryHandler;
# initialize
$rh = $rh.Initialize($env:COMPUTERNAME);
# get sub key names
$subkeys = $rh.GetSubKeyNames($rh.HiveNames.HKEY_LOCAL_MACHINE, "software");
# check it out
$subkeys;
# get tree
$t = $rh.GetTree($rh.HiveNames.HKEY_LOCAL_MACHINE, "software\microsoft\windows nt\currentversion\winlogon");
# check it out
$t;
# get value
$myvalue = $rh.GetValue($rh.HiveNames.HKEY_LOCAL_MACHINE, "software\microsoft\windows nt\currentversion\winlogon", "shell");
# check it out
$myvalue;

Last edited Mar 2, 2013 at 12:18 PM by Tom__S, version 7

Comments

No comments yet.