How to Play Age of Empires III on Linux (Invalid CD Key Error)

Gaming on Linux is getting easier than ever thanks to huge efforts from the community, but there are still some hurdles left before you can play some of your favorite games.

As I tried to play Age of Empires III: Complete Edition on Steam, I was greeted with the following Invalid CD Key error:

Error loading the PID Generator DLL. The DLL could not be found!

Please make sure the file is available in the installation directory and try again,

The problem is known and there are already some instructions out there, but I could not find all the required steps in a single place. This tutorial uses Pop!_OS, but should work on any Ubuntu / Debian based distros (e.g. Linux Mint), and can be adapted to other distros using your preferred package manager. Here are the steps:

  • Install Steam (either from the Pop!_shop, Software Center or apt)
  • Log in
  • In the Steam settings, enable Proton for non-supported games (use the latest stable version)
  • Install the game, run it once, then exit when you get to the CD key input
This is painful
  • Install winetricks if you don’t already have it (you can also find it in apt)
cd "${HOME}/Downloads"
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
sudo mv winetricks /usr/bin/winetricks
export WINETRICKS=/usr/bin/winetricks
sudo apt install python3-pip python3-setuptools python3-venv
python3 -m pip install --user pipx
~/.local/bin/pipx ensurepath
pipx install protontricks

# Maintain your version of protontricks up to date using
pipx upgrade protontricks
sudo apt install cabextract
  • Finally, install the required libraries and fonts using protontricks (105450 is the ID of the game in Steam)
protontricks 105450 mfc42 winxp l3codecx corefonts

That’s it! You should be able to (painstakingly) input your CD key and play the game. Make sure to set the game’s resolution properly, because the UI is pretty buggy otherwise. Now go settle the New World for the Queen or something.

Looking good for a game from 2005.

Feel free to comment bellow if you are still experiencing issues playing the game.

Thanks to JT for the updated protontricks instructions, as the original project is no longer maintained.

4 thoughts on “How to Play Age of Empires III on Linux (Invalid CD Key Error)”

  1. Hi,
    This is a great help, but your instructions for protontricks are a little out of date. Here’s the updated instructions that worked for me:
    The newer version is here: https://github.com/Matoking/protontricks. To install this, run:
    sudo apt install python3-pip python3-setuptools python3-venv
    python3 -m pip install –user pipx
    ~/.local/bin/pipx ensurepath
    pipx install protontricks

    Then you can install the extra dependencies with:
    protontricks 105450 mfc42 winxp l3codecx corefonts

Leave a Reply

Your email address will not be published. Required fields are marked *