On Windows 7-10 (maybe also lower versions?) to disable the F1 button in all programs (just for the currently logged in user), save this file as disable.reg and run it:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\Typelib\{8cec5860-07a1-11d9-b15e-000d56bfe6ee}\1.0\0\win32]
@=""
[HKEY_CURRENT_USER\SOFTWARE\Classes\Typelib\{8cec5860-07a1-11d9-b15e-000d56bfe6ee}\1.0\0\win64]
@=""
Or open regedit, browse to HKEY_CURRENT_USER\SOFTWARE\Classes\Typelib, create a Key (folder) named {8cec5860-07a1-11d9-b15e-000d56bfe6ee}, then create a Key inside that named 1.0, then create a Key inside that named 0, then create 2 Keys inside that named win32 and win64. Open each of the winXX Keys, double click (Default) and then press OK. Observe that the Data has changed from (value not set) to be blank.
To re-enable the F1 key, save this file as enable.reg and run it:
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\SOFTWARE\Classes\Typelib\{8cec5860-07a1-11d9-b15e-000d56bfe6ee}]
Or open regedit, browse to HKEY_CURRENT_USER\SOFTWARE\Classes\Typelib and delete the folder named {8cec5860-07a1-11d9-b15e-000d56bfe6ee}