Mute and UnMute the Windows Master Volume

skynergy
skynergy used Ask the Experts™
on
I am looking for code or a component that will allow me to mute and un-mute the master volume in windows. This has to work on Vista and Windows 7.

Thank you in advance!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
DonNetwork Administrator

Commented:

Author

Commented:
I know NirCmd can do all of this. But I have my own product that I need to update to be Vista & W7 compatible. So I am really after the Delphi code or components that can do this. I do not want to ship NirCmd with my product. Thank you for your answer.
You can use the same unit I provided here: http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_25085582.html

And call it like:

procedure TForm33.Button2Click(Sender: TObject);
begin
  if endpointVolume = nil then Exit;
  endpointVolume.SetMute(True,nil);
end;

Author

Commented:
Thank you!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial