Make Money

Freelance Jobs Freelance Jobs

9.11.11

Launching Background Commands from Extras Library

Delicious Digg StumbleUpon Reddit Subscribe to RSS Feed



Looking for a way to launch commands or programs to run in the background from the Extras Library menu? When you may be in luck, CW-Kid and Andrew Cherry have come up with a .dll and a set of direction for doing just that. The process can be a little daunting for novices but if you’re looking for a way to run cmd files in the background you’re likely able to tackle the task. This can be especially useful for those looking to run mc2xml or that have setup batch files to process WTV to DVR-MS conversion. After following this guide you’ll have a handy little icon to launch the command from right inside Windows 7 Media Center.


To get started you’ll need to download the .dll file created by Andrew Cherry and extract it to the C:\Windows\ehome folder. This will handle the launching of the cmd file in the background. These cmd files are simple text files with the .cmd extension that can be written to do anything you can do from a standard command line interface, also known as a batch file.

Once you’ve got the .dll file extracted to the ehome directory and a batch file ready to run create a new xml file. Again this is a simple text file which can be created in any notepad application, simply save the file with the .xml extension and it’s an xml file. Copy the following into the new XML file:

<application title=”The title text that appears below the icon in Media Center
    id=”{25e1993f-a9d8-4251-871c-0bf84c6d6e29}”>
<entrypoint id=”{58267566-672b-4b1d-812a-fc46d728d073}”
    addin=”MissingRemote.AppLauncher.AddIn,     MissingRemote.AppLauncher,Culture=Neutral,Version=1.0.0.0,PublicKeyToken=391ca93ec5a00478″
    title=”The title text that appears below the icon in Media Center
    description=”Description text that appears below the icon in Media Center
    context=”%ProgramFiles%\foldername\name of your.cmd”
    imageUrl=”C:\Program Files\foldername\Images\your icon image.png”>
      <category category=”More Programs”/>
    </entrypoint>
</application>

Of course, you’ll need to alter the red text to match the title, description and location of your batch file as well as editing the location of a PNG image to use in the Extras Library as an icon. These images should be a square probably not needing to be any larger than 128px X 128px as Media Center will scale them appropriately for the resolution being used. Once you’ve got the XML file ready open an elevated command prompt (run –> cmd –> ctrl-shift-enter).

cmd


Inside the command windows change to the C:\Windows\ehome directory and enter the following
command: registermceapp /allusers XMLFILE. Change XMLFile to the location that you’ve saved the XML file to and press enter to run the command. You should get a success message. If you don’t receive a success message it’s likely that you’re not inside an elevated cmd prompt, also for multiple new entries you’ll need to change the GUID and ID in the XML file (id=”{25e1993f-a9d8-4251-871c-0bf84c6d6e29}”>
<entrypoint id=”{58267566-672b-4b1d-812a-fc46d728d073}”
).

Once the XML data has been successfully entered into the registry launch Windows 7 Media Center and browse to the Extras Library.

extras library

That’s all there is to it! You should now see the icon for the program set in the XML file and pressing the icon should launch the cmd file in the background executing the set of commands inside. Thanks to CW-Kid for sharing this with the Media Center community! Be sure to stop by his blog and check out his many other guides and articles on Windows Media Center.


comment and sharte to your  friends!

0 reactions:

Post a Comment

 

HOW TO HACK Copyright © 2010 LKart Theme is Designed by Lasantha