Core Function RegRead
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> RegRead( <key>, <value>, <default> ) </pre> === Description === Reads a value from the registry === Parameters === ==== key ==== The registry key to read. ==== value ...") |
|||
Line 16: | Line 16: | ||
The value to read. | The value to read. | ||
+ | |||
+ | ==== default ==== | ||
+ | |||
+ | Optional; The value to return if the read failed. | ||
+ | |||
+ | (Default: "" empty string) | ||
=== Return Value === | === Return Value === | ||
− | Success: Returns the correct | + | Success: Returns the correct data. |
− | Failure: Returns | + | Failure: Returns the default data. |
=== Remarks === | === Remarks === |
Revision as of 22:56, 27 April 2012
RegRead( <key>, <value>, <default> )
Contents |
Description
Reads a value from the registry
Parameters
key
The registry key to read.
value
The value to read.
default
Optional; The value to return if the read failed.
(Default: "" empty string)
Return Value
Success: Returns the correct data.
Failure: Returns the default data.
Remarks
None.
Example
my $var = RegRead(@"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion", @"ProgramFilesDir"); MsgBox("Program files are in: $var");