Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 11:52

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: Running game from browser?
PostPosted: 24 Jun 2011 20:05 

Joined: 15 Jun 2011 15:19
Posts: 13
Hello, how its possible to write in the browser's url game:// and it immediately launches the game? Is it hard to implement something like this into game via ASM? or at least how do this works? Couldnt find any rookie-like article on google:(

Thanks :)


Top
 Profile  
 
 
 Post subject: Re: Running game from browser?
PostPosted: 24 Jun 2011 21:34 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
you need first to add a registry key to register that URL protocol.
the following program is useful to test that everything is working:
http://www.nirsoft.net/utils/url_protocol_view.html

and then you must only write the program that takes the first argument (for example IP and port or anything you want) and launches the game with CreateProcess


Top
 Profile  
 
 Post subject: Re: Running game from browser?
PostPosted: 24 Jun 2011 22:28 

Joined: 15 Jun 2011 15:19
Posts: 13
ok fine thanks!:)


Top
 Profile  
 
 Post subject: Re: Running game from browser?
PostPosted: 24 Jun 2011 23:03 

Joined: 15 Jun 2011 15:19
Posts: 13
Well, actually copied registry of Steam, and renamed it to game, now typing: game://install/440 and it should install me the game, but everything i see is:
The application "Steam" must be launched to open the link:
game://install/440

Do you want to proceed?, i click Yes and nothing happens, while steam should pop up, hmm why so?:P but steam://install/440 works :)


Top
 Profile  
 
 Post subject: Re: Running game from browser?
PostPosted: 24 Jun 2011 23:05 

Joined: 15 Jun 2011 15:19
Posts: 13
And nirsoft shows everything correctly.


Top
 Profile  
 
 Post subject: Re: Running game from browser?
PostPosted: 25 Jun 2011 22:21 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
I guess google can give better help, for example:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx


Top
 Profile  
 
 Post subject: Re: Running game from browser?
PostPosted: 26 Jun 2011 14:32 

Joined: 15 Jun 2011 15:19
Posts: 13
Thanks, made it work, the problem was that i forgot DefaultIcon.
For someone who would like to use it, here is example registry:

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\steam]
@="URL:steam protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\steam\DefaultIcon]
@="steam.exe"

[HKEY_CLASSES_ROOT\steam\Shell]

[HKEY_CLASSES_ROOT\steam\Shell\Open]

[HKEY_CLASSES_ROOT\steam\Shell\Open\Command]
@="\"C:\\Program Files\\Steam\\steam.exe\" \"%1\""



Top
 Profile  
 
 Post subject: Re: Running game from browser?
PostPosted: 26 Jun 2011 15:36 

Joined: 15 Jun 2011 15:19
Posts: 13
Actually Luigi, why cant i point it to start the game directly (without any other program with CreateProcess)? If my game has -connect IP:PORT parameters already built in. It starts but then it freezes in black screen, tried 999 ways and though that u do something wrong but i dont.. via batch it starts fine, but via URL Protocol not.


Top
 Profile  
 
 Post subject: Re: Running game from browser?
PostPosted: 26 Jun 2011 22:34 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
don't know why it gives you that effect because the url protocols are launched in detached mode.
I don't have other ideas at the moment because this is something I have never tested.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: