Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What should I use to program that kind of Macro ?

share|improve this question


Look up the "SoundSet" function to achieve what you want here.

share|improve this answer
Can I do this without a program like AutoHotKey, I can do macros with my Razer Tarantula I'd like to use that if possible – Peter Oct 26 '09 at 0:23
You asked what program you could do it with, I gave you an answer. If you don't want a certain type of answer, put that in the question, Razer Tarantula we're not telepaths. I've never used such a keyboard, so I don't know, but AHK would still be fit for the task. – Phoshi Oct 26 '09 at 0:55
I'm trying at the moment and I can't seem to make it work with Windows 7 sound devices – Peter Oct 26 '09 at 0:59
I listed all the sound devices, a few are there but not the one I want to change settings, I'm using USB headphones – Peter Oct 26 '09 at 1:04

You may use devcon from Microsoft

The DevCon utility is a command-line utility that acts as an alternative to Device Manager. Using DevCon, you can enable, disable, restart, update, remove, and query individual devices or groups of devices. DevCon also provides information that is relevant to the driver developer and is not available in Device Manager.

the page contain a detailed set of information about how to use it,

for your case, just put

devcon find *

To lists device instances of all devices that are present on the local computer.then,

devcon disable <your-sound-card-HardwareID>

to disable devices that match the specific hardware or instance ID,you can use wildcard (*)

share|improve this answer

Find what registry values your particular Macro queries, you can do this with Sysinternals Process Monitor.

For me, the calculator key on my keyboard queries the value of


which is set to "calc.exe".

Change that value to use NirCmd to mute the device or the previously mentioned DevCon to disable the device.


to mute

C:\path\to\nircmd.exe mutesysvolume 1

to unmute

C:\path\to\nircmd.exe mutesysvolume 0

or to disable

devcon disable [hardware_id] 

and re-enable

devcon enable [hardware_id] 
share|improve this answer

You must log in to answer this question.