Raymond.CC Blog
  • Home
  • Forum
  • Giveaway
  • X-Ray 2.0
  • Contact
  • About
  • I’m Feeling Lucky
Search the site...
You are here: Home » Computer » How to Terminate Full Screen Game or Software Process when Hang

How to Terminate Full Screen Game or Software Process when Hang

Updated by Raymond - 4 years ago - Computer
40
  • Like
  • +1
  • Tweet
  • Printer Friendly and PDF

The only computer game that I play is Counter-Strike Source, commonly shortened to CS:S or simply CSS. My desktop computer is powerful enough to handle the game but once in a while when I am playing the game half way, the game would just hang, sound is looping and nothing happens when I move the mouse or type anything on the keyboard. Weirdly, only the Counter Strike game hangs but my computer is still working fine. I know that my computer didn’t hang because when I press either the Num Lock, Caps Lock, or Scroll Lock keys at my keyboard, the LED light for the following keys would turn on and off.

I’ve tried pressing Alt+Tab to switch between Windows, Alt+F4 to close the active program, Ctrl+Shift+Esc to launch Windows Task Manager, Ctrl+Alt+Del to launch Windows Security dialog box, but NOTHING worked! The only way is to hard reboot the computer by pressing the reset button at the computer case. Hard resetting a computer is never good because it can damage the hard drive and cause data corruption.

Now I’ve figured a way to automatically terminate the game by pressing a shortcut key when it hangs.

Actually it is pretty simple and doesn’t require any advance level of computer knowledge. 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).
Counter Strike Source Process Name

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.

shortcut key at desktop

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.

You may also like:

Forcefully Close Full Screen Application or Game with SuperF4Forcefully Close Full Screen Application or Game with SuperF4Fix "Steam is temporarily unavailable, please try later" by Changing Download RegionFix "Steam is temporarily unavailable, please try later" by Changing Download RegionDisable Program Has Stopped Working Error Dialog in Windows Server 2008Disable Program Has Stopped Working Error Dialog in Windows Server 2008How To Make a Non-STEAM CSS Server Using RevEmu, VUP and eSTEAMATiONHow To Make a Non-STEAM CSS Server Using RevEmu, VUP and eSTEAMATiON

