I am pretty sure that this is a problem with Vista and not I.E. but I have bni idea where in the Vista forums to post this. The following code works in XP with IE 6 and IE 7: function playFile(player, file) { var WshShell = new ActiveXObject("WScript.Shell"); if (WshShell.AppActivate("Windows Media Player")) { WshShell.SendKeys('%FO'); WshShell.SendKeys(file); WshShell.SendKeys('{ENTER}'); } else { WshShell.Run('"'+player+'" "'+file+'"'); } } It is called by passing in the fully specified (C:\...) location of the WIndows Media Player and an mp3 file that I want it to play. When the Media Player isn't running, it is started and the file plays. If the Media Player is running, it can't open the file. After some examination, the File Open Dialog box is dropping the first character of the file name (as in the C) and of course, WMP can't open ":/...". ANy Ideas?
The following script works with Vista, it is a real kluge. Basicly if the app is running, I kill it and then run it again. function playFile(player, file) { var WshShell = new ActiveXObject("WScript.Shell"); if (WshShell.AppActivate("Windows Media Player")) { WshShell.SendKeys("%Fx"); } WshShell.Run('"'+player+'" "'+file+'"'); }