Oh, sigh. I should have tried this myself.
The problem is DROP DEAD obvious!
var drives = "BDEFGHIJKLMNOPQRSTUVWXYZ";
var driveletter = drives[d];
But MSIE--even MSIE 9--doesn't SUPPORT treating a string as an array of character!
You just have to change that line to
var driveletter = drives.charAt(d);
and presto! It all works.
Again, though, you must have your security settings in MSIE such that "unsafe ActiveX controls" can be used. At the very least, the setting must be "prompt", not "disable". If you feel comfortable doing it, you could use "enable".