Flying Visits with Boot Camp: Using the iSight Mic in XP
As I mentioned in my first post in this series, one of the three main reasons I boot into Windows is to game. My mates and I use Ventrilo, a lightweight VoIP program, to chat, talk tactics or just smack-talk each other while we play.
When you’re running Windows on a Mac, the only real upsides compared to running it on your standard PC are physical—hardware rather than software benefits. One of the best hardware features of any Mac is its built-in iSight camera and microphone but support for them in Windows isn’t as great as it could be. Being able to just talk at your monitor without a separate, wired microphone is great but not when everyone on the receiving end has to crank their volume up to full in order to hear you.
There is a solution, however; hidden away in the depths of the advanced sound and audio options of XP is a check box label ‘Microphone +20 dB Boost’. No prizes for guessing what it does but you’ll also be rewarded with an annoying hissing sound from your speakers due to the iSight microphone now being ultra-sensitive.
Getting Lazy
The only solution I could think of was to enable the boost only when I needed it—before jumping into a Vent channel—and disabling it again when I was done. I didn’t fancy clicking through all of those dialogues every time I felt like playing though, so I opted to script my way out of trouble.
My previous post on Boot Camp used AppleScript to switch operating systems easily. Unfortunately, there isn’t really a Windows equivalent of AppleScript. There is, however, the Windows Script Host:
As the name implies, WSH is a script host. A script host is a program that provides an environment in which users can execute scripts in a variety of languages; languages that use a variety of object models to perform tasks.
We’ll be using JavaScript for our mic boost toggle. First, however, you’ll need to find a file called mmsys.cpl in C:\WINDOWS\system32. Right click it and go Properties, then change the ‘Opens with:’ to control.exe (Windows Control Panel) which can also be found in system32.
Now, open up Notepad or your preferred Windows text editor and paste the following:
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.Run("mmsys.cpl");
WScript.Sleep(500); // wait 500 ms
WshShell.SendKeys("^{TAB}"); // ctrl-tab: cycle tabs
WshShell.SendKeys("^{TAB}");
WshShell.SendKeys("^{TAB}");
WshShell.SendKeys("{TAB}"); // tab down to button
WshShell.SendKeys("{TAB}");
WshShell.SendKeys("{TAB}");
WshShell.SendKeys("{TAB}");
WshShell.SendKeys("~"); // return: push the button
WScript.Sleep(500);
WshShell.SendKeys("+{TAB}"); // shift-tab
WshShell.SendKeys("~");
WScript.Sleep(500);
WshShell.SendKeys("1"); // toggle mic boost checkbox
WshShell.Sendkeys("~");
WScript.Sleep(500);
WshShell.SendKeys("%{F4}"); // alt-f4: exit mixer
WScript.Sleep(500);
WshShell.SendKeys("%{F4}"); // alt-f4: exit cpanelGive it a name, making sure you include the .js extension, and save it in your system32 folder. You’ll probably want to create a shortcut to the file on your desktop so you can easily toggle the boost on and off.

The script simply navigates to the mic boost check box as if you were using your keyboard. The half-second pauses are to ensure each window has opened up before sending keys to it. If you find the script acting weirdly or not enabling the boost, try increasing the pauses to a second or so. I also recommend only running the script when your system is relatively idle. If it’s busy doing something else then the numerous keystrokes will likely be too much for it to handle and you might end up sending an alt-F4 to whatever unsaved project you happen to be working on.
If you want to turn the boost off again, just run the script once more and the hiss will be gone. I haven’t tested it in Vista at all but I’d be surprised if the same commands work. If you have Vista and feel like rearranging the script, it would be great if you could post it in the comments.