• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

How can I start an .Exe file from a website?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

FarEast

Most Generous Member
Joined
Apr 4, 2002
Location
J@pan
Hey all could some one tell me how this is done. I run a dedicated server for BattleField 1942 for the OCG site that some of you might be aware of and I have a live view site that shows whats going on in game.

What I want to do is setup a button that the player can hit and it will launch the game and send them directly to the server they are viewing.

I tried this line but with no luck:

<a href="c:\Program Files\EA Games\Battlefield 1942\BF1942.exe +game DesertCombat +IP www.ocg.servegame.com"><BUTTON value="JOIN GAME" height="3" width="3"></a>

If some one with more knowledge is out there in these matters please help me out!
 
You want to execute a file on the players(viewers) computer? If so thats what you are trying to do. Sorry to say, but that isnt possible as of yet.
 
Keep in mind that many users don't place their BF1942 executable in the same place. Mine, for instance, resides on the "E:" filesystem. Also, I'd be willing to bet that most or all of these tricks to start an executable depend on the user running IE. I don't know of any way to do this in a portable manner.
 
This is also from that site, but you will need to get your users to run a program first to install the proper registry key:
IF you have access to each client to add a regsitry key you can do what you want seamlessly ...
To execute c:\my prog\prog.exe %a %b %c

Add to a new key to HKEY_CLASSES_ROOT called 'myprog'
Add an empty string to this key called 'URL Protocol'
Add the sub-keys: \shell\open\command
Set the value of the default string inside the command key to: " c:\my prog\prog.exe %1"

On your web page have your link as:
<A HREF="myprog: %a %b %c">run myprog</A>
 
Back