5

When I take the laptop out of its bag and open it, I'd prefer if it didn't suddenly start playing a song or the sound of a movie, before I've successfully logged in. While it would be nice if the source of the sound (VLC/YouTube/etc) paused, the far more important part is that I don't want to hear the sound.

If no general solution is available, I'd be happy with one that works with Youtube + Chrome.

I tried Mute On Lock and one other software for Windows 7, neither of them worked in Windows 10.

Peter
  • 4,552
  • 5
  • 28
  • 33
  • 1
    One more thing I just found, I confirmed both of these work with Windows 10. . . https://superuser.com/questions/82229/how-to-control-master-volume-in-windows-7/1255277#1255277 If you are looking for something a bit more Windows native, then this may be the way to go rather than AutoIT—just trying to help you here so let me know your thoughts when you get a chance. You'd just create VBS scripts and execute with Task Scheduler from a batch or whatever, etc. with applicable triggers still. Sorry for all the comments but I'll come back around and remove at some point. – Vomit IT - Chunky Mess Style Dec 28 '17 at 02:27
  • I have posted an answer to a similar question [here](https://superuser.com/a/1336693/230978) – Stenemo Jul 05 '18 at 12:03
  • Interesting, yesterday, out of a sudden, my laptop started muting all sounds while on lockscreen and I hate it. I want to disable this and keep playing my music. – Qwerty Apr 28 '21 at 23:59

2 Answers2

3

Windows 10 Auto Mute Volume

Consider using the free AutoIT application and with a simple Send() function using Send Key list {VOLUME_MUTE} or {Volume_down} sending keyboard shortcuts to adjust the volume.

You can use Task Scheduler and setup triggers to execute the as needed e.g. At logon, On workstation unlock, On an event and on specific event ids, etc.

enter image description here

AutoIT Example A Logic

This appears to toggle from unmute to mute or vice versa when executed

send ("{Volume_Mute}")
exit

AutoIT Example B Logic

This will toggle down the volume 100 times

#include <MsgBoxConstants.au3>
Local $i = 0
Do
   send ("{Volume_down}")
   $i = $i + 1 ; Or $i += 1 can be used as well.
Until $i = 100 ; Increase the value of $i until it equals the value of 10.
Exit

source ideas

Further Resources

Vomit IT - Chunky Mess Style
  • 40,038
  • 27
  • 84
  • 117
  • @Peter - Furthermore, see https://superuser.com/questions/84442/trigger-task-scheduler-in-windows-7-when-computer-wakes-up-from-sleep-hibernate for some tips on event ids to see for triggering an action with Task Scheduler. I look forward to hearing whether or not you were able to work with this solution. – Vomit IT - Chunky Mess Style Dec 27 '17 at 13:26
  • Hi, quite old question, but this is just half working for me: I'm trying to mute on lock and unmute on unlock, and although the `Task Scheduler` logs the action was successfully launched and even logs a return code of `0` in both cases, the only action working is the one launched on unlocking, no matter if volume was muted or not. I'm thinking it can be because computer is locked, so `send` has no effect? – curropar Jan 21 '20 at 13:50
  • So yes, it's because the computer is locked, so it accepts no keystroke input. I found I can do it with `SoundSet, +1, , mute`. – curropar Jan 21 '20 at 14:29
-1

A more up-to-date answer could be:

Use the open source application, WinMute: https://github.com/lx-s/WinMute

Sempai
  • 1
  • 2