Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Sets a value on a registry key.

Component Version macOS Windows Linux Server iOS SDK
Registry 7.2 ❌ No ✅ Yes ❌ No ✅ Yes, on Windows ❌ No
MBS( "Registry.SetValue"; Path; Name; Value; Type )   More


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.
Name The name of the value. "Hello"
Value The value to set. "World"
Type The data type to store. "text"


Returns OK or error.


Sets a value on a registry key.
Type can be Text, ExpandText, DWORD, BinaryHex, None, QWORD or List.
Use DWORD to save 32-bit integer number or QWORD to save 64-bit number.
For list, please pass a normal ¶ separated list and we translate it.
For BinaryHex type, please pass hex encoded data and we decode it before saving.


Set user name for FileMaker:

MBS( "Registry.SetValue"; "HKEY_CURRENT_USER\SOFTWARE\FileMaker\FileMaker Pro Advanced\16.0\Preferences"; "User Name"; "Mr. Miller"; "text")

Set initial file for FileMaker 19 or later:

MBS( "Registry.SetValue"; "HKEY_CURRENT_USER\SOFTWARE\FileMaker\FileMaker Pro\19.0\Preferences"; "UseInitialfile"; 1; "DWORD") &
MBS( "Registry.SetValue"; "HKEY_CURRENT_USER\SOFTWARE\FileMaker\FileMaker Pro\19.0\Preferences"; "Initialfile"; "filewin:/C:/Users/Christian/Desktop/JavaScript.fmp12"; "text")

Write EulaAccepted property for Whois app from Sysinternals to run it without license prompt:

Set Variable [ $r; Value: MBS( "Registry.CreateKey"; "HKEY_CURRENT_USER\SOFTWARE"; "Sysinternals") ]
Set Variable [ $r; Value: MBS( "Registry.CreateKey"; "HKEY_CURRENT_USER\SOFTWARE\Sysinternals"; "Whois") ]
Set Variable [ $r; Value: MBS( "Registry.SetValue"; "HKEY_CURRENT_USER\SOFTWARE\Sysinternals\Whois"; "EulaAccepted"; 1; "DWORD" ) ]

Change main dictionary:

MBS( "Registry.SetValue"; "HKEY_CURRENT_USER\SOFTWARE\FileMaker\FileMaker Pro\19.0\Preferences"; "Main Dictionary"; $path; "text")

Turn off advanced tools for FileMaker Pro 20:

MBS( "Registry.SetValue"; "HKEY_CURRENT_USER\SOFTWARE\FileMaker\FileMaker Pro\20.0\Preferences"; "Use Advanced Tools"; 0; "DWORD")

See also

Blog Entries

This function checks for a license.

Created 20th March 2017, last changed 10th February 2024

Registry.ListValues - RemoteControl.ClickMouse