Command line arguments/multiple account swapping
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
-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
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 account and copy the Local.dat
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
Open a text editor, such as Notepad, and enter the following (optionally adding any of your preferred functional command line arguments such as
-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 (x86)\Guild Wars\Guild Wars 2\Gw2.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 (x86)\Guild Wars\Guild Wars 2\Gw2.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
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.