Tuesday, March 1, 2016

iTunes Audio Redirection

Something that has annoyed me for years finally annoyed me too much.

iTunes does not allow you to select an audio device on Windows. It's one of the most annoying things possible when you want to play iTunes videos on your TV but want all other sounds to come to your main speakers.

It's something people have asked for years for Apple to implement it and it isn't even that hard to do.

Well no more.

I wrote a "shim" that allows you to select your output device for iTunes. It requires you select DirectSound in your iTunes preferences.

Pretty simple to use. Put the "dsound.dll" in your iTunes folder.
Then use the accompanying iTunesAudioSelector.exe file to select your audio device. When you change a setting it stores the desired audio device in the registry so that the shim then checks when iTunes tries to create the audio device.

When iTunes next starts it should be using the device you want rather than the default.

Note this only works with x64 iTunes since that is what I use.


Get the two files here:
https://drive.google.com/file/d/0BwN-SjkZGsz2V3J6czVFT1JTQlk/view?usp=sharing

Tuesday, February 2, 2016

Blocking attachments by extension in Thunderbird

So after the third such incident at my work where a user had opened a .exe within a .zip, I decided to write an addon for Thunderbird that blocks attachments that are either executable or are zip files that contain an executable.

Our antivirus product (Kaspersky) has a feature to remove/rename .exe files within attachments, but unfortunately it can't remove/rename files within archives (I submitted an enhancement ticket for it).

Since we use shared hosting for our email we don't have control over the email server so I can't implement a filter directly on the email server which would have been the preferred solution.

So, my ultimate idea was a Thunderbird addon. Since this is my first such addon, and I had no idea how to write one, I forked another project and dropped my code into it as an addition.

Here is the source: https://github.com/glenritchie/SecondOpinion/tree/plusext

And pre-compiled(and signed) XPI files: https://github.com/glenritchie/SecondOpinion/tree/gh-pages/dist