36 const ENV_KEY =
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment';
60 $this->latestError =
null;
83 public function exists($key, $subkey, $entry =
null)
85 $this->
writeLog(
'Exists ' . $key .
'\\' . $subkey .
'\\' . $entry);
104 public function getValue($key, $subkey, $entry =
null)
108 $this->latestError =
null;
110 $this->
writeLog(
'GetValue ' . $key .
'\\' . $subkey .
'\\' . $entry);
136 return $this->
setValue($key, $subkey, $entry, $value,
'SetStringValue');
150 return $this->
setValue($key, $subkey, $entry, $value,
'SetExpandedStringValue');
164 return $this->
setValue($key, $subkey, $entry,
null,
'DeleteValue');
178 private function setValue($key, $subkey, $entry, $value, $type)
182 $this->latestError =
null;
184 $this->
writeLog(
'SetValue ' . $key .
'\\' . $subkey .
'\\' . $entry);
185 $this->
writeLog(
'-> value: ' . $value);
186 $this->
writeLog(
'-> type: ' . $type);
189 $regType = self::REG_SZ;
190 if ($type ==
'SetExpandedStringValue') {
191 $regType = self::REG_EXPAND_SZ;
192 } elseif ($type ==
'SetStringValue') {
193 $regType = self::REG_SZ;
197 if ($type ==
'DeleteValue' && !empty($entry)) {
200 } elseif ($type ==
'DeleteValue' && empty($entry)) {
208 if ($subkey == self::ENV_KEY) {
220 if ($type !=
'DeleteValue' && !empty($value)) {
222 if ($verifyValue != $value) {
const REGISTRY_SET_ERROR_TEXT
static debug($data, $file=null)
static initClass($classInstance)
setExpandStringValue($key, $subkey, $entry, $value)
const PROCESSOR_REG_SUBKEY
getValue($key, $subkey, $entry=null)
setValue($key, $subkey, $entry, $value, $type)
setStringValue($key, $subkey, $entry, $value)
const PROCESSOR_REG_ENTRY
exists($key, $subkey, $entry=null)
deleteValue($key, $subkey, $entry)
static registrySetValue($hive, $key, $value, $data, $type='REG_SZ')
static registryExists($hive, $key, $value=null)
static registryDeleteValue($hive, $key, $value)
static registryGetValue($hive, $key, $value='')
static registryDeleteKey($hive, $key)