Launching XBMC with a Windows Media Center Remote

XBMC

XBMC

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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.Win32;

namespace XbmcLauncher
{
    static class Program
    {
        [DllImport("user32.dll")]
        private static extern bool SetForegroundWindow(IntPtr hWnd);

        [DllImport("user32.dll")]
        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.
            if(!BringProcessToForeground())
                OpenXbmc();              
        }

        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);
                SetForegroundWindow(hWnd);
                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"))
                    return;
            }
            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))
                    return;
                else
                    LaunchXbmcProcess(x64Path);
            }          
        }

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

                if(File.Exists("XBMCLaunchArgs.txt"))
                {
                    using (StreamReader argStream = File.OpenText("XBMCLaunchArgs.txt"))
                    {
                        args = argStream.ReadLine();
                        argStream.Close();
                    }
                }
                       
                proc.StartInfo = new ProcessStartInfo(path, args);
                proc.Start();
                BringProcessToForeground();
                return true;
            }
            return false;
        }
    }
}

Get the full source, project files, and install scripts at http://inchoatethoughts.com/xbmclauncher/ (subversion)

  138 comments

  1. Tery   •  

    Hi,
    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 ?

    Thanx.

    TerY.

  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   •  

    Hi

    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   •  

    Hey,

    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   •  

    Hello,

    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: http://blogs.msdn.com/b/omars/archive/2004/04/30/124093.aspx – 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.
    Thanks

  28. Derek   •  

    Hi,

    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:

    http://www.bilalsheikh.co.uk/windows/anyproglauncher.zip

    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   •  

    Heya,

    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]
    “Debugger”=”C:\\tools\\XbmcLauncher\\XbmcLauncher.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.

    Joshka

  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.

    thx

  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 http://adhocinnovations.com/downloads.php?cat=16

  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.

    Thanks
    Kappa7

  72. 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?

  73. 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?

  74. 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

  75. andrew   •  

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

  76. 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.

  77. Richard   •  

    Hey this works perfect for me, although i did have to add one step. I needed to download the little app at http://www.vistax64.com/tutorials/112795-context-menu-take-ownership.html 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!

  78. 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?

  79. T800   •  

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

  80. T800   •  

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

  81. 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.
    Awesome!

  82. 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?)

    Thanks!

  83. Anthony   •  

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

    Vista 64 Home Pre

  84. 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.

  85. 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.

    Thanks!

  86. 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 !

  87. 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?

    Thanks.

  88. Jacob   •     Author

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

  89. 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. :(

  90. Alexandre   •  

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

  91. Mike   •  

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

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

  93. Morgan   •  

    you rule. thanks for the app!

  94. 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).

  95. 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!

  96. Pean   •  

    great tool….thanks a lot from switzerland

    works perfect with windows 7 ultimate and zotac zbox

  97. Rich   •  

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

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

    THANK YOU !

  98. Jeroen Hof   •  

    Thanks! Jacob,you are my hero!

  99. Avery   •  

    Jacob,

    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?

  100. Rob   •  

    Thanks Sir! This is an awesome little tool!

  101. paolo   •  

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

  102. Jacob   •     Author

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

  103. 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?

  104. 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

  105. paolo   •  

    done, same delay

  106. 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.

  107. 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…

  108. 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.

  109. 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.

  110. Jacob   •     Author

    Add/remove programs

  111. picaresqu3   •  

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

  112. Dayus   •  

    Thanks buddy!!

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

    nice job!

  113. Jacques   •  

    @Dayus,

    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!!!

  114. 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?

  115. 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?

  116. Morten Pauch   •  

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

  117. Kieran Martin   •  

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

  118. Joseph   •  

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

  119. 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!

  120. ashzero   •  

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

  121. John   •  

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

  122. somebum   •  

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

  123. Jackie78   •  

    Hi,

    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.

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

  125. 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)

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

  127. 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.

  128. Amir   •  

    Great utility. found it very useful.

    Kind regards,
    Amir

  129. 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.

  130. Sven   •  

    Excellent work – thanks a lot!

  131. 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

  132. 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!

  133. 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?

  134. walter   •  

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

  135. 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.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>