Call of Duty: Modern Warfare 2 (2009) - Multiplayer

Call of Duty: Modern Warfare 2 (2009) - Multiplayer

Not enough ratings
How to Automatically Backup Your Stats
By Ben
In this guide, I will teach you how to automatically backup your stats every time you start your game. This can be used to help revert your rank if you join a modded lobby.
   
Award
Favorite
Favorited
Unfavorite
Required Software
This method of backing up your stats automatically utilizes two things: a batch file and autohotkey. Autohotkey can be downloaded here[autohotkey.com].
Batch File Setup
To backup your stats, you first have to locate where your stats are stored. To find this, you need to go to your game's install location. To find your game's install location, go to Library, Modern Warfare 2 Multiplayer, right click, click Properties, click Local Files, click Browse Local Files. This will open your game's install location.

Once you have completed the above, you need to go to the Players folder. Inside the Players folder will be a number of files. There should be a config.cfg file, a config_mp.cfg file, some settings.zip.iw4 files, and a number of .stat files. The important files are the settings.zip.iw4 and the .stat files. (The config.cfg and config_mp.cfg files should be set to read-only after you have your settings how you want them. This prevents it from being altered by modders.)

In another window, open File Explorer and go to where you want to store your backup files. This location doesn't matter as much, it can't be in the same folder as the original stats, but a convenient location such as a folder on the desktop is preferred. For ease of use, I suggest making 3 folders within this folder. One for your .stat files, one for your .iw4 files, and one for your .bat file and autohotkey script. Once you have decided where you are going to store your files, right click in the folder (the one where you will store your .bat file and autohotkey script) and create a new text document. Title this "Backup" or any other name you can easily remember. Open the document using your favorite text editor.

Inside the text document you just created and opened, copy and paste or type the following:
@echo off xcopy "REPLACE_THIS_WITH_YOUR_MW2_INSTALL_LOCATION\*.stat" "REPLACE_THIS_WITH_YOUR_BACKUP_LOCATION" /c /r /d xcopy "REPLACE_THIS_WITH_YOUR_MW2_INSTALL_LOCATION\*.iw4" "REPLACE_THIS_WITH_YOUR_BACKUP_LOCATION" /c /r /d /y

Save file as, select "All file types" for Save As Type, then name it Backup.bat. This will now backup your .stat and .settings.iw4 files.
Autohotkey Setup
After installing Authotkey, choosing a backup location, and creating that batch file, it is now time to create the autohotkey script that will help you automate this process. This allows your stats to be backed up each time you launch the game.

If you already use a desktop shortcut to launch your game, drag this into the folder you created earlier (the one with your .bat file in it). After that, right click inside the folder and create a new Autohotkey script. Title this Backup or any other memorable name. Right click the script and open with your favorite text editor. Delete anything that is already in the script by default, then copy and paste or type the following:

run Backup.bat Sleep 1000 run iw4mp.url return ExitApp

(Note: The code above assumes that you named your .bat file Backup and that your Modern Warfare 2 shortcut is named iw4mp. If these are not the names you have/chose, replace with your file's names; with the same capitalization as well.)

Save the script with the default .ahk file type. Then, right click the script and click "Compile script". This should create a .exe file with the same name as your .ahk script. Right click the new .exe file, and click properties. Click on compatibility, tick the "Run this program as an adminstrator" box if not already selected, click apply then ok.

Finally, for ease of use, right click the .exe file again and create shortcut. This shortcut is now how you will create a backup and start your game, at the same time. This can be placed on your desktop or anywhere else of your liking.
Finished
That's it, your stats will now be backed up automatically whenever you start your game (if you use the shortcut you created in the final step). This can be used to revert your stats after joining a modded lobby in tdm. For steps on how to do that, follow the second section of this guide.