Launching XBMC with a Windows Media Center Remote



Updated 10/23/2010: Based on some comments, I’ve released a new version with an installer and file for defining custom parameters. Big thanks to Joshka for showing me a neat registry trick that allowed me to create the installer. I’ve also moved the source to a subversion repository. Enjoy!

I recently took up the task of switching my media center software from Windows 7 Media Center to the Windows version of XBMC. I found XBMC easier to get working with obscure encodings of video files (it uses mplayer instead of the normal codec engine). But, my reasons for switching are not the point of this post. The point here is that switching to XBMC from Windows Media Center has a few challenges. One such challenge is getting the Windows Media Center remote to work in a nice way. Luckily, some excellent work has been done on that front. People have already provided premade media center remote configurations for XBMC. However, the “start” button on the media center remote still had the nasty habit of launching the Windows 7 Media Center app instead of launching XBMC.

I looked around the ol’ Internet for a solution to this problem. Turns out, the behavior of that “Start” or “Green” button on the media center remote is to cause a special key combination to be pressed. This key combination is bound to launching “C:\Windows\ehome\ehshell.exe.” The quickest workaround to the problem is to change ehshell.exe to something that launches XBMC. I then saw some people had written some batch files that launched XBMC. They then used a batch-to-exe converter to make it an executable and replaced ehshell.exe. That was great, but it still had a weakness. If, for some reason, XBMC was taken out of the foreground, it wouldn’t come back. Bummer. So I fixed it!

I wrote a little application to launch XBMC. It does a few things. First, it will check if XBMC is already running. If it is, it will bring it to the foreground for you. If it isn’t running, it will launch it. It will first try using the install location in the registry to find where to launch XBMC from. If it can’t find that, it will try the default location of the XBMC.exe file (both 32-bit and 64-bit versions).

Download The Installer

Manual Install Files and Instructions

Finally, here is the (very simple) source code:

using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.Win32;

namespace XbmcLauncher
    static class Program
        private static extern bool SetForegroundWindow(IntPtr hWnd);

        private static extern bool ShowWindow(IntPtr hWnd, int cmdShow);

        private const int SW_SHOWMAXIMIZED = 3;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
            // Attempt to bring an existing XBMC to the foreground.
            // If none exists, open XBMC.

        private static bool BringProcessToForeground()
            Process[] processes = Process.GetProcessesByName("XBMC");
            if (processes.Length != 0)
                // If XBMC is currently running, bring it to the foreground
                IntPtr hWnd = processes[0].MainWindowHandle;
                ShowWindow(hWnd, SW_SHOWMAXIMIZED);
                return true;
            return false;

        private static void OpenXbmc()
            string xbmcPath = null;

            // Attempt to find the XBMC executable location via the registry
            RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\XBMC");

            if (key != null) // If the path is in the registry use it to open XBMC
                xbmcPath = key.GetValue("") as string;
                if (LaunchXbmcProcess(xbmcPath + @"\XBMC.exe"))
            else // Otherwise, we'll try to use the default locations
                string x86Path = @"C:\Program Files\XBMC\XBMC.exe";
                string x64Path = @"C:\Program Files (x86)\XBMC\XBMC.exe";

                if (LaunchXbmcProcess(x86Path))

        private static bool LaunchXbmcProcess(string path)
            if (path != null && File.Exists(path))
                string args = "";
                Process proc = new Process();

                    using (StreamReader argStream = File.OpenText("XBMCLaunchArgs.txt"))
                        args = argStream.ReadLine();
                proc.StartInfo = new ProcessStartInfo(path, args);
                return true;
            return false;

