« Claris Engage confere… | Home | MBS FileMaker Plugin,… »

Detect and disable advanced database tools

At Claris Engage we learnt from Wim Decorte that it may be better to disable advanced tools if possible. Quite a few ways to hack a FileMaker solution go by using the debugger to check scripts or data viewer to read or evaluate some things. Advanced tools are great for developers, but normal users may not need these tools. You can use the checkbox in the preferences dialog:

Let's go and check via plugin on whether advanced tools are enabled. You may have scripts check for this and or react on the outcome. e.g. if enabled and user is not developer or admin, then disable it automatically for the next launch of FileMaker. Or included the status in some reporting to server, so you know which user has it turned on.

We can query the status on macOS with preferences functions like this:

MBS( "Preferences.GetValue"; ""; "Preferences:UseAdvancedTools" )

The value is a boolean, so either 1 if enabled or 0 if not. On Windows with the check in the registry:

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

Please note that the Windows version has the version of FileMaker included there. This may be 18.0, 19.0 or 20.0. And 20.0 even if FileMaker is version 20.3 as Claris doesn't change the version in the registry for each .1 update.

You can disable advanced mode for the next launch by the plugin on macOS:

MBS( "Preferences.SetValue"; "com.filemaker.client.pro12"; "Preferences:UseAdvancedTools"; 0; "integer")

And on Windows:

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

This will both write the value to the preferences. Please note that if you visit the preferences dialog, the new setting will not show and clicking OK there may overwrite it. If you set the value in start script, you may also set it in the closing script to make sure it is off when FileMaker quits.

You can also set the flag via AI_DISABLEADVANCEDTOOLS option in the Assisted Install text file at installation. But our scripts allow you to check for this on every opening of the database. Claris FileMaker Plugin
14 02 24 - 10:32