Command line arguments/multiple account swapping

From Guild Wars 2 Wiki
Jump to navigationJump to search

This page outlines a possible method of swapping between accounts using shortcuts on Windows computers. Users with multiple accounts may previously have swapped accounts by using shortcuts with the -email and -password command line arguments, however this alternative method was removed in the January 22, 2019 update.



There are two .dat files used by Guild Wars 2.

  • The first is the well known Gw2.dat file located in the program files folder.
  • The second is the less well known Local.dat which lives in the user's application data folder - this file contains your user preferences (such as email, password, graphics options, etc).

By creating separate versions of Local.dat for each of your accounts and swapping between them prior to login, you can skip typing in your login details.

In the walkthrough below, the user is setting up login details for two accounts, one named "EU" and one named "NA".

Step 1 - Find your Local.dat file folder[edit]

Local.dat file folder

Open the following folder: %APPDATA%\Guild Wars 2. This resolves to something like C:\Users\<Username>\AppData\Roaming\Guild Wars 2.

Step 2 - Login to each of your accounts and copy the Local.dat[edit]

Local.dat file copies

Start the Guild Wars 2 client. Enter your login details, clicking the "Remember Account Name" and the "Remember Password" checkboxes. Continue to character select, then close the client. Switch to the folder you have open where your Local.dat file lives. Create a copy of the "Local.dat" file in the same location and name it with some identifying feature of the account. In this example the user has named their first account's dat file "Local - EU.dat".

Re-open the client, clear the Account Name and Password fields, and then enter the login details for your other account. Login successfully as before, then close the client. Create a copy of the "Local.dat" file again, naming it to reflect the account, e.g. "Local - NA.dat".

Repeat for any remaining accounts.

Step 3 - Make a batch file for each account[edit]

Batch files

Open a text editor, such as Notepad, and enter the following (optionally adding any of your preferred functional command line arguments such as -bmp or -mapLoadinfo as desired):

@echo off
copy "%APPDATA%\Guild Wars 2\Local - EU.dat" "%APPDATA%\Guild Wars 2\Local.dat"
echo "Switched to the Local - EU dat file, now launching - this window will close when you close GW2"
"C:\Program Files\Guild Wars 2\Gw2-64.exe" -autologin
copy "%APPDATA%\Guild Wars 2\Local.dat" "%APPDATA%\Guild Wars 2\Local - EU.dat"

Save this file as a windows batch file (*.bat) - e.g. "Swap to EU.bat"

Repeat the process of creating a batch file for each of your remaining accounts, e.g.

@echo off
copy "%APPDATA%\Guild Wars 2\Local - NA.dat" "%APPDATA%\Guild Wars 2\Local.dat"
echo "Switched to the Local - NA dat file, now launching - this window will close when you close GW2"
"C:\Program Files\Guild Wars 2\Gw2-64.exe" -autologin
copy "%APPDATA%\Guild Wars 2\Local.dat" "%APPDATA%\Guild Wars 2\Local - NA.dat"

And save this file under a different batch file name - e.g. "Swap to NA.bat"

Step 4 - Create shortcuts to the batch files[edit]

Shortcuts to bat files

Right click on the batch files and create shortcuts to them. Name them appropriately and move the shortcut somewhere useful, e.g. on the desktop.


Clicking on the shortcuts will now open a small black Command prompt window. It will overwrite the Local.dat file with the custom .dat file. It will then open the client where you can play as normal. The black window will remain in the background whilst you play. Closing the client will allow write access to the Local.dat file again, and the custom .dat file will be overwritten with any updates you've made to the client in this session.


If you do not want to have several Shortcuts to every batch File you can use the Script below.
Enter it into a Text File (e.g. Editor) and save ist as *.vbs in the same Folder as the Files created in Step 3.
Change the Name of the *.bat File in the Script to the Name of the Files of your own and add as many lines as needed for every of your *.bat Files.

If you run the *.vbs File you now can enter the Number of the Account you want to start. E.g. "1" will start your Main Account, "3" will start your 3rd Account.

Finally create a Shortcut to the *.vbs File and put it somewhere useful (e.g. Desktop).

a = InputBox("Enter Account Number to Start", "Start GW2 Account", "1")
select case a
case 1: myexe = "GW2 - Main.bat"
case 2: myexe = "GW2 - Acc2.bat"
case 3: myexe = "GW2 - Acc3.bat"
case else: MsgBox("-Input not valid-")
end select
if (len(myexe)>0) Then
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("""" & myexe & """")
end if

External links[edit]