CS2 Autoexec Guide: How to Create an Autoexec  - KeyDrop Blog
Skip to content
Back to home

CS2 Autoexec Guide: How to Create an Autoexec 

KeyDrop Team

The autoexec file is a godsend for any more hardcore Counter-Strike player, and for good reason. The file allows you to save your game settings in a simple .cfg file, and easily transfer your keybinds, sensitivity and crosshair settings to any computer running CS2. So, how to create a CS2 autoexec file? What pitfalls to look out for? Read on to find out!

How to Create an Autoexec

Well, the only thing you’ll need to create a CS2 autoexec is the Notepad app. The autoexec is written in CS2’s scripting language. For example, if you wanted to bind jump to the spacebar, you’d type in:

bind “SPACEBAR” “+jump”

As you can imagine, this could get tiring if you wanted to create a whole config for every button. That’s why a great idea is to copy the contents of your regular config file to your autoexec file. We’d advise you to avoid copying the graphics options, and focus on the keybinds and in-game preferences.

CS2 Autoexec Location

Now as to where you can find the config, this location has changed. The default directory for it will be C:/Program Files (x86)/Steam/steamapps/common/Counter-Strike 2/game/csgo/cfg with the config file being the default configuration file. Once you edit it with the Notepad, create a new file named autoexec.cfg in the app. Remember to start the config with the phrase: unbindall and end it with the phrase: host_writeconfig

If you’re feeling lazy, you can also download and customize an autoexec from the web. Just remember to only download such files from reputable sources.

Moving a CS:GO Autoexec to CS2

Can I just copy a CS:GO autoexec over to CS2? Well, not quite. Unfortunately, CS2 changed around some binds, and with autoexecs typically unbinding all the buttons before binding yours. With new controls for mouse movements, copying your autoexec one-to-one will probably render your game impossible to play until you figure it out. That’s why, we advise you to use a autoexec converter like this one. Also, be absolutely sure you add the following commands to your final autoexec:

bind "mouse_x" "yaw"
bind "mouse_y" "pitch"

Otherwise, you’ll find yourself in the awkward spot of not being able to move your mouse during your match.

Now that you’re done with the autoexec, it’s time to launch it.

How to Launch Your CS2 Autoexec

There are two ways to do so. The simplest is to add the autoexec to your CS2 launch options. To do so, go to the game’s properties on Steam, select “Set Launch Options” and add the line “+exec autoexec” (where “autoexec” is the name of your file). Once that happens, the autoexec will be launched every time you start the game.

The other option is to do so by using the developer console. You can enable the developer console in the game settings and, afterwards, press the ~ (tilde) button to open it. Once the console is open, type in exec autoexec and voila! Your autoexec is active, and you can play the game your way.

And that’s it. Getting your autoexec going is a simple as that. Be sure to read our guide to CS2 launch options to make your experience better and if you’re looking to win some awesome skins, check out what we have in store for you on Key-Drop!

You may also like

The Biggest Scandals in Counter-Strike History

15 Best M4A4 Skins in CS2