Registry.GetValue
-----------------

Queries value of key’s value.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Registry](component_Registry.md) | [7.2](newinversion72.md) | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |

MBS( "Registry.GetValue"; Path; Name ) 

**MBS**( **"Registry.GetValue";** /\* Queries value of key’s value. \*/  
**$Path**; /\* The path to the parent registry key.  
Separated by \\ you specify the path to the key you want.  
Root can be Classes, CurrentUser, LocalMachine, Users, PerformanceData, CurrentConfig, DynData or the HKEY names.e.g. "Users\\test" \*/   
**$Name**) /\* The name of the value.e.g. "Hello" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The path to the parent registry key.   Separated by \\ you specify the path to the key you want.   Root can be Classes, CurrentUser, LocalMachine, Users, PerformanceData, CurrentConfig, DynData or the HKEY names. | "Users\\test" |
| Name | The name of the value. | "Hello" |

### Result

Returns value or error.

### Description

Queries value of key’s value.  
We return Text, Link or ExpandText as text.  
Binary is returned hex encoded.  
DWORD or QWORD is returned as numbers.  
Lists are converted to FileMaker list.  
### Examples

Query value:

 MBS ( "Registry.GetValue"; "CurrentUser\\Test"; "Hello")  
Query FileMaker's printer settings:

 MBS ( "Registry.GetValue"; "HKEY\_CURRENT\_USER\\SOFTWARE\\FileMaker\\FileMaker Pro Advanced\\16.0 \\Preferences"; "Printer")  
Query Windows product name:

 MBS ( "Registry.GetValue"; "HKEY\_LOCAL\_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"; "ProductName")  
Query user name:

 MBS ( "Registry.GetValue"; "HKEY\_CURRENT\_USER\\SOFTWARE\\FileMaker\\FileMaker Pro Advanced\\16.0 \\Preferences"; "User Name")  
Query FileMaker Cache Size:

 MBS ( "Registry.GetValue"; "HKEY\_CURRENT\_USER\\SOFTWARE\\FileMaker\\FileMaker Pro Advanced\\16.0 \\Preferences"; "Cache Size")  
Query whether we have FileMaker Pro Advanced 17:

 MBS ( "Registry.GetValue"; "HKEY\_CURRENT\_USER\\SOFTWARE\\FileMaker\\FileMaker Pro Advanced\\17.0 \\Preferences"; "Use Advanced Tools")  
Query language value for FileMaker 19:

 MBS ( "Registry.GetValue"; "HKEY\_CURRENT\_USER\\Software\\FileMaker\\FileMaker Pro\\19.0 \\Preferences"; "Language")  
### See also

- [Registry.DeleteValue](RegistryDeleteValue.md)
- [Registry.GetValueType](RegistryGetValueType.md)
- [Registry.ListValues](RegistryListValues.md)
- [Registry.SetValue](RegistrySetValue.md)

### Blog Entries

- [Detect and disable advanced database tools](https://www.mbsplugins.de/archive/2024-02-14/Detect_and_disable_advanced_da/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 20th March 2017 , last changed 15th December 2021

  
[Registry.FlushKey](RegistryFlushKey.md) - [Registry.GetValueType](RegistryGetValueType.md)

[HTML Version](RegistryGetValue.shtml)