MATLAB Answers

Unmute Windows sound using WScript.Shell

Asked by Patrice Tscherrig on 8 Aug 2012

How can I unmute the sound in Windows using Matlab?

In VBA this can be done using elegantly:

Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys (Chr(&HAD))

But in Matlab I faild to use the method SendKeys to the method:


The post of Yair Altman: does unfortunately not work either. Any help on this?



Patrice Tscherrig on 10 Aug 2012

Win XP and Win7. I'm interested in the solution for both environments. It's just an internal soundcard. Again - in VBA the SendKeys method works well - but I fail to correctly call it in Matlab.

on 10 Aug 2012

Youe posted code doesn't work for me in VBA (Excel 2010, Win 7). And it also doesnt work in VBS. Are you sure that this code works on Win 7 and XP the same way?

Jan Simon
on 19 Aug 2012

"Does not work" is not sufficient description of the problem with Yair's Java tool.



No products are associated with this question.

0 Answers

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!