Reads a value from the registry.
RegRead ( "keyname", "valuename" )
| keyname | The registry key to read. |
| valuename | The value to read. |
| Success: | Returns the requested registry value. @EXTENDED is set to the type of the value $REG_... . These types are defined in the "Constants.au3" include file. |
| Failure: | Returns "" and sets the @error flag: |
| 1 if unable to open requested key | |
| 2 if unable to open requested main key | |
| 3 if unable to remote connect to the registry | |
| -1 if unable to open requested value | |
| -2 if value type not supported |
Local $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")
MsgBox(4096, "Program files are in:", $var)