Automatically Mute Windows Volume when Headphones are Disconnected
The first solution make uses of a free software called Ellp. This would be helpful to those users who are looking for a simple non-techincal way to mute and unmute sound. The second solution uses a PowerShell script and Task Scheduler to achieve the same by silently running in the background without user interaction. So, let’s get started.
Mute and Unmute Sound with Ellp
Ellp is a script-free automation program that works similar to the popular If This Then That web application. It can automate certain tasks for users by simply selecting and activating cards that they interested in.
Download and install the program from here. After you set up Ellp, you are presented with a set of cards, each representing a task you’d like to automate. Look for “When I unplug my headphones, mute the sound” card under “Entertainment” category.
Now you just have to click on “Activate the card” button to enable the task. Ellp will keep running in the background `and do all the work for you. No complex dialog boxes, no command-line arguments, nothing to learn at all.
Mute and Unmute Sound with PowerShell
Step 1: Getting the Script
Download the AutoMute script code from this page into a text editor and save it as a PS1 – PowerShell script – file.
Step 2: Running the script
1) Run Automatically: We can create a basic task in Task Scheduler to run the PowerShell script automatically every time you logon to your Windows account. To do this, launch Task Scheduler (Run
taskschd.msc) > Create Basic Task. In the “Create Basic Task Wizard” enter a name, next for “Trigger” select “When I Log on.” For Actions, select “Start a program” and enter “PowerShell” in the Program/script box.
In the “Add arguments (optional)” box enter “
.\[Script Name].ps1.” For example, enter “
.\AutoMute.ps1” as the value.
Then, in the “Start in (optional)” box, add the location of the folder that contains your PowerShell script. We have saved this script in a folder called “Scripts” that is off the root C: drive. Finally save and close the wizard by clicking on “Finish” button.
That’s all. Try logging off and login again to check if the script’s working as expected to mute windows volume when headphones are disconnected.
2) Run Manually: You can run the script manually by entering the path and filename in PowerShell console. Example, just type in “C:\Scheduler\AutoMute.ps1” and hit Enter. This will keep running AutoMute.ps1 file silently in the background till you log off.
Do note that after following either of the methods, by default your system speakers would be muted. It would be unmuted only when you connect an earphone in the audio jack.