en:code:data:registry
Differences
This shows you the differences between two versions of the page.
| Previous revision | |||
| — | en:code:data:registry [2021/02/13 11:23] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Registry ====== | ||
| + | This object allows you to have access to the system' | ||
| + | It only works under Windows. | ||
| + | ===== Functions ===== | ||
| + | |||
| + | ==== Registry ==== | ||
| + | Constructor function. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | var myObject = new Registry(); | ||
| + | </ | ||
| + | |||
| + | === Example === | ||
| + | Create a Registry object. | ||
| + | <code javascript> | ||
| + | var myObject = new Registry(); | ||
| + | </ | ||
| + | |||
| + | ===== Methods ===== | ||
| + | |||
| + | ==== openKey ==== | ||
| + | Opens a registry key. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.openKey(key, | ||
| + | </ | ||
| + | |||
| + | === Arguments === | ||
| + | - key - ([[# | ||
| + | - subkey - (string) the subkey to open | ||
| + | |||
| + | === Returns === | ||
| + | * (Registry) this Registry | ||
| + | |||
| + | === Exceptions === | ||
| + | * (OpenKeyError) unable to open the key | ||
| + | |||
| + | ==== createKey ==== | ||
| + | Creates a registry key. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.createKey(key, | ||
| + | </ | ||
| + | |||
| + | === Arguments === | ||
| + | - key - ([[# | ||
| + | - subkey - (string) the subkey to create | ||
| + | |||
| + | === Returns === | ||
| + | * (Registry) this Registry | ||
| + | |||
| + | === Exceptions === | ||
| + | * (CreateKeyError) unable to create the key | ||
| + | |||
| + | ==== setValue ==== | ||
| + | Sets the value of the current key. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.setValue(value, | ||
| + | </ | ||
| + | |||
| + | === Arguments === | ||
| + | - value - (string) the value to write to | ||
| + | - data - (mixed) the data to write | ||
| + | |||
| + | === Returns === | ||
| + | * (Registry) this Registry | ||
| + | |||
| + | === Exceptions === | ||
| + | * (SetValueError) cannot set the value data | ||
| + | |||
| + | ==== value ==== | ||
| + | Returns the data contained in a registry value. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.value(value); | ||
| + | </ | ||
| + | <code javascript> | ||
| + | myObject.value(); | ||
| + | </ | ||
| + | |||
| + | === Arguments === | ||
| + | - value - (string) the value to read | ||
| + | |||
| + | === Returns === | ||
| + | * (mixed) the data contained in a registry value | ||
| + | |||
| + | === Exceptions === | ||
| + | * (FindValueError) cannot find the value to read | ||
| + | * (InvalidValueError) invalid value type | ||
| + | |||
| + | ==== valueNames ==== | ||
| + | Returns all the value names contained in the current key. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.valueNames(); | ||
| + | </ | ||
| + | |||
| + | === Returns === | ||
| + | * (array) an array containing all the value names contained in the current key | ||
| + | |||
| + | === Exceptions === | ||
| + | * (InvalidKeyError) unable to query informations about this key | ||
| + | |||
| + | ==== keys ==== | ||
| + | Returns all the keys contained in the current key. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.keys(); | ||
| + | </ | ||
| + | |||
| + | === Returns === | ||
| + | * (array) an array containing all the keys contained in the current key | ||
| + | |||
| + | === Exceptions === | ||
| + | * (InvalidKeyError) unable to query informations about this key | ||
| + | |||
| + | ==== deleteValue ==== | ||
| + | Deletes a value contained in the current key. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.deleteValue(value); | ||
| + | </ | ||
| + | <code javascript> | ||
| + | myObject.deleteValue(); | ||
| + | </ | ||
| + | |||
| + | === Arguments === | ||
| + | - value - (string) the value to delete | ||
| + | |||
| + | === Returns === | ||
| + | * (Registry) this Registry | ||
| + | |||
| + | === Exceptions === | ||
| + | * (InvalidKeyError) unable to delete the key | ||
| + | |||
| + | ==== deleteKey ==== | ||
| + | Deletes a registry key, or deletes the current key. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.deleteKey(key, | ||
| + | </ | ||
| + | <code javascript> | ||
| + | myObject.deleteKey(); | ||
| + | </ | ||
| + | |||
| + | === Arguments === | ||
| + | - key - ([[# | ||
| + | - subkey - (string) the subkey to delete | ||
| + | |||
| + | === Returns === | ||
| + | * (Registry) this Registry | ||
| + | |||
| + | === Exceptions === | ||
| + | * (InvalidKeyError) unable to create the key | ||
| + | |||
| + | ==== closeKey ==== | ||
| + | Closes the current key. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.closeKey(); | ||
| + | </ | ||
| + | |||
| + | === Returns === | ||
| + | * (Registry) this Registry | ||
| + | |||
| + | ===== Enumerations ===== | ||
| + | |||
| + | ==== Key ==== | ||
| + | Root keys. | ||
| + | |||
| + | === Values === | ||
| + | - ClassesRoot: | ||
| + | - CurrentConfig: | ||
| + | - CurrentUser: | ||
| + | - Users: users | ||
| + | - LocalMachine: | ||
