Image Execution Options
(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
) with a key named after the executable and a string (REG_SZ
) value is known to be a nice inroute if you need to modify the behavior of an application to be launched.
However, if I have a very common name for an executable, such as launcher.exe
, how can I be a bit more specific? Can I at all?
I'd like to make sure that only the particular binary I have in mind will be affected, although in my particular use case it's only a moderate impact if I cannot limit it to the exact executable.
I would like to write myself a little wrapper program that, similar to Process Explorer from Sysinternals, replaces the standard behavior for my specific launcher.exe
in that it sets the environment variable similar to set __COMPAT_LAYER=RUNASINVOKER
in a shell.
Now I know how to write the wrapper and all, the main question is, whether there is a way to tell in the registry, using some magic underneath Image Execution Options
, to limit the scope of the Debugger
value "hack" or would I have to filter this in my wrapper?
Relates to: