The Media Center Sandbox

Resources and discussion for developing experiences in the Windows Media Center platform.
Welcome to The Media Center Sandbox Sign in | Join | Help
in Search

Control of autorun process on Media Center -- from CD

Last post 08-15-2010, 4:51 PM by eddyc. 3 replies.
Sort Posts: Previous Next
  •  07-28-2010, 11:11 AM 9740

    Control of autorun process on Media Center -- from CD

    This is a bit of a longshot:

    We're distributing a CD with our Media Center product containing installation software.

    If the user happens to insert this CD into their drive when Media Center is running, Media Center's autorun wizard takes over, scans the CD, finds some WMV files, and prompts the user to import them.

    We'd like to be able to include some sort of additional data or files on the CD that would allow Media Center to be a bit more helpful: we envisage some inexperienced users may consider that their "install" is now complete, when in fact all they've done is install a few videos into their public videos folder.

    Ideally, we'd like Media Center to kick-start the actual installer from the CD, just as happens if the CD is inserted on the desktop (i.e. via autorun.inf) -- or prompt the user to install the software via the desktop.

    The catch, of course, is that since this is happening before our software gets installed, we need to make use of the existing autorun capabilities.

    So: are there any magic cookies we can include on our data CD that will change Media Center's default behaviour when the CD is inserted?
  •  07-31-2010, 10:45 AM 9743 in reply to 9740

    Re: Control of autorun process on Media Center -- from CD

    Hi Eddy,

    I believe that if you put an .mcl file in the root of the CD that will get run. I think you'll only be able to run an HTML app from there (as you won't have anything in the GAC yet), but should allow a basic UI to be presented.

    Cheers,
    Andrew
  •  08-02-2010, 6:35 PM 9752 in reply to 9743

    Re: Control of autorun process on Media Center -- from CD

    Thanks Andy - after a bit of experimenting, it looks like AUTORUN.MCL in the root folder of the CD will get launched if present - exactly what I need!

    Much obliged,

    Eddy
  •  08-15-2010, 4:51 PM 9808 in reply to 9752

    Re: Control of autorun process on Media Center -- from CD

    Just as a final postscript to the thread, I was able to use an Autorun.mcl file in the root of the CD-ROM to launch my HTML application successfully. Media Center only pays attention to this file while running fullscreen; if you're running in a window, the normal desktop Autorun.inf takes effect.

    Loading time was quite slow, however, since the HTML app brought in a number of Javascript files, style sheets, HTC elements, images, etc - around 5-6 seconds to fully load everything, as the CD-ROM went seek-crazy.

    I was able to significantly improve loading time by packing everything into a .mht (Multi-part HTML file), i.e. what you get when you "Save as type Web Archive" from within Internet Explorer. This reduced loading time to about a second.

    It's not quite as simple as loading your main HTML page into IE, and doing a Save As. Internet Explorer doesn't properly process HTC references or, indeed, bgsound references for inclusion in the file. However, you can co-erce it to do so by adding some dummy references to the additional files in your main HTML file (I used hidden [img] tags to do this).

    I also found it useful to set an explicit background colour in the Autorun.mcl file -- this gives the user some early feedback that something is happening, because the screen changes colour even before the HTML app loads.

    Finally, I also noticed that the mere presence of an Autorun.mcl file seems enough to block the automatic scanning of the CD to see if there are any photo or video files to import, even if the Autorun.mcl doesn't point to a real application. This is useful if all you want to do is block the Import requester appearing.
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems