This tool listens for games and closes / opens programs you set. For example, whenever I run any games I have it close onedrive, rainmeter, and wallpaperengine. It then launches them again once the game is closed.
-
Place
GameListener.bat
and theBin
folder where you would like it to be permanently. -
Open a command prompt and run
GameListener -s
. This will create a vbs script for you to put in yourshell:startup
folder (assuming you would like to run it on startup). To access the folder typeshell:startup
in Run or Windows Explorer. -
List your games in
Bin\listen.txt
(new line for each exe)For example,
ModernWarfare.exe
. If you're not sure the exe name, check in task manager. -
List what tasks you want to close on game launch in
Bin\kill.txt
For example:
onedrive.exe
. If you're not sure the exe name, check in task manager. -
List the paths to files you want to run once a game closes in
Bin\launch.txt
For example:"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Rainmeter.lnk"
. If you're not sure where it is, find it in the start menu, right click, and select "Open File Location". -
If you want to kill or launch tasks for specific games, create text files in
Bin\KillOnGame\
andBin\StartOnGame\
respectively, with the name of the program. For example:ModernWarfare.exe.txt
. -
You're done! You'll have to restart your pc or run the vbs startup file in order to start using GameListener. You can edit any of the files while it runs to add and remove games, kill tasks, and start tasks!
- You cannot use parameters in the
start.txt
file. - If you need to include parameters, create a shortcut by right-clicking in a folder,
New -> Shortcut
and enter the path to the program in double quotes with parameters after it. For example, I needed to run onedrive with"C:\Users\ldell\AppData\Local\Microsoft\OneDrive\OneDrive.exe" /background
. I created a shortcut with that exact line as its target, and linked to the shortcut file in GameListener. - You can change the refresh speeds for non-game-mode and game mode on lines
20
and65
respectively. - You can easily check if GameListener is in game mode with CMDS via the window title. If GameListener is in game mode, you'll see
Game Listener for Killing Programs [Game]
. Otherwise, you'll seeGame Listener for Killing Programs [No Game]
. - If you need to start a program with admin access, you can create a shortcut that bypasses the UAC prompt using the task scheduler. Check out this guide on Tech Republic: https://www.techrepublic.com/blog/windows-and-office/run-uac-restricted-programs-without-the-uac-prompt/