[change]
No need to use reflection. You can add a link to your program directly to the bootloader and turn it off. Was there a blog post with the code for this on Tech and Me .
<h / "> You can include both versions in your deployment, but name them differently. Then check the bootloader application, if you are on a 32-bit or 64-bit system, copy the correct dll (for example, thirdparty64.dll → thirdparty.dll), to which your real program is bound, and then call your program from the loader, such as Assembly.Load and use reflection to start your main method.
An easier way is to compile your application as x86, ensuring that it always runs in 32-bit mode. If you do not rely on a specific application installed on a computer in 32/64-bit versions, this may be the best choice.
Mikael svenson
source share