I am trying to use JavaScript and the iTunes COM interface to add files to my iTunes library. I have written a JavaScript file that successfully adds a file to my library, but only when called from the command line.
When I run the same script from a browser, it creates an iTunes application as the SYSTEM user, and this is where I believe my problem lies...
So what I'm trying to accomplish is to access either the iTunes instance running under my user as opposed to SYSTEM user, or to add my user's iTunes library instead of the SYSTEM user's library.
Here is the JavaScript:
var iTunesApp = WScript.CreateObject("iTunes.Application");
iTunesApp.LibraryPlaylist.AddFile('B:\\filetoadd.mp4');