Get the full source, project files, and install scripts at (subversion)


  1. Tery   •  

    This works fine but there is a little problem, lots of us use xbmc portable mode (arg -p), maybe you can compil one launcher for each mode ?



  2. Jacob   •     Author

    Sure. I’ve reuploaded the zip file. The zip now has a portable mode folder with an ehshell.exe set to launch XBMC with the “-p” arg. If I find out there are a lot of command line parameters people like to use, I’ll have to do something more elaborate with the launcher. But, this should work for now.

  3. Ronald   •  

    maybe use something like;

    cacls %systemroot%\ehome\ehshell.exe /e /g administrator:F

    for the first 8 steps? (just a thought)

    Big thanks for your input on the Shell!

  4. Jacob   •     Author

    I think that could replace steps 7 through 9. The problem, and please correct me if I’m mistaken here, is that Administrators don’t have ownership of that file by default. Before we can change permissions, we need to take ownership. Is there a command prompt mechanism for doing so? I can totally see these install instructions being a big pain, so anything to reduce that would be nice.

  5. Ronald   •  

    This only works in Vista/7;
    takeown /F ehshell.exe
    and then change the permissions.
    My guess was it could be possible with robocopy but then we still need SUBINACL 🙁

  6. steelman1991   •  


    Just a quick question on this – I ahve had a terrible time getting my Harmony One (emulating an MCE Remote) to launch xbmc on a consistent basis. Can you advise whether the only changes listed in your article are required. I notice that in the rar file there is also an XbmcLauncher.exe – should this be unrared anywhere I cannot find any instructions relating to this – Sorry if this is a stupid question.

  7. Jacob   •     Author

    I’m also using a Harmony remote emulating an MCE remote, so that certainly shouldn’t be an issue. XbmcLauncher.exe is the exact same file as ehshell.exe, just renamed. So no, you have no reason to do anything with it. You should only need to do what is listed in the install instructions. Has the launcher worked at all for you? If you double click XbmcLauncher.exe in the directory where you unzip everything, does XBMC start? If it doesn’t, the launcher is probably having trouble locating your XBMC directory. Perhaps you didn’t run the installer and just copied over the XBMC directory to your machine?

    The launcher works by checking the registry key “HKEY_CURRENT_USER\Software\XBMC\(Default)” for an XBMC directory. If it fails to do that, it will check the default 32-bit and 64-bit XBMC install directories (“C:\Program Files\XBMC” or “C:\Program Files (x86)\XBMC”). If neither of those two approaches work at finding your XBMC directory, the launcher won’t know what to do and will just exit.

  8. steelman1991   •  

    Hi Jacob

    Sorry my bad – I wasn’t having issues with your launcher, but with the various options available on xbmc (jhsrennie’s .reg and launching from a shortcut key). None of the solutions worked and I was having problems finding a stable solution. I just wasn’t sure what effect if anything the XbmcLauncher.exe had.

    I tried your launcher with the combination of jhsrennie’s Remote-SendKeys.reg, however without the availability of a mapped ‘info’ button in his config (can’t think why this is missing from his config – might need to ask), this was useless for xbmc. I have since moved to a simulated mce keyboard activity within the Harmony set-up and everything has worked OK.

    Sorry for the confusion. Everything working as it should at the moment and thanks for your hard work in providing a solution – was starting to tear my hair out trying to get this to work.

  9. dotbenjamin   •  

    Amazing — thank you so much. Bit of a hack, but it’s at least a reasonably robust one.

    Thanks again!

  10. PiCaRd359   •  

    Thanks for the hack, though I seem to be having some trouble. I can launch XBMC from the XBMCLauncher.exe but the remote is not launching it. Any ideas for troubleshooting? I am running XBMC 9.11 on Win 7.

  11. CJ   •  

    Awesome, thank you!

  12. Mei Yang   •  

    Thanks for the hack. Worked beautifully for me. I am using a HP MCE remote with Windows 7.

  13. Dave   •  

    Works perfectly, cheers!

  14. martin   •  

    Excellent work! does exactly what it says on the tin. fabulous!

  15. Pete   •  

    Thank You for putting the time in and making this. Works perfect!!!

  16. mb   •  

    Thanks for the launcher! I’m starting to use Boxee more and more and would like to launch Boxee instead of XBMC. I think I know how to modify the source code to launch Boxee, but I’m not sure how to re-compile and create the eshell.exe afterwards. Any help would be appreciated. Others may be interested in a BoxeeLauncher as well 🙂

  17. Jacob   •     Author

    Yeah, it shouldn’t be too much of a hassle to make it work for Boxee. Especially if the Boxee installer creates a registry key pointing to where the program is the same was as XBMC. I’ve been meaning to give Boxee a run for a while now, I’ll see what I can whip up.

  18. Pingback: Launching Boxee with a Windows Media Center Remote | Inchoate Thoughts

  19. Ulme   •  


    nice work! Works great at my system (x64 win7). But, I have “ultramon” running, which allows me to start an executable on the 2nd Monitor . . . (exe link: “C:\Program Files\UltraMon\UltraMonShortcuts.exe” /l C:\ProgramData\Realtime Soft\UltraMon\ShellShortcuts\Media Center.umshortcut”)

    I want to change the startcommand of the launcher. How can I do that?

  20. vilrockerdefer   •  


    I seem to have a problem getting this to work on XP 32bit : whenever I rename, move or erase ehshell.exe, after a few seconds it reappears. If, during that time I copy your ehshell, the previous ehshell overwrites it.

    Help !

  21. vilrockerdefer   •  

    Well, through safe mode and reading-only your file, I was able to place it right.

    Problem is, when I push the green button I get this error : “strong name validation failed for assembly ‘c:\windows\ehome\ehshell.exe’. The file may have been tampered with or it was partially signed but not fully signed with the correct private key”

    Still begging for help…

  22. Jacob   •     Author

    Windows XP? Do you mean Windows Media Center 2005 or XP? I’m not familiar with what eshell.exe normally launches on XP. Anyway, when files on XP are replaced, they are being copied from “%windir%\system32\dllcache.” It’s like an auto-restore mechanism in case one of them gets altered by malware or something. (I used to have this issue when trying to replace Notepad.exe with a different text editor). That said, there are a few ways to address this. You could just copy the modified eshell.exe to the system32\dllcache directory first. See this article: – it’s meant for notepad replacement, but the same concept should apply for eshell.exe.

  23. vilrockerdefer   •  

    Thanks for answering. I did the above method and that works indeed. But I still get the error message I mentioned, and a second one I didn’t mention before but that was already there too after I click the first : “EHshell.exe – common language runtime debugging services. Application has generated an exception that could not be handled. Process id=0xadc (2780), Thread id=0xae0 (2784).”

    I have the option to click CANCEL to debug the application. But if I do that I have another message stating that I don’t have the resitered “jit debugger”.

    Au secours !

  24. Vazgen Koudagooli   •  

    Im using a AVS MCE certified windows remote. Did the patch job copied the exe and works. I press windows button and it launches XBMC..NOW THIS IS PROBLEM.. XBMC keeps launching itself. I dont press the button and xbmc is completely shut down…every 10 sec it starts by itself..any help

  25. Vazgen Koudagooli   •  

    wait i just restarted PC and seems this problem is gone

  26. sufreak   •  

    If you have a harmony remote, make life easy. Program the Shortcut Hotkey, and map everything over to keyboard commands. Problem solved.

    The only thing more you can do is use the advancedconfig file to create a Quit function.

    Now, I have my system launch XBMC when I switch to my Media Center, and it quits XBMC when I “power off”.

    My next step is to get the sleep functions working, and everything will be good to go.

  27. Mal   •  

    Just what I needed. Using a cheap wireless keyboard with WMC buttons – now XMBC buttons.

  28. Derek   •  


    One more refinement would make this already great script perfect!

    If you press the green button while XBMC is already running, but is either minimized or in windowed mode, it would be really great if it would un-minimize and switch to fullscreen mode.

    I have no idea if this is possible.

  29. Bilal   •  

    You are a star!

    I’ve been using XBMC on my Mac mini and it had an option built-in to launch XBMC when the Apple remote menu button was pressed instead of Apple’s Front Row.

    Now I can do the same thing with XBMC in Windows 7 and the extra work you’ve done to check if it’s already running is great.

    I’m not a programmer but, with all these requests for modified loading parameters, how about having it read from a separate config file?

    It could just have a single line (e.g. C:\program files\XBMC\XBMC.exe) that people could edit as they see fit, and even an extra line that can be changed to look for a different running process (e.g. VLC) without editing/recompiling the source.

    I’m downloading VS2010 Express to see if I can maybe do this. If it works, I’ll post back.

  30. Jacob   •     Author

    Yeah, you can absolutely do that. No one has really requested more parameters, so I haven’t bothered with solving that issue yet. It shouldn’t be very difficult though. Let me know if you have issues opening this in VC# Express.

  31. Bilal   •  

    Hi again,

    After much wrestling with VirtualBox, I got VS2010 Express running. It had to convert your project first but, using a combination of Googling things and staring at the screen trying to figure out what’s going on, I’ve finished a dodgy version that reads a file called anyproglauncher.cfg in the ehome folder:

    The hilarious cfg file contains three lines:

    Line 1 tells the program what process name to look for(notepad)
    Line 2 is the path to the program to run
    Line 3 is for any arguments to send to the program

    If notepad is running, it’ll bring it into focus, or open it if it isn’t. I haven’t done any sort of bug-checking other than running it a few times, but it appears to work. So far it seems the process name is basically the exe file without the .exe bit but this could vary between programs. I’ve only tried it with WMP, Notepad and Chrome. I had to remove all the XBMC folder-checking bits as I didn’t know how to get the variables from the cfg file line reading section to be accessible by those bits so just removed them.

    The source folder is in there, too.

    It’s been fun, and hopefully it won’t cause any nuclear meltdowns or 100% CPU-athons.

    As for Derek’s suggestion about maximising the screen, I’m hoping there’s a command that maximises the current window, similar to how you got it to bring the window into focus, but I haven’t looked it up yet.

    Next up could be some kind of groovy config form to make the cfg file automatically (and maybe turn it into squiggly code like the cfg files for cool programs).

  32. Mota   •  

    Works GREAT!! Thank you so much.

  33. Joshka   •  


    Thanks for this little app. You can reduce the installation effort significantly to one step using the Image File Execution Options registry key. Windows has a neat feature that allows you to replace one executable with another for debugging purposes.

    1. Run the following command from an adminstrator command line (Press Win, type cmd, press Ctrl+Shift+Enter):

    reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ehshell.exe” /v “Debugger” /t REG_SZ /d “\”C:\tools\XbmcLauncher\XbmcLauncher.exe\”” /f

    Alternatively paste the following lines into notepad and save as a .Reg file, then double click on the file that you just created. (This might be useful to package with the XbmcLauncher zip file.

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ehshell.exe]

    Note: I have assumed an that the tool is unzipped to c:\tools. If you unzip the tool elsewhere you’ll need to change this value. It would be fairly trivial to create an installer for the tool that handles all this automatically, or even just adjusts this registry key on first run.


  34. Jakweeze   •  

    Just curious, it states above that:
    “First, it will check if XBMC is already running. If it is, it will bring it to the foreground for you.”

    I see this also refected in the source code, however running Dharma-b2, Win7x64, over HDMI and in Fullscreen OR Maximized window instead of Fullscreen (whatever that option reads in XBMC Video Settings) and alt-tab out, when I click the Windows button on the remote I see a quick hourglass, and nothing happens.

    On the bright side it’s not relaunching a different XBMC over the current one, on the downside it’s not bringing it to the forefront.

    Wondering if it’s a setting I have going on somewhere or what’s happening! Thanks much.

  35. Jacob   •     Author

    I’ll try this out with Dharma and see if I can’t work around the issue.

  36. Jacob   •     Author

    I’ve done an update. Hopefully this will allow the program to return to the forefront and restore the window to maximized when alt-tabbed away. It should also be much easier to install (as it has an installer).

  37. Pingback: Inchoate Thoughts » Updated XBMC and Boxee Launchers – Now With Installers!

  38. Joshka   •  

    Cheers for the props 🙂

  39. PastorVor   •  

    Amazing. Many props. Solves so many problems.
    I’m using an HP remote which is basically an MCE. This makes the “TV” button launch (or change focus to) XBMC.
    I just want to say many thanks.

  40. Toastr   •  

    Works great, but I cant get the remote to shut down the computer when I preres on on/off button on the remote.

    I have EEEBOX 1501 with an MCE remote, and runs Dharma4 with win 7.

    Anyone know how to configure the remote to shut down the computer within XBMC?

  41. Smitty2k1   •  

    This. Is. Awesome.
    Thank you!!!!!

  42. ub   •  

    hey, first of all i’d like to thank you for your efforts.
    i have a problem using this, i run winxp sp3 and in my ehome folder there is no eshell.exe; when i manually rename the exe provided on this page and copy it into the ehome folder, nothing happens when i push the “start” button. using the installer doesn’t work neither. do i have to install a media center edition of windows in order to get this little tool to work?
    thanks in advance

  43. Jacob   •     Author

    Correct, ehshell.exe launches Windows Media Center on the versions of windows that include it. This software is intended as a way override that behavior. You could still use this as a launcher, but you’ll need another utility that takes the green button IR command from the remote and turns it into instructions to run the launcher. There are a number of free tools to do that. Google “windows IR software.”

  44. Lasse   •  

    thanks works great im så happy for this…

  45. Ed v. Schleck   •  

    That worked perfectly, thx!

  46. Brendon   •  

    Just found this. It does exactly what I need it to do, the only thing is that it keeps launching xbmc or bringing xbmc to the foreground if I press the green button and close xbmc or alt+tab.

  47. pc-nico   •  

    Hey thanks for this tool, i like it very much…
    I am Using the Tool with my Harmony… Starting XMBC works fine, but take back from taskbar to the front doesn´t work? Anybody a idea?

    My System: Win7 32Bit Prof.


  48. MrSkyline   •  

    Thnx a million! this is a great piece of software!
    It works with XBMC 10 also (for whoever is wondering)

    getting it to the front while the taskbar is in front doesn’t work for me either (XBMC 10 with Win7 Ultimate) but i don’t mind, i also have a wireless mouse, but a remote is better 😉

    thnx allot!

  49. Auldthief   •  

    Just perfect! U’re The Man! I was wondering can ALL the functions that are accessible using keyboard and mouse be performed with the remote. e.g. How do I right click (in order to change plugin settings etc)? I’ll do away with the keyboard altogether, a dream right now! 🙂

  50. Auldthief   •  

    Just to let you know, I’ve officially REMOVED windows media center from my windows 7 HTPC after getting this amazing app! Don’t need it anymore! All thanks to you!

    PS: I came here to ask how I can right click using the remote! 🙂

  51. Auldthief   •  

    Got it! The “Guide” Button does it! It was always there! U’ve thought of EVERYTHING! 🙂

  52. Tiz   •  

    I love it when people have attention to detail!

    Thanks for this one!!

    Peace! Y

  53. Carlos   •  

    Great program thanks, solved a headache!! The only question that I have is that I use an xbox as extender which I believe uses the ehshell.exe from my PC… I guess that this workaround will not let my xbox connect to my PC or am I wrong??

    Thanks again, great work

  54. Jacob   •     Author

    I’m not sure if ehshell.exe is actually used for the media center extender. It very well could be. Ehshell.exe is the media center frontend. There are a couple of other executables that control the extender service, extensibility host, etc. But, I don’t know if they’ll function with a new ehshell.exe

  55. Mike31   •  

    Hum, why using another software to lauch XMBC??

    Just for information, the “green button” or “media button on keyboards” is automatically assigned to the default software used to open .cda files (audio CD).

    If you want to launch XMBC with an MCE remote, you just have to assign XMBC as the default software to open .cda files, and it works.

    Hope this help.

  56. Jacob   •     Author

    I wasn’t aware of the .CDA workaround. However, even if you apply it, XBMC still has an issue with returning itself to the foreground when relaunched. The devs could fix this, but as of 10.0, this was still an issue. This launcher runs a few commands to attempt to restore XBMC to the foreground. If the *.CDA association is true, you should suggest to the XBMC team to modify their Windows installer to include an option to remap this association along with adding launch code to restore their window to the foreground if it is already open.

  57. Prc   •  

    Hi all, thx a lot for the installer, works fine for me. But now i have one problem, i have to start MS MCE for one time to disable the automatically optimization, cause this feature starts my pc every night. Can anybody tell me how i can start the ms mce after installing the fix, unfortunately i have no backup of the ehome.exe.
    Thx in advance

  58. Jon   •  

    This seemed to work when I installed it, but now most of the time instead of returning focus to XBMC, it just makes XBMC flash on the taskbar, without becoming responsive to commands from the remote. It still works occasionally, which is strange. (I’m using Win7 Ult x64)

  59. steven   •  

    Fabtastic, brilliant programming. Much appreciated. S, Ireland.

  60. Codegear   •  

    You did a great job coding this tool! It doesn’t need to be complicated to be valuable.

    Find an add-on that allow switching between XBMC and Windows Media Center when combined with your ehshell.exe replacement at

  61. Shaun Meilak   •  

    Wanna just say thanks so much for this XBMC launcher.

    Makes it so much easier to just sit down on the couch and press one button and bangggg XBMC is up on my screen for my viewing pleasure!

    Thanks for the mod!

  62. Bubafu   •  

    I love this tool and it works great but my problem is that i can’t start windows media center any more. ehshell.exe and everything else starts xbmc. how to launch media center???

    thanks a lot!

  63. Nadir   •  

    Hi manually installe the file. Problem is when I press tv on my hp mce remote it starts xbmc. But actually pressing the start button on remote won’t start xbmc. Any idea how to fix? Using xbmc 10 and win 7.

  64. Nadir   •  

    Just as followup to above, when I do start ehshell.exe manually though it does start xbmc but the mce start button does not.

  65. Andrew   •  

    hi, loved the modification but do have one hiccup… My kids XBOX is trying to connect and every time it needs to start windows media centre we end up with XBMC instead. WMC has been renabled and I placed the backup file for the exe in the home folder (underscoring the modified one) restarted but it still kicks off XBMC rather than WMC… anyone any ideas, beyond reinstall…

  66. Jacob   •     Author

    Andrew, there are two ways the launcher could have been installed. If you ran the installer, there is a registry entry “[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ehshell.exe]” with the “Debugger” key entered. Running the uninstaller will remove that. Alternatively, you can go into regedit and remove that key yourself.

    If you installed manually, which it sounds like you did, then restoring the backup EXE should be all you needed to do. But, check the registry key in case you ever ran the installer.

  67. Andrew   •  

    Thanks Ill give this a try. is there an uninstaller in the zip? cant see one if there is..

  68. Jay   •  

    Thank you for this, by far the easiest solution I’ve found so far.

    All, if you want XBMC to open and stay in front without minimizing just add a XBMCLaunchArgs.txt file to your ehome directory containing this command:

    “C:\Windows\ehome\ehshell.exe” -fs

    It’s worked without fail for me

  69. dean   •  

    Thank you so much!!! I finally got everything to work right with my harmony one. You are awesome!!!

  70. Eran Goldin   •  

    Just what I needed! Thanks man. Works perfectly, made my life that much better.

  71. kappa7   •  

    Thank you fro this great app. I’ve found only a little problem: when xbmc is running, if I press one more time the green button nothing happens (and this is right), but when I exit from XBMC after about 10 seconds XBMC automatically restart! If I press 2 times the green button when XBMC is running, then XBMC will automatically restart 2 times, ecc…

    There is a solution to avoid this?
    I used the xbmc launcher with the installer.


  72. Jacob Ras   •  

    Great work, Jacob 🙂

  73. chris   •  

    i’m using xp mce 2005 with all the latest updates. not matter what i do, the original ehshell keeps coming back. i don;t see permissions on the file, i am administrator, and i don’t have a dllcache folder. looked at notepad2 instructions and those files don’t exist either.
    any ideas?

  74. Tom   •  

    I’ve done this but would like to start up Windows 7 Media Center sometimes. Is this still possible as I can’t work out how to do it?

  75. Andrew   •  

    Hi again, well did away with all WMC and it entailed. Got XMBC running fin with library artwork etc but re-installed your exe and nothing happens. Green button start on remote launches start me nu… The exe inside the launcher folder inside programs does launch an XBMC when clicked… but Start button no longer does.

    Any help appreciated

  76. andrew   •  

    Scratch the above… complete plank, did manual install works a treat.
    Out of Curiosity what skins are people using on XBMC?

  77. suitheist   •  

    This works well to launch xbmc with one press, nut when i try to bring the window back to the front by pressing the windows button again it corrupts xbmc and causes the different sections to move out of position on screen.

  78. Richard   •  

    Hey this works perfect for me, although i did have to add one step. I needed to download the little app at which allowed me to take ownership of the ehome folder, which allowed me to change the permissions so I could replace eshell.exe
    I’m using Vista 64
    Did manual install
    Thank you for an excellent little application!

  79. T800   •  

    If want to add a 5 second start up delay to XBMC “-d 5”. How do I get this to work with it?
    Do I use a XBMCLaunchArgs.txt? If so what do i put in it?

  80. T800   •  

    I added a XBMCLaunchArgs.txt in C:\Windows\ehome with just “-d 5” in it and it didn’t work.

  81. T800   •  

    Sussed it. You don’t add anything the the XBMC.exe. You only add the -d switch to the XBMCLaunchArgs.txt.

  82. Holf   •  

    This is a fantastic solution. Thanks very much for putting it together. I thought I’d have to do some extra config work afterwards but all I did was run the installer and from that point onwards my ‘Green’ button starts XBMC!
    I did leave the default ‘Portable’ option in the installer ticked, and this caused me trouble. But I simply removed all text from the ‘XBMCLaunchArgs.txt’ file in the program folder after installation, and then everything was fine.

  83. XBMC'er   •  

    This works great, so excuse me for asking, but how can I get to run Windows media Center 7 now? (Or how can I revert back\uninstall the XBMC Launcher?)


  84. Anthony   •  

    I can’t seem to get it to work, installed twice now, and restarted, nothing.

    Vista 64 Home Pre

  85. CJ   •  

    Works flawlessly with the installer. Thanks so much for this, I was quite tired of hitting that button by accident and having to struggle to shut down that bloated program.

  86. Jase   •  

    Is it a requirement that Windows Media Center is installed in Windows 7? Mine isn’t installed and while the XBMCLauncher.exe does launch XBMC, using the green button doesn’t.


  87. Jones   •  

    Hi There,

    Thanks a million… I struggled a couple of days to find an easy solution to have XBMC launched through the ‘green’ button of my remote and there it is !!

    Although I needed to perform a workaround on it… when I pressed the green button it launched Wmplayer and not the Media Center, don’t know why because Windows Media Player is installed on my Windows 7. So, instead of replacing the ehshell.exe under Windows\ehome I placed your ehshell.exe in Windows\Program Files\Windows Media Player\ and renamed it to wmplayer.exe and it works like a charm !!

    Thanks again… great stuff !

  88. Stick   •  

    Thanks for this program, it’s great. I use it to run XBMC on my HDTV that is connected to my PC’s second GPU output. The only problem I have is that if the TV is not my current monitor, i need it to switch to that monitor with the command:

    “C:\Windows\System32\Displayswith.exe /external”

    Is there any way I can get this command to run before your launcher loads XBMC?


  89. Jacob   •     Author

    You’d have to add that command to the source code and recompile the launcher to have it run before.

  90. Assmonkey   •  

    For some reason it doesn’t work very well on my Win 7 SP1 Ultimate with XBMC.

    When I click the Green button, it launches but not in portable mode even though -p is in the args-file. 🙁

  91. Alexandre   •  

    Thanks for the program, worked fine here and saved me some time 🙂

  92. Mike   •  

    Great tweak, worked perfectly with win 7 and my brando usb wifi keyboard. Thanks

  93. Pingback: Kurze Frage zur FB, XBMC und Eventghost

  94. Morgan   •  

    you rule. thanks for the app!

  95. Ryan   •  

    I’ve just edited the source to launch for Plex as well. Having never used Visual Studio in any form it was pretty easy. You just edit the references to XBMC to Plex (or Plex.exe).

  96. Robin   •  

    Also especially useful for those of us using driver-less keyboards (just generic HID) who can’t change media keys. Thanks so much for this!

  97. Pean   •  

    great tool….thanks a lot from switzerland

    works perfect with windows 7 ultimate and zotac zbox

  98. Rich   •  

    Does just what I was after – (although bringing to foreground does seem to work?)

    Download>Install>Works! (Windows 7 x64, XBMC 11.0 Eden)


  99. Jeroen Hof   •  

    Thanks! Jacob,you are my hero!

  100. Avery   •  


    Thanks for writing this app. It gets me closer to finishing my XBMC setup. I do have an issue and I don’t know if you have a solution. I install XBMC Launcher and it works fine when I activate it directly from Windows (i.e. double-click it). I noticed, though, that when I use my Logitech Harmony (which is mapped to an Ortek VRC-1100), pressing the ‘green button’ will launch XBMC the first time. But each subsequent time there is something like a 20 second delay between hitting the button and launching XBMC.

    I uninstalled XBMC Launcher to see if it was an issue with the remote. Without XBMC Launcher, the ‘green button’ works as expected: it launches Windows MC without any delay. But once I install it, it works as described.

    Since I know it’s not the actual executable causing the delay (because I can double click it and XBMC launches immediately). I also tried installing by hand and double clicking the cloned ehshell also works as expected; no delay.

    I suspect it has something to do with the way the key press is getting intercepted; is Vista trying to do other stuff with besides just launching ehshell?

  101. Rob   •  

    Thanks Sir! This is an awesome little tool!

  102. paolo   •  

    i have the same 20 sec delay. win7 64 and mce remote (ms-tech case bundle remote)

  103. Jacob   •     Author

    Have you guys experiencing the delay tried the manual install steps? I’m curious if that would behave any differently.

  104. paolo   •  

    i must say i just click “ok” on installation and now i realize that doing so i probably installed for both xbmc and xbmc portable mode? How to completely uninstall this in order to try manual installation?

  105. paolo   •  

    unistalled and reinstalled without xbmc portable and same 20sec delay. If i press start many times, it continue starting it every 20 seconds, now i try uninstall and manual install

  106. paolo   •  

    done, same delay

  107. George   •  

    Hi, it’s so cool!
    However, my XBMC is installed in D:\XBMC
    How can I modify the path of this tool?

    Thank you.

  108. Ryan   •  

    Just noticed this tool doesn’t seem to work on Windows 8 Release Preview (x64). Wouldn’t have anything to do with the lack of Media Center in this? no ehome folder…

  109. Jacob   •     Author

    I haven’t tried using a media remote with Windows 8 yet, so I don’t know the behavior. I’ll see if I can check it out soon.

  110. Sac   •  

    where is the uninstaller located at? It seems that the xbox relies on the eshell.exe to use as an extender (at least upon setting up). Need to get this removed at least for now so I can get the extender working.

  111. Jacob   •     Author

    Add/remove programs

  112. picaresqu3   •  

    Anyone have this working in WHS2011? My eHome remote is definitely working, but I don’t see an eshell.exe anywhere.

  113. Dayus   •  

    Thanks buddy!!

    I modified your source code to make it work with Plex media center!

    nice job!

  114. Jacques   •  


    Could you possibly share the Plex version that you created please, would be greatly appreciated 🙂

    Great job to original coder and you for making it work with Plex!!!

  115. Mike   •  

    I just used the installer last night, and when I used my Harmony to “Watch TV” (which turns the TV on and opens MCE traditionally), I still had MCE open up. Are there extra steps that need to be done when using the installer, as there are with the manual install?

  116. justinb   •  

    nice is their a way to do both with the button? the reason I am asking is because wmc is great for live tv and recording and i use both. is their a way to launch xbmc with the button then if xbmc is running close it or minimize and launch wmc, and if wmc is in front close or minimize and launch xbmc?

  117. Morten Pauch   •  

    Nope – no luck with Windows 8. Too bad – I’ll Hope you will update this cool tweak-app.

  118. Kieran Martin   •  

    Couldn’t be simpler and works like a charm, thanks.

  119. Joseph   •  

    Has it working on Win8 release preview but after the upgrade to windows 8 pro, this stopped working. Hoping for an update soon.

  120. Stephen   •  

    Thank you! I was getting fed up with not being able to launch XBMC with my remote! Now I can! And it’s such a small program! 6k install!

  121. ashzero   •  

    worked perfect, now my 3 year old will finally stop opening up wmc all the time.

  122. John   •  

    Yes…. thank you so much for this… this really works!

  123. somebum   •  

    Is i posible to make it launch xbmc from within andriod on a Rikomagic IIIS

  124. Jackie78   •  


    please note that portable mode did not work until I copied the xbmcargs.txt file to c:\windows\ehome, because the application searches for this file in this working directory, it will not find it in the default directory c:\program files (x86) where the installer puts it, at least unter Win7 x64. I hope this can be fixed some time by searching in the right directory.

  125. Pingback: MCE Launcher – Configure which programs are launched when MCE buttons are pressed | Programs & Programming

  126. Paolo   •  

    Really appreciate what you did here and you never asked anything in return.

    I think you should hear it more often…”Thank you J” :o)

  127. Pingback: [Sammelthread] XBMC - open source Mediacenter - Seite 166

  128. backwards1   •  

    The program worked great for xbmc. Only problem is I too like to run WMC for LiveTV and such. My MOVIES folder started to have issues playing BD or DVD and after trying XBMC tonight I was thrilled to see I can now play my huge movie collection through it. I searched for a way to launch the app from remote but the program you made worked too well. Im not ready to jump fully over to the XBMC , anyway to make a different command other than the green button launch XBMC? I would like the option of using both while leave my WMC alone. Ideas? Would be happy to paypal you a tip for a working solution. Thanks.

  129. Amir   •  

    Great utility. found it very useful.

    Kind regards,

  130. Chris   •  

    Just bumping these comments, i recently upgraded my win 7 to 8.1 to make better use of my touch screen but lost WMC. I have since put 7 onto my media server to use WMC on my xbox again but am looking at xbmc on my desktop, the problem is your program doesnt work on win 8/8.1. Any word on an update for win 8 especially now that it doesnt come with WMC free, so could mean alot more people coming looking for a solution such as yours.

  131. Sven   •  

    Excellent work – thanks a lot!

  132. Santiago   •  

    Hello there, thanks to your program finally my green button choose my XBMC, I have a zotac xbox nano, and in this remote control there are a red, green, yellow and blue buttons, I would like to use the red button to perform the TAB button mean going to full-screen mode, is this possible to do it?

    Thank you very much for your reply

  133. Ike   •  

    I followed your very clear instructions and now my Rosewill RHRC-11002 MCE Remote launches XBMC. Kudos on a nice job and thank you for sharing!

  134. Gato Guga   •  

    Thanks for the great work. I always used it in xbmc 13 and works perfect.
    Now with 14 kodi is no longer functional.
    You could adapt?

  135. walter   •  

    XBMC changed name to Kodi. Can you make the corrections, please?

  136. Jacob   •     Author

    As of now, with the Kodi alpha 3 installer, it’s still putting “Kodi” in the same folder labeled “XBMC”. I imagine this will change toward the end of release. I’m going to wait for Kodi development to get a little further along and then I will update this post with a “Kodi” version of the launcher.

  137. Rob Fiorendino   •  

    Awesome work! Thanks!

  138. michael   •  

    Kodi is now well under development and they’ve just released the first beta so I wondered if there’s any news on your launcher now being compatable with Kodi?

    Really miss not being able to press the media buton and not have Kodi launch….


  139. Tamiroquai   •  


    I happened to use the installer w/o backing up the orig ehshell.exe
    for some reason, I couldn’t figure where the installer saves the old version (if at all).
    I also see the ehshell mod date is pretty old, so the installer doesn’t change it???
    I have to use my good and old Windows Media Center, please help

  140. Tamiroquai   •  

    Hi Again, I found a way to restore the media center, apparently the installer doesn’t do what the manual instruction does, is it? as I see that the ehshell.exe was not changed.
    My only issue now is that MCE green button no longer invokes WMC, any idea how to set it back?
    Appreciate your comment,

  141. nero355   •  

    Just installed Kodi and found out that the best XBMC launcher in the world isn’t working anymore because of the name change to Kodi.

    I really love your “Kodi launcher” so I hope you will update it soon 🙂

    Many, MANY Thanks in advance !!
    I still don’t understand why the developers of XBMC/Kodi haven’t developed any kind of solution for this…

  142. Eddie   •  

    Any update on the Kodi version of this? Kodi has been released and is in it’s own new Kodi folder. Thanks

  143. Jesse   •  

    Hey, I have used this before and it works great! but since XBMC changed its name to Kodi, is it possible you could add an update for it?


  144. Jan   •  

    So first of all thanks a lot for your good efforts and work shared with us, I guess many really appreaciate it!

    I’ve been looking for a way to start Kodi (since it fully replaced XBMC) with my remote. Obviously your file only works properly for XBMC. So when I run it, the only thing that happens is that the green button is turned off, so no more Windows MCE. Is there a way to get Kodi into your file instead of XBMC?

    I’m running Win 7 Home premium 64bit.

    Would appreciate your help.

  145. David   •  

    Having now updated my XBMC with KODI. All icons, screens now say KODI. The green button now loads Windows Media Player. Is it my computer, or can I try an updated launcher?

  146. David   •  

    Hi, the XBMC launcher worked great. Is there one for Kodi ?
    Thank you

  147. Simon   •  


    I love this thing, has made the process of starting XBMC very clean.

    However, now that XBMC has changed to Kodi, I think you should release a new one with those paths.

    The beauty of you posting the actual code means I can update mine myself… but others would probably love a nicely bundled package 🙂

  148. Simon   •  

    Bugger… that did not work.

    I’ve never compiled a C# program before, but I altered the Program.cs to read:
    using System;
    using System.Diagnostics;
    using System.IO;
    using System.Runtime.InteropServices;
    using Microsoft.Win32;

    namespace XbmcLauncher
    static class Program
    private static extern bool SetForegroundWindow(IntPtr hWnd);

    private static extern bool ShowWindow(IntPtr hWnd, int cmdShow);

    private const int SW_SHOWMAXIMIZED = 3;

    /// The main entry point for the application.
    static void Main()
    // Attempt to bring an existing Kodi to the foreground.
    // If none exists, open Kodi.

    private static bool BringProcessToForeground()
    Process[] processes = Process.GetProcessesByName(“Kodi”);
    if (processes.Length != 0)
    // If Kodi is currently running, bring it to the foreground
    IntPtr hWnd = processes[0].MainWindowHandle;
    ShowWindow(hWnd, SW_SHOWMAXIMIZED);
    return true;
    return false;

    private static void OpenKodi()
    string kodiPath = null;

    // Attempt to find the Kodi executable location via the registry
    RegistryKey key = Registry.CurrentUser.OpenSubKey(@”Software\Kodi”);

    if (key != null) // If the path is in the registry use it to open Kodi
    kodiPath = key.GetValue(“”) as string;
    if (LaunchKodiProcess(kodiPath + @”\Kodi.exe”))
    else // Otherwise, we’ll try to use the default locations
    string x86Path = @”C:\Program Files\Kodi\Kodi.exe”;
    string x64Path = @”C:\Program Files (x86)\Kodi\Kodi.exe”;

    if (LaunchKodiProcess(x86Path))

    private static bool LaunchKodiProcess(string path)
    if (path != null && File.Exists(path))
    string args = “”;
    Process proc = new Process();

    using (StreamReader argStream = File.OpenText(“KodiLaunchArgs.txt”))
    args = argStream.ReadLine();

    proc.StartInfo = new ProcessStartInfo(path, args);
    return true;
    return false;

    And built it using MSBuild XbmcLauncher.sln

    This gave me a ehshell.exe file in the XbmcLauncher\bin\Debug folder. But if I put this in place of the ehshell.exe file, or even just run it manually… it does nothing 🙁

    Not sure what I’ve missed here!

  149. anonymouse   •  

    It seems that with version 14 the name has only superficially changed from XBMC to Kodi, so the exe and folder can be renamed. At least it works in portable mode with a subfolder portable_data rather than user folder -although you could try renaming that or just move it and use portable mode instead.

    Portable shortcut Target
    “C:\Program Files (x86)\XBMC\XBMC.exe” -p

  150. StJohnny22   •  

    any progress on getting the changes made for kodi?
    14.1 is the latest stable release as of now.

    i really miss my launcher. 🙁

    Thank you for all the hard work!

  151. David   •  

    Hi there.

    Does this get a Kodi update? Seems better than the other offerings. Please look into!

  152. blouz   •  


    Would be great if you could update your launcher to work with kodi (as the directory and executable changed from xbmc to kodi)

    Thanks !

  153. blouz   •  

    Only your way to deal with xbmc was working with me as my remote controller does not seem to be ehome compliant (zotac).

    So I changed the script directly and it now works like a charm.
    A compiled version of ehshell.exe is available there:

    And here are is source:

    using System;
    using System.Diagnostics;
    using System.IO;
    using System.Runtime.InteropServices;
    using Microsoft.Win32;

    namespace KodiLauncher
    static class Program
    private static extern bool SetForegroundWindow(IntPtr hWnd);

    private static extern bool ShowWindow(IntPtr hWnd, int cmdShow);

    private const int SW_SHOWMAXIMIZED = 3;

    /// The main entry point for the application.
    static void Main()
    // Attempt to bring an existing Kodi to the foreground.
    // If none exists, open Kodi.
    if (!BringProcessToForeground())

    private static bool BringProcessToForeground()
    Process[] processes = Process.GetProcessesByName(“Kodi”);
    if (processes.Length != 0)
    // If Kodi is currently running, bring it to the foreground
    IntPtr hWnd = processes[0].MainWindowHandle;
    ShowWindow(hWnd, SW_SHOWMAXIMIZED);
    return true;
    return false;

    private static void OpenKodi()
    string kodiPath = null;

    // Attempt to find the KODI executable location via the registry
    RegistryKey key = Registry.CurrentUser.OpenSubKey(@”Software\Kodi”);

    if (key != null) // If the path is in the registry use it to open Kodi
    kodiPath = key.GetValue(“”) as string;
    if (LaunchKodiProcess(kodiPath + @”\Kodi.exe”))
    else // Otherwise, we’ll try to use the default locations
    string x86Path = @”C:\Program Files\Kodi\Kodi.exe”;
    string x64Path = @”C:\Program Files (x86)\Kodi\Kodi.exe”;

    if (LaunchKodiProcess(x86Path))

    private static bool LaunchKodiProcess(string path)
    if (path != null && File.Exists(path))
    string args = “”;
    Process proc = new Process();

    if (File.Exists(“KodiLaunchArgs.txt”))
    using (StreamReader argStream = File.OpenText(“KodiLaunchArgs.txt”))
    args = argStream.ReadLine();

    proc.StartInfo = new ProcessStartInfo(path, args);
    return true;
    return false;

  154. night   •  

    What about Kodi? Can you do it for Kodi?

  155. aPriest   •  

    Hi, just wondering if you’ve managed to make the changes for Kodi now. Would really love to use this.

  156. Sam   •  

    OK, so here it is fixed for Kodi. This doesn’t work on Windows 8 and up, sorry. The code was relatively simple to fix for Windows 7, but Windows 8 and 8.1 don’t have to same Windows folders and “ehshell” files at all so not sure what to do about that.


    Credit to /r/JamesWjRose for working on this.

Leave a Reply

Your email address will not be published. Required fields are marked *