Microsoft .NET Tricks
I am posting some general Microsoft .NET Tricks here that are either not widely known to the community, or that are of importance to me personally or this project in general.
Fixing No-Touch Deployment when 2.0 Framework is installed
No-Touch is a handler in Internet Explorer that identifies a .NET Assembly as an application and runs it (with reduced trust) on the end-user's machine. It has been superceeded by click-once. The issue is Microsoft does not store security settings in a common place for all versions of the framework, and Internet Explorer can only use the latest framework. Rather than display an error message indicating to an end-user why their application isn't loading (almost always a security request being denied), Microsoft instead flashes up a blank white window that it immediately closes.
The work around is to use a .NET Windows Forms Control in place of the href-exe, and then use that control to load and launch the href exe, by creating a new AppDomain and then using ExecuteAssembly to load and run the assembly.
This lets you catch and report the exception. No other technique that I have tested allows you to reliably catch the error. Microsoft shows doing a try/catch in sub main -- from testing it, I could not find any zone for which catching the exception in sub main reliably worked (reliably meaning more than once in a row). The control works in any zone (including Internet) and reports a valid message. On FireFox systems that have had the .NET XPI installed, the control approach will also work.