Mute your computer's audio automatically when it enters the lock screen or when the screensaver starts
Have you ever walked away from your computer and received a ton of notifications from an instant messaging service? Each of those will make a sound, and the noise can be annoying for those around you if you are not alone, and even for you if you are still in the room or nearby.
Or maybe you were listening to some music in the background before the computer entered the lock screen. The media will continue to play in the background, and there's no way to disable it without unlocking the computer? WinMute is a free software that can help you deal with these minor annoyances, by disabling the sound output on your computer when you're AFK.
The application is available in 32-bit and 64-bit portable archives. Extract it to a folder and open the executable. WinMute runs as a system tray application. Click on the icon to view the context menu, this is the interface of the program.
By default, it is set to mute the audio when either of two conditions are triggered. The first option is "Mute When Workstation is locked", i.e., when your PC enters the lock screen mode. The other option is "Mute When Screensaver starts", which is self-explanatory.
When your computer is locked or the screensaver begins, WinMute will silence the audio output automatically. This does not pause any media that is playing in the background. Basically all that the program does is, it turns down the Windows volume to zero. And when you log back on to the computer or the screensaver ends, the program will restore the volume to the level it was on prior to being muted.
Note: Do not disable the option that is labeled "Afterwards, Restore Volume". Doing so will keep the computer muted even when it is unlocked/screensaver has stopped.
What if you don't use the lock screen mode? Or don't have a screensaver set? Well, in that case you can disable one of the options by clicking on it. You can disable both options, should you want to disable the auto-muting process temporarily. Alternatively, click the Exit option to close the program.
There is one more option called "Mute Now". As the name suggests, you may use it to disable the audio in a single-click. This can be useful if you don't have volume control keys on your keyboard, or if you quickly want to mute the audio like when some autoplay video starts blaring suddenly.
WinMute is written in Visual C++ 2019, so you'll need to install the redistributable to use the application. The program works on Windows Vista and above. To have it start automatically at Windows boot, you'll have to place a shortcut for WinMute.exe in the "Startup" folder.
You can find the source code of WinMute on GitHub.
Note: Though the program is portable, it does create a registry entry under "Computer\HKEY_CURRENT_USER\Software\lx-systems\WinMute". You should delete the registry entry if you want to uninstall the program completely.
WinMute is simple to use, and offers a feature that I think should be included in Windows.
Don't want to use this for muting your computer? Martin has a nice write-up on how to create a task using NirCmd for the same. You could also turn off speakers if you use them and may control them directly.