|
|
|
|
Functions
MioScript Reference
|
|
Syntax
| reg.writeValue(productID, name, value) |
Parameters
| PID | productID | Optional. Product ID. If set to null, the Id of the current application is used.
| | STRING | name | Name to retrieve the value later.
| | STRING | value | Value to write in the registry database. |
Return value
No value is returned.
Description
Writes a value in the registry database.
This function should be used to save settings and any small data that needs to be retrieved when the application is restarted.
See also: reg.readValue.
Info: The value is written in HKEY_LOCAL_MACHINE if the user is administrator, or in HKEY_CURRENT_USER if the user is not administrator.
For more information: system.userIsAdmin.
Note: This function is defined in the library klib.k and is linked automatically. |
MioScript Sample Code
// Read
&result = reg.readValue("{APP_ID}", "MyValue", "Not found!")
alert(&result)
// Write
reg.writeValue("{APP_ID}", "MyValue", "This is a value")
// Read again
&result = reg.readValue("{APP_ID}", "MyValue", "Not found!")
alert(&result)
|
|
|
|