Command line arguments

From Guild Wars 2 Wiki
Jump to navigationJump to search

Command-Line Arguments are directives which are added to the start up command of the game executable file. There are directives which change the client's behavior, streamline player login and enable diagnostics.

Command line arguments can be prefixed with either "-" or "/", so these are the same:

-clientport 80
/clientport 80

Arguments can be separated by space (" ") or colon (":"), so these are the same:

-clientport:80
-clientport 80

Usage[edit]

Note: Since only Windows is officially supported, all instructions below are for Windows.

Via shortcut[edit]

You can execute switches directly from your Guild Wars 2 shortcut:

  1. Right click on your Guild Wars 2 shortcut and select "Properties".
  2. In the "Target Area" field you will see the location of your Guild Wars 2 executable file (Gw2.exe for older 32-bit operating systems and Gw2-64.exe for 64-bit systems) like: "...\Guild Wars 2\Gw2-64.exe"
  3. Write the desired command line arguments after the quote marks, each beginning with a space, like: "...\Guild Wars 2\Gw2-64.exe" -perf -windowed
  4. Click OK.

Via start/run[edit]

If you don't plan on using an argument frequently, it can be easier to use the Run command for a single invocation:

  1. Start the "Run" dialogue by pressing Windows+R.
  2. Enter the path to the GW2.exe or Gw2-64.exe in quotes followed by the arguments you wish to use (same as above, but in a single line).
  3. Press enter.

Via Settings.json[edit]

Added with the June 2017 PvP Feature Pack, Settings.json is a file that can be placed in the following locations:

  • %APPDATA%\Guild Wars 2\Settings.json (Note: %APPDATA% is an Environment Variable, which usually translates into C:\Users\<Your Windows Account Name>\AppData\Roaming by default.)

The file must contain valid JSON or it will be ignored without warning. Here is an example one:

 {
     "arguments":[
         "-prefreset",
         "-autologin",
         "-windowed",
         "-mapLoadinfo"
     ]
 }

Via PATH variables[edit]

An alternative is to add the GW2 directory to your user PATH environment variable. This allows GW2 to be executed as a command line command, enabling easy access to arguments. After performing the following, GW2 can be invoked as "gw2 -<argument string>" from the command line:

  1. Start the "Run" dialogue by pressing Windows+R.
  2. Enter the following command: control sysdm.cpl, and hit enter to run it.
  3. Go to the Advanced tab.
  4. Press the "Environment variables..." button at the bottom.
  5. Double click the PATH variable under "User variables", the top section.
  6. Prefix the list with "<GW2 install directory>;" (without quotes and with the semi-colon).
  7. Click OK on all dialogs.

List of current arguments[edit]

-32[edit]

Forces the game to run in 32-bit mode.

-authsrv <string>[edit]

Specifies the IP or DNS that can be used to connect to a login server.

-autologin[edit]

Logs in automatically, if the client has been set to remember the Account Name and Password.

-bmp[edit]

Forces the game to create lossless screenshots as .BMP files.
  • Used for creating higher-quality screenshots at the expense of much larger files.

-clientport 443[edit]

Instructs the client to connect to the game servers over port 443 (HTTPS) instead of 6112 (commonly used for games).
  • Some ISPs may prioritize traffic at certain times, and some networks may block port 6112. This may be useful to avoid such scenarios.
  • Some ISPs, networks, and other forms of MITM attacks may modify traffic on port 443 which will lead to issues with the GW2 client if this option is used (this is less-likely to occur than with port 80).

-clientport 80[edit]

Instructs the client to connect to the game servers over port 80 (HTTP) instead of 6112 (commonly used for games).
  • Some ISPs may prioritize traffic at certain times, and some networks may block port 6112. This may be useful to avoid such scenarios.
  • Some ISPs, networks, and other forms of MITM attacks may modify traffic on port 80 which will lead to issues with the GW2 client if this option is used.

-dat <string>[edit]

Uses the specified file instead of the default GW2.dat file.

-diag[edit]

