Command Line Mute

Your laptop just makes the familiar “oh-oh” sound. You know you have an instant message in ICQ.

The problem is, it’s 5:30 in the morning right now… Indeed you forgot to turn off your speaker the night before.

It doesn’t have to be like this.

The one last time this happened to me, I decided to fix this problem once and for all. So I wrote a command line utility that lets me mute and un-mute my computer speaker. Couple this with the Task Scheduler in Windows, my laptop knows when to keep quiet. :)

Usage: cmdmute [0|1]
0 - Mute OFF
1 - Mute ON
Toggle if no argument is given.

Update on 2007-01-30: Source posted. Compile it with cl cmdmute.cpp winmm.lib.

RSS feed | Trackback URI

12 Comments »

Comment by AdamR
2005-09-21 12:39:46

So I was going to google to find out if there was some command I can run to mute the speaker. I didn’t think I’d find anything, let alone an actual application that can easily be put into Windows Tasks. Excellent script! Thanks a lot!

- Adam

 
Comment by Michael J. Titera
2005-11-11 19:11:10

Great job!

 
Comment by Kevin
2006-06-22 11:59:52

Thanks for the util.

One step better would be if the command could be used to report the current setting. That way a script that needs to mute could not unmute if it was mute before the script runs. Maybe:

cmdmute check

 
Comment by Nicholas
2006-08-27 00:47:23

Great program. Thanks.

 
Comment by Edwin
2006-10-20 02:51:31

I have a shared computer in my office and I really want the sound off, while most of my colleagues like the sound on.

A shortcut to your file in the startup folder and everyone can set his preference. Great! (thanks to google)

 
Comment by Sergey
2007-01-11 04:59:09

Great thing, many thanks to the author! But also could you share the secret - I mean, the original script source?

Comment by Maverick Woo
2007-01-30 19:12:54

No problem. See the update above.

 
 
Comment by tony
2007-01-22 12:54:52

Great App. I chucked it into a batch script wich runs each time i log on to mute my laptop. No more IM noice in lectures…

its a simple shortcut on my start menu to unmute it when i want things back on again.

Thanks!

 
Comment by Mark
2007-03-20 01:09:59

Sweet this is exactly what i was looking for :) thanks!

 
Comment by Nishanth
2007-08-09 01:13:39

Sweeet!! This is what i was looking for. Thanks for the utility and sharing the code too :-)

Cheers
/\/ishanth

 
Comment by Milos
2008-04-04 09:10:13

I was about to write my own, just wanted to check did anyone make it before… I downloaded it, still didn’t check it, but i’m sure it works :)

Thanks! :)

 
Comment by Atwin
2008-05-30 00:53:18

Thanks for this nice application mate. Very sweet indeed. Thanks loads.

 
Name
E-mail
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> in your comment. Your comment will be held for moderation. You will not see it immediately.