# MX\_GETREG > [HTML Version](mx_getreg.htm) _Reviwed April 2024_ **xcall MIAMEX, MX\_GETREG, key, subkey, name, value** (Windows/ATE only) MX\_GETREG (MIAMEX 99) allows you to retrieve values from the system Registry. Also see [MX\_REGISTRY](mx_registry.htm.md), which offers a more extensive set of registry access capabilities. **Parameters** _key _([Num](num.htm.md) or B,4) \[in\] must be one of the following specified values: | **Symbol** | **Value** | |------|------| | HKEY\_CLASSES\_ROOT | \&h80000000 | | HKEY\_CURRENT\_USER | \&h80000001 | | HKEY\_LOCAL\_MACHINE | \&h80000002 | | HKEY\_USERS | \&h80000003 | | HKEY\_PERFORMANCE\_DATA | \&h80000004 | | HKEY\_DYN\_DATA | \&h80000005 | | **Definition file: [ashell.def](ashell_def.htm.md)** | [Hex-Decimal Values](hex-decimalvalues.htm.md) _subkey_ ([String](string.htm.md)) \[in\] is the sub key within the specified _key_ section of the Registry. This may have multiple parts, e.g. "Software\\Microsoft\\MediaPlayer\\Player\\RecentFileList". _name_ ([String](string.htm.md)) \[in\] is the name of the particular value to look for within the specified _subkey_. You may specify a blank string to get the default value. (Many _subkey_s have only a default value.) For the _subkey_ example given above, the likely names will be "File0", "File1", etc. _value_ (type corresponding to registry data type) \[out\] will return the value of the specified item. The parameter type specified must match the type of the registry item: use B,4 for REG\_DWORD items, string for REG\_SZ and REG\_EXPAND\_SZ items, unformatted for other types. Dynamic strings (S,0) are allowed, but the internal maximum size is 1024; data items larger than 1024 bytes will come back as null strings. Environment variables, found in registry items of type REG\_EXPAND\_SZ, will be expanded. See History for details. **Comments** In the case of ATE (with one of the GUI-enabled "G" emulations), the request will be automatically forwarded to the ATE client, even when the server is Windows (i.e. ATSD). To query the server-side registry, use MX\_REGISTRY instead.