Originally posted by albybum
You can use an Onload event, but if you just use the Onload event to execute the program, it will just launch the program, and it will not be contained within your active desktop.
In order for the executable to be embedded into the html document you would need some type of container that could hold executable files and that could be embedded into html itself. I am not sure if there is anything that can achieve that. Most (if not all) programming used by html displays some result of an action, not the actual actions in progress, which is what an executable is. Java and Flash can achieve quite a bit of interaction, but (again to the best of my knowledge) there is no way to embed executable files in either of them.
Maybe someone has wrote a web interface for it. Thats what you are going to need.
[edit]
The reason this ability is not an option is it would open everyone up to very malicious content. Imagine if you went to a webpage and it automatically opened an executable file (with file privelages) when the page loaded. Everyone would be exposed to harmful content. No warning, just *BAM* harmful exe running while surfing warez sites.