How do I turn on sound with a script/batch file? (WinXP Home P3)
From: Fuzzy
Date: Sat, 2 May 2009 13:51:02 -0700

What I need is a script/batch file that can turn on / turn off audio,
(as if the speaker icon was muted and un-muted). I have software to
run a program / script / batch file, play a sound file, wake and hibernate
the system. I just need to ensure that sound is not muted when it needs to be
played. The laptop does have fn-f6 as a key combo to do the sound toggle
but I don't know how to emulate the keystroke's.

Anyone have any idea.  

Thanks


[Reply] Re: How do I turn on sound with a script/batch file? (WinXP Home
From: Alister
Date: Sat, 02 May 2009 23:02:23 +0100

Fuzzy wrote:

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.

HTH

Alister


replated replys:
   Root
      863208.
          863209.
              863211.
                  863215.
              863212.
                  863223.


Was this post helpful to you?.