Following one suggestion I have just added an autohotkey branch in github repository.
In this version the button press causes unusal key combination: WIN+CTRL+SHIFT+ALT+S. Autohotkey waits for this combination and reacts by killing stats.exe and spssengine.exe tasks immediately. Autohotkey script and compiled script are both included in this branch.
This is much more reliable and flexible approach than my initial idea. Now it is possible to redefine the button action without reflashing the board.