Introducing: Guild Wars Multi-Launch

Killamus

Guest

Join Date: Oct 2008

Quote:
Originally Posted by imkey View Post
The way the system is readied for another guild wars instance is the "kill mutex" button which calls a function that iterates through the nt process list looking at all active guild wars instances. For each instance it finds, it attempts to find/kill the mutex handle which would prevent more gw instances from opening.

Putting the mutex killing functionality in a timer would eat up unnecessary cpu cycles. That mutex does not just get created randomly by guild wars, it only happens during the initialization function when guild wars starts. One just needs to make sure to hit the button once after a new gw instance is created to be ready to launch another.

I would have liked better integration with Texmod but since that is a closed source product and I am not aware of it accepting command arguments, you are correct in assuming that it basically just launches it. It was mainly added as a convenience to the user.

On another note, check out HandleManager.cs. I spent the majority my coding time on that file. Partly due to the fact that it P/invokes into Nt kernel api functions which are not well documented by Microsoft. Had to look at several sources to get the required constants and applicable functions. It contains the core mutex killing code which makes this application possible. All the other code is really just utility and gui.
Wow, that's it? That's... Stupidly simple, lol. I mean, you look at other programs that do this (Matty's, GWx2), which modify the registry and such, and this is such an genius idea. I'm impressed.
I'm also impressed at the neat code, an art form I can't seem to master...

MisterB

MisterB

Furnace Stoker

Join Date: Oct 2005

Planet Earth, Sol system, Milky Way galaxy

[ban]

W/

Thanks for writing this program. This was very easy to setup and use.

imkey

Frost Gate Guardian

Join Date: Dec 2006

Green and Pink

Mo/

Well.. it also does set the registry to the right path before launch. This is required since gw.exe uses the registry value to locate gw.dat and gw.exe.

If it is not set to the right value, gw would not be using the right data file for use/updates.

Quote:
Originally Posted by Killamus View Post
Wow, that's it? That's... Stupidly simple, lol. I mean, you look at other programs that do this (Matty's, GWx2), which modify the registry and such, and this is such an genius idea. I'm impressed.
I'm also impressed at the neat code, an art form I can't seem to master...

Snograt

Snograt

rattus rattus

Join Date: Jan 2006

London, UK GMT??0 ??1hr DST

[GURU]GW [wiki]GW2

R/

Problem.

I've been using this since you released it with little to no problems, yet today it's just falling down with "Error launching: F:\Games\Guild Wars\Gw.exe!"

Nothing has changed that I know of - I've been using the generated shortcuts to launch it which have never failed until now.

imkey

Frost Gate Guardian

Join Date: Dec 2006

Green and Pink

Mo/

That is strange. I do not have access to my build machine at the moment to change some source in Form1.cs to send you a debug exe to get more info on the error.

Will have access tomorrow night.

Snograt

Snograt

rattus rattus

Join Date: Jan 2006

London, UK GMT??0 ??1hr DST

[GURU]GW [wiki]GW2

R/

Don't worry, imkey - logged on this morning and everything was fine again.

Maybe a Windows update temporarily threw a spanner in the .net framework or something.

Trollstyle

Trollstyle

Ascalonian Squire

Join Date: May 2007

Hungary

Unga Bunga Clan [UNG]

W/

Hi Could anyone help me, I cant log in with two accounts anymore. The first one works but the second one I run using the multi-launch is not able to connet (error058).

imkey

Frost Gate Guardian

Join Date: Dec 2006

Green and Pink

Mo/

error 58 is a networking configuration/firewall issue.
Make sure that both copies are allowed to pass thru the firewall.

If you can connect on one but not the other, it is most likely a firewall issue. The firewall software may have exceptions setup to allow one of them to connect but no the other. Just add the other to exceptions list.

Quote:
Originally Posted by Trollstyle View Post
Hi Could anyone help me, I cant log in with two accounts anymore. The first one works but the second one I run using the multi-launch is not able to connet (error058).

Killamus

Guest

Join Date: Oct 2008

Quote:
Originally Posted by Trollstyle View Post
Hi Could anyone help me, I cant log in with two accounts anymore. The first one works but the second one I run using the multi-launch is not able to connet (error058).
Or, even more likey, GW is having server problems. That's the error code when their servers crash/reset too, despite not being mentioned anywhere.

spamslayer

Ascalonian Squire

Join Date: Dec 2005

Ascalon

SOUP

W/Mo

Thanks for this; so glad it is open source too, I feel safe

Awex Mafyews

Awex Mafyews

Krytan Explorer

Join Date: Mar 2008

Cornwall

W/Mo

Hey I'm probably missing something simple here but I've made 2 copies of guild wars (from my original one) tried to launch then with GWML and 2 loading boxes appear and then only one opens properly. No error screen for other box it just disappears. I've tried GWx2 before and I've seen on this thread something about replacing exe. file but do you have to replace the original versions exe file too? Also tried running in administrator to no joy. I have windows vista 32 bit as well. Any help on the matter would very welcome

Edit: Failed to mention, I tried GWx2 before finding this and that didn't work either so don't know whether that's related in any way

Awex Mafyews

Awex Mafyews

Krytan Explorer

Join Date: Mar 2008

Cornwall

W/Mo

Ok seems the problem was the exe file, just reinstalled my copy off of the guild wars site, started up GWML and it worked straight away perfectly Thanks a lot for the program.

Star Gazer

Star Gazer

Wilds Pathfinder

Join Date: Nov 2005

Zerohour Enterprises [ZHE]

W/

excellent program. Thank you!

4 accounts on CoF run......oh the bliss!

also got 3 accounts ran through EotN with my primary. excellent!

coil

Krytan Explorer

Join Date: Aug 2007

this thing is awesome, thank you for this.

Nida

Ascalonian Squire

Join Date: May 2007

Australia

Rt/

tried 4 or 5 times to install /run this but it doesnt appear to work. I extracted the files and installed it, but I get an error every time I try and launch and it shuts down.

oh yeah.. running on XP home..

Killamus

Guest

Join Date: Oct 2008

Quote:
Originally Posted by Nida View Post
tried 4 or 5 times to install /run this but it doesnt appear to work. I extracted the files and installed it, but I get an error every time I try and launch and it shuts down.
Do you have the .net framework installed? That looks very similar to the error I get when trying to run my code at school (They're far too "Busy" *cough*lazy*cough* to install it properly)

Nida

Ascalonian Squire

Join Date: May 2007

Australia

Rt/

Quote:
Originally Posted by Killamus View Post
Do you have the .net framework installed? That looks very similar to the error I get when trying to run my code at school (They're far too "Busy" *cough*lazy*cough* to install it properly)
um.. fresh computer install, had to format a few days ago, but I think I do... how would I check/know?

Killamus

Guest

Join Date: Oct 2008

Control Panel -> Add/Remove programs, and look about 1/3rd of the way down. You should see "Microsoft .NET Framework X.X", if you don't, you don't have it installed. If you do have it, post the highest number you see there. You'll see a few, probably.

stretchs

stretchs

Jungle Guide

Join Date: Sep 2007

Untimely Demise [Err了] - SOHK

Just installed this on one of my pc's so I can GM for my new pre character, worked like a champ with no issues in Vista.

Thanks for the great software.

firefox74

Ascalonian Squire

Join Date: Jul 2007

Is this Legal to use ?

Thinking of Anet's Emula



Think it's a awesome program and have so many possibilities all rdy know several things I can use this for

tryx3

Pre-Searing Cadet

Join Date: Jan 2009

[gore]

E/Me

Works fine for me, just hope that your not getting a pile of passwords :P lol

Killamus

Guest

Join Date: Oct 2008

Quote:
Originally Posted by tryx3 View Post
Works fine for me, just hope that your not getting a pile of passwords :P lol
Look through the source yourself. C# reads a lot like English, compared to other programming languages. Or, if you don't want to do that, get a real firewall (Such as Zone alarm, there's a free version last I checked) and block off the program. Far as I can tell, it doesn't even have an updater, so it shouldn't ever use the internet.

tryx3

Pre-Searing Cadet

Join Date: Jan 2009

[gore]

E/Me

Quote:
Originally Posted by Killamus View Post
Look through the source yourself. C# reads a lot like English, compared to other programming languages. Or, if you don't want to do that, get a real firewall (Such as Zone alarm, there's a free version last I checked) and block off the program. Far as I can tell, it doesn't even have an updater, so it shouldn't ever use the internet.

Yea, looking through the code proves what you said, and C# is a bit easier to comprehend, even though i can somewhat use other code. I have a real firewall in avg. Thanks for telling me what to do :

tryx3

Pre-Searing Cadet

Join Date: Jan 2009

[gore]

E/Me

Sorry, dont have a google account. So posting the bug here.

In the dual launch, i've found that the /wiki feature doesnt work, atleast for me.

Sorry if this is already known.

sykoone

Jungle Guide

Join Date: Dec 2005

Mystical Chaos

E/

I gotta say thanks for this, especially now. Something they did with the new update changed the way GW naturally points at an install. I'm running three accounts, each with it's own shortcut and display settings. After the update, the shortcut for my main account updated and launched from my secondary's install. After that, neither of my other two installs would update or run. I ran your launcher, used the clear mutex, and all was well again. Plus, it fixed that nasty little bit where Texmod wouldn't work.

MisterB

MisterB

Furnace Stoker

Join Date: Oct 2005

Planet Earth, Sol system, Milky Way galaxy

[ban]

W/

Quote:
Originally Posted by sykoone View Post
After the update, the shortcut for my main account updated and launched from my secondary's install. After that, neither of my other two installs would update or run. I ran your launcher, used the clear mutex, and all was well again. Plus, it fixed that nasty little bit where Texmod wouldn't work.
+1

I experienced the same issue after the update, and the launcher fixed it. Cheers.

sykoone

Jungle Guide

Join Date: Dec 2005

Mystical Chaos

E/

I asked Joe Kimmes about this on the wiki. He said the update shouldn't have caused this kind of problem, and to send in a support ticket. I suggest everyone who uses multiple installs contact support, even though we already have a fix for it. That way, those who don't use this program can still get a fix.

MisterB

MisterB

Furnace Stoker

Join Date: Oct 2005

Planet Earth, Sol system, Milky Way galaxy

[ban]

W/

Quote:
Originally Posted by sykoone View Post
I asked Joe Kimmes about this on the wiki. He said the update shouldn't have caused this kind of problem, and to send in a support ticket. I suggest everyone who uses multiple installs contact support, even though we already have a fix for it. That way, those who don't use this program can still get a fix.
The second update today did the same thing. I'll contact support to let them know of the issue, even though I have a fix for the problem. I understand ANet and NCSoft do not support multiple clients on the same PC, but regular use of the original client install should not do this, and did not exhibit this behavior prior to today's update.

gwen armor

Pre-Searing Cadet

Join Date: Sep 2007

Tidal Wavers

Mo/

Merci beaucoup Imkey pour ce magnifique travail, tout marche super bien, pas de bug, facile à prendre en main... que du bonheur

Snograt

Snograt

rattus rattus

Join Date: Jan 2006

London, UK GMT??0 ??1hr DST

[GURU]GW [wiki]GW2

R/

^what she said.

Thanks a lot, imkey - many, many satisfied customers

worstnameevar

worstnameevar

Academy Page

Join Date: Nov 2008

Between Earth and Sky

The Thuggee[lain]

N/

The simplest and most functional multi-launcher I've certainly ever used!

The community and I thank you for your most valued contribution.

sykoone

Jungle Guide

Join Date: Dec 2005

Mystical Chaos

E/

Is anyone else having a problem with the latest update breaking the program? I can't seem to get it to look at my second install at all anymore.

imkey

Frost Gate Guardian

Join Date: Dec 2006

Green and Pink

Mo/

I tried it with latest update, it is working on my end.

With updates, it's important to allow Guild Wars to update itself and get to login screen before starting another copy.

Do you have more information of the behavior of the second copy not working? Are you using WinVista/Win7? If so you may need to start launcher as admin if any of the active gw instances started under admin privileges. (not sure if this happens when updater needs to write to gw.dat in program files folder?)

Would like to get to the bottom of the update issues since it is coded to be update proof as possible... unless they intentionally change how gw detects another instance.

sykoone

Jungle Guide

Join Date: Dec 2005

Mystical Chaos

E/

I'm using Windows 7, but didn't have any issues until the last few batches of updates. The August update made it impossible for me to update each copy without running your launched to kill the mutex. Now that doesn't even work. Each copy tries to launch from my main install's dat file. I've tried renaming the original dat and hitting the mutex button (which worked before yesterday) and it just starts to download a new dat from scratch.

As far as intentional changes, I doubt it. I spoke with support about the issues, at the advice of Joe Kimmes, and after a couple weeks or research, they responded that there were no changes made that should have changed the way multiple clients work.

Eluvatar

Eluvatar

Lion's Arch Merchant

Join Date: Jun 2009

MQSC

E/

I'm also having problmes thou I'v never been able to use more then one copy in win7 I'll try the older versions

Edit: ha I got it now. you need to use the 32bit version of GWML even if your useing a 64bit version of 7 thats they only way its ever worked for me. I suspect its cause guildwars is running in 32bit mode.

imkey

Frost Gate Guardian

Join Date: Dec 2006

Green and Pink

Mo/

that kinda sucks if that's the case... I have xp32bit, vista 64-bit, and win7 32bit installed. I thought I had covered the bases but if only the 32bit version works with win7 32 or 64 bit, I'll need to update notes...

I will install win7 64bit to do some tests to see if I can get to the bottom of this.

Quote:
Originally Posted by Eluvatar View Post
Edit: ha I got it now. you need to use the 32bit version of GWML even if your useing a 64bit version of 7 thats they only way its ever worked for me. I suspect its cause guildwars is running in 32bit mode.
@ skyoone
Are you on 32 or 64 bit win7? I will go see if Win7 is doing anything weird with registry paths. If gw.exe is pointing to a diff dat, it means the registry path was not set to the right copy.

sykoone

Jungle Guide

Join Date: Dec 2005

Mystical Chaos

E/

I'm running 32 bit.

Eluvatar

Eluvatar

Lion's Arch Merchant

Join Date: Jun 2009

MQSC

E/

oh... that sucks for you cause I'm running win7 64 bit :\..... maby you should try the 64bit one sry and gl

thejynxed

thejynxed

Academy Page

Join Date: May 2005

Medieval Knights of Darkness [MKOD]

A/

Question: Why not just avoid the whole waiting for both gw.dat files to update issue by having your program first run gw.exe with the -image modifier before it launches the 'normal' gw.exe copies? Or at the very minimum, pop up a small warning screen that strongly suggests doing this first. It would save quite a bit of hassle IMHO (I do it myself every single time GW is updated anyhow.)

MisterB

MisterB

Furnace Stoker

Join Date: Oct 2005

Planet Earth, Sol system, Milky Way galaxy

[ban]

W/

Quote:
Originally Posted by thejynxed View Post
Question: Why not just avoid the whole waiting for both gw.dat files to update issue by having your program first run gw.exe with the -image modifier before it launches the 'normal' gw.exe copies? Or at the very minimum, pop up a small warning screen that strongly suggests doing this first. It would save quite a bit of hassle IMHO (I do it myself every single time GW is updated anyhow.)


?

If you don't want a bunch of shortcuts, you can make a batch file:

Code:
"F:\Games\Guild Wars\Gw.exe" -image
"F:\Games\Guild Wars Copy\Gw.exe" -image
F:\Games\GWMultiLaunch_v0.5RC_32bit\GWMultiLaunch\GWMultiLaunch.exe "F:\Games\Guild Wars\Gw.exe" "-windowed"
F:\Games\GWMultiLaunch_v0.5RC_32bit\GWMultiLaunch\GWMultiLaunch.exe "F:\Games\Guild Wars Copy\Gw.exe" "-windowed"
Save as all files in Notepad, and name it "Multi-Launch Guild Wars.bat," or whatever. Repeat line 2 and 4 for every directory you have if you have more than 2 copies. Replace paths with your own. You'll probably want to put this batch in a folder and shortcut it to the desktop, because GWML creates a .ini file if you run this script.

Personally, I prefer to split the batch files, i.e, one to update, and one to launch multiple clients. If you want to do it in one go, that batch file works for me to update both clients and then launch them. I'm using XP SP3; I don't know or care if Vista will do this.