I'm found no way via command prompt for some silly reason... My current solution of a small c# program pinvoking SendMessage (in user32.dll) I feel isn't quite the best way of going about making a shortcut to mute the volume on vista, but I have yet to find a simple solution.

link|improve this question
I also had to resort to a writing a custom app to mute or change my volume by command line. – Psychoholic Nov 8 '10 at 16:07
feedback

migrated from stackoverflow.com Nov 8 '10 at 14:07

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 2 down vote accepted

According to this post:

Using VBscript you can control the master volume Mute with the following:

Set WshShell = CreateObject("WScript.Shell") WshShell.SendKeys(chr(173))

or (using Hex values)

Set WshShell = CreateObject("WScript.Shell") WshShell.SendKeys(chr(&hAD))

This sends the keycode value used by multimedia keyboards and is a toggle.

Just save it as a .vbs file and set up a shortcut to that file.

link|improve this answer
Ahh awesome, thanks :) – Blam Nov 8 '10 at 17:30
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.