Is there any way to quickly enable/disable my headphones using a script? Basically, it should 'emulate' this functionality.

If you disable the speakers then the users will not be able to hear any kind of sound even when the speakers are plugged in.

To accomplish this follow these steps:

1) Open Control Panel (All items view)and double click the Sound icon.

enter image description here

2) In the Sound window you will notice the Speakers and other audio devices connected under Playback tab.

enter image description here

3) Now click on Speakers and then click Properties button as highlighted above.

4) In the Speaker Properties dialog box select Use this device to enable Speakers in the Device usage dropdown list at the bottom.

enter image description here


Select Don’t use this device to disable Speakers in the Device usage dropdown list as shown in the above figure.

5) Click Apply and then OK button

Note: Once you disable the speakers they will no more be visible on the Sound window as shown below.

enter image description here

Thus to view them and to enable them right click on the Sound window and select the option Show Disabled devices as shown above to view the disabled speakers. To enable them go to step 4.


VBScript, JScript, Powershell, Autoit, AutoHotKey all are capable of this. The list could grow even longer if I googled.

  • 1
    Could you explain how to do it using Powershell? Will it work without opening all the dialog boxes? (So, it doesn't use 'clicks' like AutoIt?) – Mateen Ulhaq Oct 30 '11 at 2:42
  • @MateenUlhaq did you find an answer to that question? – Taylan Sep 2 '15 at 1:49
  • @Taylan Nay, though I suppose one could write a script for it. – Mateen Ulhaq Sep 3 '15 at 10:19

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.