Instead of launching the game, this command creates a detailed diagnostic file that contains diagnostic data that can be used for troubleshooting. The file, NetworkDiag.log, will be located in your game directory or "Documents\Guild Wars 2". If you want to use this feature, be sure to create a separate shortcut for it.

-forwardrenderer[edit]

Uses Forward Rendering instead of Deferred Rendering.
  • Shadows and lighting may not render properly.
  • This may improve overall framerate for certain graphics cards.

-fps <number>[edit]

Sets the maximum frames per second.
This setting only has an effect during loading screens whereas the value for the Frame Limiter setting configured in the Graphics Display Options is applied while inside the game world.

-ignorecoherentgpucrash[edit]

Ignores crashes caused by Coherent UI (used by for example the Login screen, Gem Store and Trading Post) allowing you to continue playing.

-image[edit]

Runs the patch UI only in order to download any available updates; closes immediately without loading the login form.
  • Recommended: Create an extra Guild Wars 2 shortcut (e.g. "Guild Wars 2 Updater") specifically to use this command line switch.

-log[edit]

Enables the creation of a log file, used mostly by Support. The path for the generated file usually is %APPDATA%\Guild Wars 2\Gw2.log.
  • (Note: %APPDATA% is an Environment Variable, which usually translates into C:\Users\<Your Windows Account Name>\AppData\Roaming by default.)

-mapLoadinfo[edit]

Appearance of -maploadinfo.
Shows diagnostic information during map loads, including load percentages and elapsed time.

-mce[edit]

Start the client with Windows Media Center compatibility, switching the game to full screen and restarting Media Center (if available) after the client is closed.

-mumble <string>[edit]

Used to specify the name of the file mapping to which the game client will write data in MumbleLink format.
  • Passing zero (i.e. -mumble 0) disables MumbleLink output.

-nodelta[edit]

Disable delta patching when updating game files.

-nomusic[edit]

Disables music and background music.

-nosound[edit]

Disables audio system completely.

-noui[edit]

Disables the user interface. This does the same thing as pressing Ctrl Shift H in the game.

-portal <string>[edit]

Used to specify the IP-address or DNS-name to use for connecting to a portal/gate server.

-prefreset[edit]

Resets game settings.

-provider <string>[edit]

Used to select which account login provider is used. Portal is used for the standalone login servers, and Steam is used for Steam.
  • Portal can be used to log in with a standalone account when launching the game through Steam.
  • Steam is the default launch argument for Steam, and can't be used to bypass Steams client for logging in.
Important: This will not link a standalone account with a Steam account. Purchases made via Steam will still be credited to the Steam account.

-repair[edit]

Start the client, checks the files for errors and repairs them as needed. This can take a long time (1/2 hour or an hour) to run as it checks the entire contents of the ~50 gigabyte archive.
  • This is rarely necessary as the archive is always checking for errors as it runs; if it finds an error, it will schedule a repair for the next time the game starts.
  • The archive reads and writes certain parts of the disk fairly frequently; if you are getting a lot of disk errors, this is a sign that your drive may be dying.

-shareArchive[edit]

Opens the Gw2.dat file in shared mode so that it can be accessed from other processes while the game is running.

-uispanallmonitors[edit]

Spreads user interface across all monitors in a triple monitor setup.

-umbra gpu[edit]

Forces the use of Umbra's GPU accelerated culling.
  • This may result in higher CPU usage, lower GPU usage, and an overall decrease in framerate.

-uninstall[edit]

Presents the uninstall dialog. If uninstall is accepted, it deletes the contents of the Guild Wars 2 installation folder except GW2.EXE itself and any manually created subfolders. Contents in subfolders (if any) are not deleted.

-useOldFov[edit]

Disables the widescreen field-of-view enhancements and restores the original field-of-view.

-verify[edit]

Used to verify the .dat file.

-windowed[edit]

Forces Guild Wars 2 to run in windowed mode.
In game, you can switch to windowed mode by pressing Alt+Enter or clicking the window icon in the upper right corner.

Deprecated arguments[edit]

Over time, ArenaNet has introduced and removed several arguments. See the /deprecated subpage for details.

Related content[edit]