First you need to know what is the process name used by the game. Let’s take Counter Strike Source as an example. You can check the process name for the game by right clicking the CSS shortcut and select Properties.
Go to the Shortcut tab to view the Target. As you can see, CSS process is actually hl2.exe (half-life 2)


Now you need to create a batch file that will kill the hl2.exe process when you simultaneously hit a combination of shortcut keys

Open Notepad (Start> Programs> Accessories> Notepad), and type the command line shown below.



taskkill /IM hl2.exe


You should replace the hl2.exe with the target of your game that you want to kill. 
Save the text file as killcss.bat or whatever you want to call it as long as the extension is .bat and not .txt. 
When you run the killcss.bat file, it should be able to close the game. Now we will assign a shortcut key to run the batch file.


Right click the killcss.bat file and select “Create Shortcut”. A new file named “Shortcut to killcss.bat” will appear. Right click at “Shortcut to killcss.bat” file and select Properties. Click at the Shortcut Key blank area and type any key of your choice. 

If you type the letter “L”, it will automatically assign Ctrl + Alt + L as the shortcut key to run the killcss.bat file.






One very more important rule is that the .bat file MUST be placed at desktop for the shortcut key to take effect.


When the game hangs in future, I just need to hit Ctrl + Alt + L key to kill the game so I can restart the game without hard resetting my computer.

1 comments:

interesting and useful tip

Post a Comment

Web Site Visitors Counter

Projects...

Followers