If you are watching videos online or listening to the music while at work and your employer catches you red handed, then you may end up losing your job. What if you could instantly close all the web browsers and media players, as soon as you see your boss coming around in your direction? That could save your embarrassment in front of all the co-workers and also your job. Good news is that this is possible. You can create a batch script to close all the popular browsers and media players at the click of a button. Here is how:
- Open up Windows Notepad (or any other text editor for that matter).
- In the Notepad window, type or copy/paste the following text:
taskkill /f /im iexplore.exe
taskkill /f /im firefox.exe
taskkill /f /im chrome.exe
taskkill /f /im opera.exe
taskkill /f /im safari.exe
taskkill /f /im winamp.exe
taskkill /f /im wmplayer.exe
taskkill /f /im vlc.exe
taskkill /f /im mpc-hc.exe
- Select File → Save As from the menubar in Notepad. Select a convenient place to save the file on your local hard disk (somewhere you boss cannot find). When it asks for the filename, give the name boss.bat and select Save as type to be All Files (*.*). Then click on the Save button.
- Now open the folder where you saved the file, select boss.bat file by clicking on it once, right-click on it and select Copy from the context-menu. Go back to your Desktop (press hotkey Win + D), right-click anywhere and select Paste shortcut. This would create a shortcut to the boss.bat file on your desktop.
- You can rename this shortcut and assign it a new icon, making it look like a different program. To rename this shortcut, select it, press F2 and type the new name (in our case, Notepad). To change the icon, right-click on the shortcut, select Properties from the right-click menu. In the Properties window, select Shortcut tab and then click on the Change Icon button. Browse for a file with icons (in our case, we want to select Notepad icon, so we browse C:\windows\notepad.exe and use its icon). Click OK button to select the icon.
- Still in the Properties window, click on Shortcut key field and then press F12 key on your keyboard. This would set the F12 as the hotkey to execute this batch script. You can use any other key or key combination that you want. Click on the OK button to save the settings.
- That’s it. Now when you press the F12 or whatever hotkey you have assigned, all your browser windows and media players shall be closed in a matter of seconds. You can use this hotkey as the panic button to be used when you see your boss approaching your computer. You can edit the batch file, to exclude some browsers or applications that you do not want to be closed. You can also include more applications if they are not already listed.