Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

OR

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.

share|improve this question

1 Answer 1

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

share|improve this answer
    
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?) –  muntoo Oct 30 '11 at 2:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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