40 comments on “How to Terminate Full Screen Game or Software Process when Hang”

  1. BlueStrut says:
    1 year ago

    Thanks! Very useful!

    Reply
  2. ThomasT says:
    2 years ago

    I hate when games hang. When they do, most of the time my mouse has disappeared.

    Bought new Acer PC 2 days ago, format & clean install Win 7 64 bit and already I had my first game hang (Fallout New Vegas). ALT+CTRL+DEL and tab it to task manager won’t kill the damn game but logoff and re login could.

    Too bad doing that kills off my utorrent which was running at great speed at the time :(…

    Reply
  3. rmpbklyn says:
    3 years ago

    how’s it different then running task manger and selecting processes tab and do ‘end process from there’
    in this case it’s not needed to create a shortcut for every program that hangs the PC.

    just add taskmgr to your start menu and it will start up on login….

    Reply
  4. Sandra R says:
    3 years ago

    Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.

    Reply
  5. Micha says:
    4 years ago

    I have a question, i have vista and when i click on properties i get a whole lot of sidetabs besides the one you show on xp.

    “C:\Program Files\Steam\Steam.exe” -applaunch 240 that’s what i see instead of hl2.exe, can you help me please cause it’s really annoying

    Reply
  6. anonymaus says:
    4 years ago

    Hi.

    Could it be, that taskkill doesn’t work always? I am using a buggy beta that is not developed anymore. It hangs seldom but it does some time. I always had to reboot since the button to stop a process in taskmanager doesn’t work if the process hangs (someone wonders why they built a completely useless feature? wait.. its ms…) Anyhow, I thought I can use taskkill to FORCE a process being stopped like I know from Linux where KILL -9 really kills a process forcefully, no matter if it’s responding or not.
    However, taskkill does nothing but telling me that the process has been killed but in the tasklist the programm is still running. Then I tried to kill with /pid, again taskkill tells me the process has been killed but nothing happens. I can fire taskkill /pid /f as often as I want with the same of the hanging process, always I get the message, that it has been killed but it’s still there.
    Where is the REAL force option?

    Reply
  7. VINOD says:
    4 years ago

    Awesome find Raymond.
    I have posted the article in my blog alongwith a backlink to ur site.

    Reply
  8. arun says:
    4 years ago

    Thanks Raymond.. Its a great help for me..

    Reply
  9. michael says:
    4 years ago

    Ah…..a life saver!

    Reply
  10. moo says:
    4 years ago

    i had the same halflife2 hang problem as you, “taskkill /IM hl2.exe” may work but i suggest “taskkill /F /IM hl2.exe”

    it’s lucky that halflife2 does not block hotkeys but some games do, ctrl+alt+del is unblockable and i write a small program to make use of it

    source: linuxfire.com.cn/~moo/files/code/CtrlAltDelAction.zip
    prebuilt binary: linuxfire.com.cn/~moo/code/CtrlAltDelAction.zip

    install:
    CtrlAltDelAction.exe taskkill /F /IM hl2.exe
    remove:
    CtrlAltDelAction.exe
    usage: hit ctrl+alt+del after install and “taskkill /F /IM hl2.exe” will be executed right before taskmgr.exe is executed
    more notes: linuxfire.com.cn/~moo/log/left/ctrl-alt-del-action

    (the precompiled file need msvcp80.dll msvcr80.dll)

    Reply
  11. Charlie says:
    4 years ago

    Thanks, I couldn’t get the shortcut key to work whilst the game (Guild Wars) was maximised however the program Mojo linked works brilliantly (so far).

    Reply
  12. din says:
    4 years ago

    does this command work at every type of windows such as vista

    Reply
  13. ahmad maher says:
    4 years ago

    thanks for the tip …. i hate it when my computer do so and hope this will real help

    Reply
  14. Sergio says:
    4 years ago

    thank you so much Jayhan, i had the same problem but now is ok.

    Reply
  15. Gaurav says:
    4 years ago

    Thanx ray………This tip was really nice……..:)

    Reply
  16. salman says:
    4 years ago

    nice tips man… i really love it. :-)

    Reply
  17. s duba says:
    4 years ago

    Ok my bad, It seams like everythig has to be on the desktop- batch file + shrtcut for the key call to be efective. Now it works. This tip made my day. Thks Ray.

    Reply
  18. s duba says:
    4 years ago

    i guess i was wrong, I need a functional shortcut key. If The comp hangs, usualy it freezes the desktop and you can not acces anything on it. So a fix for vista would come in handy.
    thks

    Reply
  19. subadubadu says:
    4 years ago

    I have a prbl with Avira free. Sometimes(many times) at startup, my computer hangs and avira stays on desktop for ever.(I disabeled the pop-up screen for updates from avnotify) So far only reseting the hard was usefull. I tried your tip , and I created a batch file on my vista home premium. I asigned a key, but it doesen,t work. However it works with 2 click on shortcut. Any ideas? I could use what I get so far I guess anyways.
    Great tip

    Reply
  20. Jayhan says:
    4 years ago

    Okay, I just found out that Windows XP Home users are unable to run this command because it’s meant for XP pro users only. For all you home users, you can try using tskill instead. So instead of keying in the command Raymond mentioned in the bat file, key in :tskill [process] . dont use the brackets, also you need not key in the .exe, like for example, to kill firefox just key in : tskill firefox. Hope this helps!

    Reply
  21. Merlin_Magii says:
    4 years ago

    Thanks Raymond – always something to learn here. HL is my favourite too and I have several of them to install when I do my long overdue fdisk/format/clean install XP Prof.
    I have the same hang problem (along with a million other users who M$crap studiously refuse to help by resolving an issue well documented for some 3 years now) with Live Messenger. Can you or one of your fans tell me if this hotkey ploy works with Messenger?

    Reply
  22. Erwin Ried says:
    4 years ago

    In Vista, you can launch a elevated system taskmanager in the security options dialog:

    erwin.ried.cl/?modo=visor&elemento=251

    Reply
  23. scottrade says:
    4 years ago

    This only works if the game process show up in task manager. Some game protections hide their processes like a rootkit.

    Reply
  24. grage says:
    4 years ago

    very useful tip.
    thx u

    Reply
  25. Hardy says:
    4 years ago

    old but great tip, not all people know it.

    Thanks Raymond.

    Regards,

    Hardy

    Reply
  26. newt says:
    4 years ago

    dont work on most games.. just older crap

    Reply
  27. Chris says:
    4 years ago

    You may want to add /F because if the game hangs that command might not work.. (/F = Force”

    Reply
  28. Jayhan says:
    4 years ago

    It seems that command prompt is unable to recognize the command. I guess that’s the problem…. In any case, thanks for the tip Raymond! You rock!

    Reply
  29. XCalibrator says:
    4 years ago

    I know this isn’t related, but cud u pls write an article on removal of the virus named “New folder.exe”, pretty tricky one, been on my comp for days now!

    Reply
  30. brayden says:
    4 years ago

    Great thing to know in the future! Thanks Raymond.

    Reply
  31. Omi Azad says:
    4 years ago

    Very Useful. Thanks!

    Reply
  32. Raymond says:
    4 years ago

    Try running command prompt and type the command taskkill.exe /IM firefox.exe and see if it closes Firefox.

    Reply
  33. Jayhan says:
    4 years ago

    I’ll try it later, but I’ve tried it on firefox and the same thing happens, nothing! Firefox still runs even after the command! Could the command be prevented due to the influence of an antivirus? Im using kaspersky.

    Reply
  34. Raymond says:
    4 years ago

    No Jayhan, the command works even when Counter Strike is running. Hmm, I am wondering maybe the game has some kind of protection against game loaders so external commands can’t kill the process? Have you tried GameMinimizer suggested by Mojo?

    Reply
  35. Phrox says:
    4 years ago

    I’ve always wondered about the game not minimizing.

    Thanks for the tip

    Reply
  36. Jayhan says:
    4 years ago

    Hmmm, does the command only work if a game hangs? Because I’ve tried testing it on one of the games I’m playing, it doesn’t seem to terminate the process. I see the command prompt window poping up, but my game still runs afterwards. What seems to be the problem?

    Reply
  37. Bluey says:
    4 years ago

    thanks for the Tip Ray

    Reply
  38. Raymond says:
    4 years ago

    Thanks Mojo! Always learn about new apps from you!

    Reply
  39. Mojo says:
    4 years ago

    Or you can use GameMinimizer if you play more then just one game: mystercrowley.com/sw_gm_en.php

    Reply
  40. neo says:
    4 years ago

    Thanks again Raymond, nice tip, i always used to restart manually before, but now i dont have to!

    Reply

Leave a Reply Cancel reply

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

Recently Updated

  • search local area network

    2 Tools to Search Any Files on Local Area Network Shared Folders

  • windows defender icon

    How To Disable, Uninstall or Remove Windows Defender

  • no fake av icon

    6 Ways to Kill and Remove Fake Antivirus Rogue Software

New Articles

  • task manager replacement icon

    Memory Usage Test to See Which is the Lightest Antivirus Software

  • kaspersky antivirus 2013 icon

    Activate Free Kaspersky Anti-Virus 2013 ROG with 1 Year License

  • remote access software

    Top 8 Remote Access Software for Providing Online Support

Popular Posts

  • Top 10 FREE Data Recovery Software

    Top 10 FREE Data Recovery Software

  • How to Hack Into a Windows XP Computer Without Changing Password

    How to Hack Into a Windows XP Computer Without Changing Password

  • 10 Free Software to Mount CD or DVD ISO Image File as Virtual Drives

    10 Free Software to Mount CD or DVD ISO Image File as Virtual Drives

Recommend on Google
Follow @raymond_cc
Subscribe Youtube »
(c) 2013 Raymond.CC Blog
  • Disclaimer
  • Disclosure
  • Privacy Policy
  • Terms of Use
  • Sitemap