Gaming > Consoles & PCs How to Add Command Line Parameters to PC Game Shortcuts Enable video game cheats on PC by adding parameters to shortcuts By Jason Rybka Jason Rybka Writer Jason Rybka is a former Lifewire PC and Console gaming writer with expertise in gaming exploits. Jason was also the developer/owner of Xbox Solution and other web properties. lifewire's editorial guidelines Updated on February 14, 2021 Reviewed by Lisa Mildon Reviewed by Lisa Mildon Southern New Hampshire University Lisa Mildon is a Lifewire writer and an IT professional with 30 years of experience. Her writing has appeared in Geekisphere and other publications. lifewire's editorial guidelines Consoles & PCs Xbox Buyer's Guide Trending Videos Close this video player What to Know First, create a shortcut for the EXE file if you don't see a game icon on the desktop. Then, right-click shortcut > Properties. Select Shortcut tab. In Target field, place cursor after last quotation mark > space > -command line (example: xyz" -command) All command line parameters are preceded with a hyphen (-). The instructions in this article explain how to add a command line parameter to enable PC game cheats for Windows, Mac, and other desktop operating systems. What Is a Command Line Parameter? A command line parameter can be used to enable or disable certain features of a game when the program begins. The most commonly used command line parameter for video games is -console. For many PC games, this command enables the console where additional cheats can be entered. In other games, the cheat console is available by default, so there is no need to edit command line parameters. Although entering command line parameters incorrectly can cause a game to crash, it will not corrupt the actual game files. How to Edit Shortcut Launch Parameters While this method can seem tedious at first, it's a lot safer than editing game files to enable cheats. If you don't see an icon for the game on your desktop, you must first create a shortcut for the game's EXE file. To add command line parameters to a shortcut: Right-click the shortcut to the game on your desktop and select Properties. Go to the Shortcut tab, then locate the Target field, which lists the exact location of the file within quotation marks. In the Target text box, place the cursor after the last quotation mark, then add a blank space followed by the command line parameters. All command line parameters are preceded with a hyphen (-). Select Apply, then select OK. Double-click the shortcut to start the game with command line cheats enabled. To disable cheats, remove the command line parameter from the shortcut and restart the game. Examples of Command Line Parameter Shortcuts Here is an example of a shortcut target for Half-Life without any extra command line parameters: "C:\Program Files\Sierra\Half-Life\hl.exe" Here is the same shortcut for Half-Life with a command line parameter added to it: "C:\Program Files\Sierra\Half-Life\hl.exe" -console Add multiple command parameters one after another by leaving a space between them. For example: "C:\Program Files\Sierra\Half-Life\hl.exe" -dev -console Another way to add command line parameters is to launch the game from the command prompt. More Ways to Use Cheat Codes in PC Games While some games require you to edit command line parameters to activate cheats, other games require you to enter cheat codes at the title screen or in a designated menu. Other games require you to make changes to game files, which can cause serious problems if done incorrectly. Cheat guides typically include instructions for how cheats should be used. Was this page helpful? Thanks for letting us know! Get the Latest Tech News Delivered Every Day Subscribe Tell us why! Other Not enough details Hard to understand Submit