Hide toolbar/menu button if a specific path does not exist

Rather old post, nevertheless, I'm currently trying to hide/show a button if a path does not exists on my Windows installation.

Perhaps this feature already exists, running the latest (beta) of DO?

Edit: According to this thread,
I've now set up a global var "winmerge_installed" that is set to true or false in an OnInit script:

function OnInit(initData) {
...
    initData.config_desc = DOpus.Create.Map();
    var configName = "";
    configName = "winmerge_installed";
    initData.Config[configName] = DOpus.FSUtil.Exists("/programfilesx86\\WinMerge");

The button, that I want to show or hide has this code:

@hideif:!$glob:winmerge_installed

However, this does not work as expected. May I assume that the code above does just check if the var itself is available and not check it's value, likewise true or false?