Server setup using the windows task manager to run an AA:PG server.

Acquiring the Server Files

Put the following link: steam://install/203300 [http//steam] in a web browser to download the server tool

And/or find it in your Steam library:
unnamed file 287

Go to your local files for the server:
unnamed file 288

Open the Binaries folder:
unnamed file 289

Open the Win32 folder:
unnamed file 290

Make note of the install location, as we will need this in the Task Scheduler:
unnamed file 291

Task Scheduler

Open the Task Scheduler: (windows key, type: Task Scheduler)
unnamed file 292

Add a folder to contain all the AA:PG tasks:
?id=2755512480unnamed file 293

Create a task:
unnamed file 294

Depending on your computer setup, you may need to “Change User or Group…”. I recommend consulting a friend familiar with user accounts if the account you log in with has any issues with running the server.
unnamed file 295

Add an Action:
unnamed file 296

Setup the Action (find the AAGameServer.exe location we saved in the previous section):
unnamed file 297Program/script:
“steamapps\common\AAPG Dedicated Server\Binaries\Win32\AAGameServer.exe”

Add arguments (optional):
-connectip= -port=7778 -voipport=8765 -SQP=27015 -log=Server_PrivateServer1_7778.log -servername=”AAPG Private Server 1″ -aauregion=2

The given options:

  • “connectip” should be set to your external ip address which can be acquired at:
  • “port” is for game traffic, 7778 is default
  • “voipport” is for game voip, 8765 is default (this is limited to 32 connections)
  • “SQP” is for talking to Steam, 27015 is default
  • “log” sets a custom name for the log file (include the port in the name if running multiple)
  • “servername” is the name of the server, including in Steam’s server list
  • “aauregion” Is always set to 2. TODO – does it need this?

Windows Firewall

Open the Windows Firewall: (windows key, type: Firewall)

unnamed file 298

Select “Allow an app or feature through Windows Defender Firewall”

unnamed file 299

Press the “Allow another app…” button

unnamed file 300

Press the “Browse…” button and navigate to your AAGameServer.exe. Then press “Open”.

unnamed file 301

The “AAGameServer.exe” should now show as allowed on your firewall list.

Starting/Stopping the Server

unnamed file 302

  • “Run” the task when you want the server on
  • “End” the task to stop the server
  • “Disable” the task to stop the server, and prevent the automatic restart

(Optional) Automatic log file cleanup


This is a simple way to add automated log cleanup using the task scheduler.

unnamed file 303

unnamed file 304

unnamed file 305

unnamed file 306

/p “C:\AAPG\DedicatedServer_Win32\AAGame\Logs” /s /d -7 /c “cmd /c del /q @file”

Command Info:

  • ForFiles: Selects and runs a command on a file or set of files. This command is most commonly used in batch files.
  • /p specifies the path to the folder
  • /s allows the command to also check subdirectories
  • /d tells the command how many days a file is allowed to exist, and to delete anything older than “-7” 7 days old
  • /c sets the command to run on each file, that is over 7 days old
  • cmd /c says to execute a command
  • del, is the command we want (delete), and it is in “/q” quiet mode (it will not prompt for actions)
  • @file inserts the file that “ForFiles” identified as over 7 days old

(Optional) Automatic Startup/Restart

Go back to the task that you created to start your server.

unnamed file 307

We can add another trigger to the task, so that if the server crashes, it will cause the server to run again after a minute. Press the “New…” button. Then use the settings in the image below:

unnamed file 308

Now go to the Settings tab, and use the image below for reference.

unnamed file 309

(Optional) Options for Multiple Servers

unnamed file 310

The last topic we have is how to use the Task Scheduler to run multiple servers, using the same game folder. The “-configsubdir” parameter on the AAGameServer.exe allows you to specify which folder to use for each server. You also need to use “-log=LogName.log” so that your servers do not attempt to use the same log file.

Here is an example set of “Add arguments (optional):” for your “Start a program” Action on each task:

-configsubdir=PrivateServer1 -connectip= -port=7778 -voipport=8765 -SAP=8778 -SQP=27015 -log=Server_PrivateServer1_7778.log -servername=”AAPG Private Server 1″ -aauregion=2

-configsubdir=PrivateServer2 -connectip= -port=7779 -voipport=8766 -SAP=8779 -SQP=27016 -log=Server_PrivateServer2_7779.log -servername=”AAPG Private Server 2″ -aauregion=2

In the above you should note the need for a unique “configsubdir”, a unique “servername”, as well as differing port values.

unnamed file 311

unnamed file 312

The last thing to do is add the folders, as you named them in the arguments. Then copy all the game’s default*.ini files into those folders.

Run the game server for the first time, as it will generate 4 files: PCServer-*.ini. Then stop the game server. Those are the 4 files you can use to modify settings.

Thanks to Kartigan for his great guide, all credit to his effort. you can also read the original guide from Steam Community. enjoy the game.