Mute Audio as a Post installation Task

Does anyone know a good way to mute audio for a Windows 7 Enterprise x64 hardware agnostic Image set to OOBE using a Post Installation Task? 
In another forum I found:

If $ismuted == 0 Then

Then Auto-IT was used to make it an .exe which works if the audio is not already muted, otherwise the audio is unmuted. Thank you for your help and please let me know if you have any questions. 
(P.S. if anyone knows more about the above commands that may help too)  



0 Comments   [ + ] Show comments

Answers (2)

Posted by: rileyz 5 years ago
Red Belt
It doesn't look easy, I thought there would be a nice Windows API you could call.

Have a look at this post by Alexandre Jasmin, its uses PowerShell, you can integrate it with your deployment easier. 

There will probably be a VBS option as well, I'm more of a PowerShell person, hence the link, but you can use whatever you fancy.

Posted by: StockTrader 5 years ago
Red Belt
There are some API you can use but if you do not want to spend time digging in the API you can follow this other approach:
  1. Download the last version of Process Monitor: https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx
  2. Capture only the registry events.
  3. Open you audio mixer properties
  4. Click on the mute
  5. Stop the capture and check for the RegSetValue operations

On my system I found out that to mute the audio all the ChanXXX values under this registry key:
are set to 1

When the audio is un-muted they are set to 0

So now you can start to write your script to touch that registry key

Something like this one:

Set WshShell = CreateObject("WScript.Shell")
myKey = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000\MixerSettings\eLineOutTopo\PrimaryNode001"
WshShell.RegWrite Chan000,1,"REG_DWORD"
WshShell.RegWrite Chan001,1,"REG_DWORD"
WshShell.RegWrite Chan002,1,"REG_DWORD"
WshShell.RegWrite Chan003,1,"REG_DWORD"
WshShell.RegWrite Chan004,1,"REG_DWORD"
WshShell.RegWrite Chan005,1,"REG_DWORD"
WshShell.RegWrite Chan006,1,"REG_DWORD"

I think that every audio device hits a different key so you need to dig a bit with Processe Monitor to find out which keys the system touches when mute the audio.

 Kind regards,

Marco - StockTrader

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