No multimedia keyboard? Heres how to quickly mute speakers.

Started by Bill Cravener, October 23, 2011, 03:03:31 PM

Previous topic - Next topic

Bill Cravener

 :bg

Last week I was doing some work for a client of mine, she likes to play music while working but not having a multimedia keyboard she had no quick way to mute the volume when someone enters her office. Her computer is a Windows 7 machine. So, I got to thinking about it and did a bit of web searching and found a little gem of a utility. As the author explains "NirCmd is a small command-line utility that allows you to do some useful tasks without displaying any user interface. By running NirCmd with simple command-line option, you can write and delete values and keys in the Registry, write values into INI file, dial to your internet account or connect to a VPN network, restart windows or shut down the computer, create shortcut to a file, change the created/modified date of a file, change your display settings, turn off your monitor, open the door of your CD-ROM drive, and more..." And I would have to say much much more!!

What I did was place the utility in my clients Windows directory then created a desktop shortcut to the program. I then added the command line to the target like this; "C:\Windows\nircmd.exe mutesysvolume 2" without the quotes. The "mutesysvolume 2" command toggles the speakers mute on and off. Now to save my client from having to double click the desktop shortcut to turn the mute on and off I assigned a shortcut key setting "Ctrl+F12" to her desktop shortcut. Works like a charm!!

There is a full list of the many available commands for this little gem on the author's website. Anyway, I thought I'd pass it on. http://www.nirsoft.net/utils/nircmd.html

I give it a four thumbs up:  :thumbu :thumbu :thumbu :thumbu

My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

dedndave

i am a little shocked that you did not write a program for her, Bill   :P
anyways, NirCmd has been around for a long time - it has many uses, especially in batch operations
come to think of it, i am a little shocked that you did not write NirCmd   :lol

one thing it is particularly handy for is closing the door of an optical drive
with a little effort, you can add it to the context menu

Bill Cravener

Well I considered doing one up myself Dave but she wanted something like right now so I did some digging on the net and found NirCmd. I have never came across it before and remember someone here on the board posting something about how to mute their speakers (Magnum I believe it was) a year or two back. I did do up a volume example years ago but it won't control the main system volume in Vista or Windows 7. Besides why reinvent the wheel when its already been done? :bg
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

anunitu

One of my most used apps from Nir, is an app that allows me to turn volume up or down with the mouse. It is called volumouse. I just roll the mouse wheel on the taskbar up or down. There are many useful apps on his site.   

jorgea

This little gem sounds like a great way to add several shortcuts in order to reduce time and effort. Thanks for the tip.

Bill Cravener

You're welcome jorgea!

Just so you are aware I did a sound muter and volume control example here.

http://www.masm32.com/board/index.php?topic=17610.0
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat