Not quite what you are describing, but you can prevent any specific executable from ever running by configuring a "debugger" for it in Image File Execution options (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options). You add a key with the executable name and then add a "debugger" value, then point that debugger at C:\Windows\system32\systray.exe. Every time the named executable tries to launch, Windows will try to "debug" it with systray, which immediately exits so the program never actually runs. After uninstalling OneDrive this can be set to prevent OneDriveSetup.exe from ever running for example.