Table of Contents

Registry

This object allows you to have access to the system's registry. It only works under Windows.

Functions

Registry

Constructor function.

Syntax

var myObject = new Registry();

Example

Create a Registry object.

var myObject = new Registry();

Methods

openKey

Opens a registry key.

Syntax

myObject.openKey(key, subkey);

Arguments

  1. key - (Key) the root key to use
  2. subkey - (string) the subkey to open

Returns

Exceptions

createKey

Creates a registry key.

Syntax

myObject.createKey(key, subkey);

Arguments

  1. key - (Key) the root key to use
  2. subkey - (string) the subkey to create

Returns

Exceptions

setValue

Sets the value of the current key.

Syntax

myObject.setValue(value, data);

Arguments

  1. value - (string) the value to write to
  2. data - (mixed) the data to write

Returns

Exceptions

value

Returns the data contained in a registry value.

Syntax

myObject.value(value);
myObject.value();

Arguments

  1. value - (string) the value to read

Returns

Exceptions

valueNames

Returns all the value names contained in the current key.

Syntax

myObject.valueNames();

Returns

Exceptions

keys

Returns all the keys contained in the current key.

Syntax

myObject.keys();

Returns

Exceptions

deleteValue

Deletes a value contained in the current key.

Syntax

myObject.deleteValue(value);
myObject.deleteValue();

Arguments

  1. value - (string) the value to delete

Returns

Exceptions

deleteKey

Deletes a registry key, or deletes the current key.

Syntax

myObject.deleteKey(key, subkey);
myObject.deleteKey();

Arguments

  1. key - (Key) the root key to use
  2. subkey - (string) the subkey to delete

Returns

Exceptions

closeKey

Closes the current key.

Syntax

myObject.closeKey();

Returns

Enumerations

Key

Root keys.

Values

  1. ClassesRoot: classes root
  2. CurrentConfig: current config
  3. CurrentUser: current user
  4. Users: users
  5. LocalMachine: local machine