BF42 - Start from URL

For info on the site, community and 'battlefieldy' things

BF42 - Start from URL

Postby Jeronimo » Sat Jul 10, 2010 12:41 pm

I've made a little VBScript which extends your Browser (TS3 etc.) with the ability to start BF1942 and connect to a server directly from a hyperlink. It works with the following URL format definition:

bf1942://ip:port/mod

For example:
bf1942://127.0.0.1:14567/dc_final

Download here:
http://public.valkyrie-clan.com/downloads/tools/scripts/start_bf1942.vbs.txt

I have renamed the file to .txt, so it is downloadable. It's plain text and you find installation instructions inside. VBScript files can be run natively under Windows XP or higher - no other software required.

You can "save the choice" when your browser asks you for if it should open with an external program, since the script will always ask you again if you really wanna join.
Here's a link to our clan's server which should work right away if installed correctly: bf1942://81.20.132.132:14567/dc_final

It has been tested on XP only - the necessary registry entries might differ on Vista or 7. I will extend the script if somebody reports that it doesnt work for Vista/7.

This is "open source" (obviously) and may be used and extended without limitations. No warranties for damage that ... bla bla you know already, read the code if you dont trust it ^^
Image
Jeronimo
 
Posts: 197
Joined: Sun Dec 27, 2009 8:55 pm
Location: Germany

Re: BF42 - Start from URL

Postby Jeronimo » Thu Jul 15, 2010 1:55 am

No other way, since you need something that parses the URL. BF itself unfortunately doesnt do it (like TS or IRC, for example).
Image
Jeronimo
 
Posts: 197
Joined: Sun Dec 27, 2009 8:55 pm
Location: Germany

Re: BF42 - Start from URL

Postby fo0k » Thu Jul 15, 2010 2:38 am

This is neat!

But perhaps needs an active x style installer to prompt you and then do the magic.
User avatar
fo0k
 
Posts: 1411
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Postby freddy » Thu Jul 15, 2010 2:45 am

i´m thinking of implementing this on our webpage, will download and take a look.

thanks!
User avatar
freddy
 
Posts: 1183
Joined: Sun Oct 18, 2009 4:58 pm

Re: BF42 - Start from URL

Postby Jeronimo » Thu Jul 15, 2010 12:24 pm

fo0k wrote:But perhaps needs an active x style installer to prompt you and then do the magic.


Yeah, but GUI is a big problem with vbscript ^^ The only thing the installer does is to create the registry keys so your machine knows the protocol "bf1942" and what program is linked to it. These keys will be overwritten when you someday reinstall your BF in another folder and then just start the script again there. So all input the "installer" needs is where your bf1942.exe is located, and this is given to it by putting it in the same folder. Put it in and run - installation complete. That's it ;)

The good thing about VBScript (and that is why I chose it) is that it is the only script language that has the interpreter already there with every Windows. So I can give you the source code instead of something compiled, and it's still runable without installing an interpreter.
Image
Jeronimo
 
Posts: 197
Joined: Sun Dec 27, 2009 8:55 pm
Location: Germany

Re: BF42 - Start from URL

Postby hardrock » Fri Aug 27, 2010 5:59 pm

this is the first website forum i ever joined, not the date shown, but i think back in like '03 or so, and i'm old, as is the game, but you all are the she-it, (spell it, dont read it, lol), of them all. keep it up yall!
hardrock
 
Posts: 7
Joined: Fri Feb 05, 2010 5:25 pm

Re: BF42 - Start from URL

Postby Shrooms » Sat Aug 28, 2010 11:36 pm

My friend enfo is having trouble with the script working. He is getting the error invalid root in registry key HKCR/bf1942 That doesn't make sense
Shrooms
 
Posts: 69
Joined: Wed Aug 11, 2010 12:35 am

Re: BF42 - Start from URL

Postby Jeronimo » Sun Aug 29, 2010 12:34 am

Please gimme some more details... what OS is he using?
Image
Jeronimo
 
Posts: 197
Joined: Sun Dec 27, 2009 8:55 pm
Location: Germany

Re: BF42 - Start from URL

Postby Shrooms » Sun Aug 29, 2010 2:39 am

He's using vista 32 bit, and i walked him through the process and it just doesn't seem to work
Shrooms
 
Posts: 69
Joined: Wed Aug 11, 2010 12:35 am

Re: BF42 - Start from URL

Postby Jeronimo » Sun Aug 29, 2010 1:01 pm

I just installed Win7 x86 on a VM to test it.

My first approach with an admin user and no password set led to the exact same error message.
After a little bit of googling it became clear that this is the case when the user doesn't have write access to the hive key HKEY_CLASSES_ROOT in the registry. The script places reg keys there to link to the bf1942:// protocol.

So I gave my admin account a password then and restarted. After that I could run the installation without problems. All keys were installed and worked correctly when clicking on a link.

So for the installation in Vista and Win7 the script must be run in an admin account that has a password. Note: This is only necessary once for all users when installing the script by running it from the bf1942 folder.

Can you please try again and tell me if that helped?
Image
Jeronimo
 
Posts: 197
Joined: Sun Dec 27, 2009 8:55 pm
Location: Germany

Next

Return to General discussion & notices

Who is online

Users browsing this forum: Baidu [Spider] and 6 guests

cron