running Eventghost as standard user??

If you have a question or need help, this is the place to be.

running Eventghost as standard user??

Postby MacUsers » Sat Jul 18, 2009 10:17 pm

Hi there,
This is my first post; I did search a bit but didn't the answer I'm looking for. So apologize if it's already asked.
As said in the title, is it possible to run EventGhost as normal users? I'm using EventGhost (on Windows 7, Build 7100) for XBMC and XBMC runs as a normal user, hence can't use the remote control. Can anyone please help? Cheers!!!
MacUsers
 
Posts: 8
Joined: Sat Jul 18, 2009 9:40 pm

Re: running Eventghost as standard user??

Postby stottle » Sun Jul 19, 2009 5:42 am

Are you asking about an MCE remote, or something else?

I don't understand what "XBMC runs as a normal user, hence can't use the remote control" means.

For MCE remotes, there's a known issue where UAC prevents the MceIr dll from running unless it is turned off. That's a problem with the MceIr device driver, not EG. XBMC can work with the remote, as it doesn't need to access the raw ir codes, so it doesn't need the different driver.

Other than that, I'm not aware of any problems running EG on Win7, unless you are a developer and want to change the files.

Brett
stottle
Plugin Developer
 
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: running Eventghost as standard user??

Postby MacUsers » Sun Jul 19, 2009 7:06 am

Hi stottle,
Thanks for your replay and sorry for not being very clear.
Yes, I'm talking about MCE remote. As a start, XBMC runs as a normal user i.e. a non-admin account. I see, I need to start EG prior to run XBMC (correct me if I'm wrong) for the the remote to work with. So, I start EG at windows start up and launch XBMC from EG (using Autostart); this way EG is already running when XBMC opens. My observation is: the "button press" is captured (by EG) if only run as administrator. As the non-admin user starts up EG (then XBMC), remote doesn't work with XBMC. That's my problem. Am I clear now?

Can you pls try running EG as a standard user and then pressing any button on the remote control to test if you see any thing in the left hand side log? Cheers!!!

PS. UAC already disabled here. I'm not really a Windows user, so forgive me if I say anything stupid.
MacUsers
 
Posts: 8
Joined: Sat Jul 18, 2009 9:40 pm

Re: running Eventghost as standard user??

Postby stottle » Sun Jul 19, 2009 1:22 pm

The MCE Remote is kind of made of two parts. The first part is the device itself, which receives ir codes from the remote. The second part is the Windows OS, which decodes the ir codes and sends keypresses to the active window. That's the way it works without EG being involved, and I imagine (although I haven't tested it) those keypresses work fine in XBMC.

EG isn't going to read all the keyboard messages as events, that doesn't make sense. It needs the ir codes. So the first thing it does is change the registry (if run as an Admin with UAC off). This only needs to be done once, and once done, the OS no longer runs the second step above. But now EG still needs to attach to the device to get the ir codes. That's were this MceIr.dll comes in, and where the problem is. The device has raised security (my terminology is off, but you get the point). On Vista or Win7, the driver can't connect to the device without UAC off and using an Admin account.

If you've run the EG plugin, you need to re-install the registry keys to have the OS run the 2nd step if you want to use XBMC without EG running (which you can do from the MCE plugin's configuration). I doubt XBMC needs to run as Admin, I think its more likely the registry keys have been removed.

Make more sense?

Brett
stottle
Plugin Developer
 
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: running Eventghost as standard user??

Postby stottle » Sun Jul 19, 2009 1:26 pm

BTW, I think it might be possible to create a small app that attaches to the Mce device and forwards the ir codes to EG. That way the app could be installed with higher rights and you wouldn't have to worry about having EG run as Admin and turning off UAC. I'm looking into it.

Brett
stottle
Plugin Developer
 
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: running Eventghost as standard user??

Postby Bitmonster » Sun Jul 19, 2009 2:15 pm

stottle wrote:BTW, I think it might be possible to create a small app that attaches to the Mce device and forwards the ir codes to EG. That way the app could be installed with higher rights and you wouldn't have to worry about having EG run as Admin and turning off UAC. I'm looking into it.

Brett

That's right and this is the way MediaPortal's IR Server Suite does workaround the issue. It installs an additional custom system service, which runs with administrator privileges, just to get the raw IR data from the device and forwarding it to their main userspace program. This way only the installer needs to be run once with admin rights.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Bitmonster
Site Admin
 
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: running Eventghost as standard user??

Postby stottle » Sun Jul 19, 2009 2:54 pm

That's right and this is the way MediaPortal's IR Server Suite does workaround the issue.

It looks like I might be able to just forward the raw IR codes to EG from the driver, and just skip the dll's (or executables) decoding routines altogether. I'm looking at a named pipe for the IPC.

Brett
Last edited by stottle on Mon Jul 20, 2009 12:54 am, edited 1 time in total.
stottle
Plugin Developer
 
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: running Eventghost as standard user??

Postby MacUsers » Sun Jul 19, 2009 7:01 pm

stottle wrote:The MCE Remote is kind of made of two parts. The first part is the device itself, which receives ir codes from the remote. The second part is the Windows OS, which decodes the ir codes and sends keypresses to the active window. That's the way it works without EG being involved, and I imagine (although I haven't tested it) those keypresses work fine in XBMC.
With out EG's involvement, only Up, Down, Left, Right, OK and number keys work with XBMC, provided HID is not disable.

stottle wrote:EG isn't going to read all the keyboard messages as events, that doesn't make sense. It needs the ir codes. So the first thing it does is change the registry (if run as an Admin with UAC off). This only needs to be done once, and once done, the OS no longer runs the second step above..
When does this "registry change over" thing takes place - every time EG starts up or when it was installed in the first place? Also, does it also mean - as you said "EG changes the registry" - the remote can't be use, say for example with Windows Media Center once EG is installed without running EG?

stottle wrote:But now EG still needs to attach to the device to get the ir codes. That's were this MceIr.dll comes in, and where the problem is. The device has raised security (my terminology is off, but you get the point).
So, MceIr.dll is doing the thing that was previously done by OS, right? Wondering why it's a problem now and the reason for the device to raise an alarm - am I missing something here?

stottle wrote:On Vista or Win7, the driver can't connect to the device without UAC off and using an Admin account.
I'm kinda lost here: Do you mean on Vista/Win 7 MceIr.dll (if I understood correctly) cannot work for Admin with UAC on? Still trying to understand if I get that properly. Or you talking about the OS?

stottle wrote:If you've run the EG plugin, you need to re-install the registry keys to have the OS run the 2nd step if you want to use XBMC without EG running (which you can do from the MCE plugin's configuration). I doubt XBMC needs to run as Admin, I think its more likely the registry keys have been removed.
I completely new in the XBMC stuff and almost a starter when it comes to the Windows. Can you explain it a bit in detail please? What registry key you are talking about. I just install EG and then added MCE and XBMC plugin from the configure menu - that's all I did.[/quote]

Many thanks, Brett for the detail info. Cheers!!!
MacUsers
 
Posts: 8
Joined: Sat Jul 18, 2009 9:40 pm

Re: running Eventghost as standard user??

Postby stottle » Sun Jul 19, 2009 7:33 pm

The first time you run EG, the MceRemote plugin won't be loaded. The registry isn't touched at this point.

When you add the MceRemote plugin, it isn't configured, so it pops up a configuration display. If you want to reconfigure after the initial setup, you can double click on the plugin to pull the config screen up again. For the MceRemote config screen, there is a checkbox for "Disable HID Server ... (Recommended)". If this box is checked and you hit ok, the OS processing of the IR codes will be turned off by removing the relevant registry keys. That is, if you have Admin rights and UAC is off. Otherwise it fails. If the box is unckecked, the keys will be put back to turn OS processing back on. That gets you back where you started.

As for why this all happens, it certainly is a PITA. Since the OS was installed with Admin privileges (obviously), the OS can use the driver. Any process that tries to attach to the driver without raised privileges will fail. The MceIr.dll, provided with the MceRemote plugin, doesn't have the right privileges unless you are running with Admin rights and UAC is turned off. That's just the way it is, and EG can't do anything about it.

Brett
stottle
Plugin Developer
 
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: running Eventghost as standard user??

Postby MacUsers » Sun Jul 19, 2009 9:28 pm

stottle wrote:As for why this all happens, it certainly is a PITA. Since the OS was installed with Admin privileges (obviously), the OS can use the driver. Any process that tries to attach to the driver without raised privileges will fail. The MceIr.dll, provided with the MceRemote plugin, doesn't have the right privileges unless you are running with Admin rights and UAC is turned off. That's just the way it is, and EG can't do anything about it.
Okay, so is it possible to fix the "right privileges" for MceIr.dll if not running as Admin? In other words, if I need to run EG (which I think I have to) to operate the remote, then there is any way to run XBMC as standard user? Cheers!!!
MacUsers
 
Posts: 8
Joined: Sat Jul 18, 2009 9:40 pm

Re: running Eventghost as standard user??

Postby stottle » Mon Jul 20, 2009 4:47 am

Right now, there's no way to run MceRemote without Admin privileges and UAC turned off.
[edit] Should have said "Right now, the EventGhost MceRemote plugin won't work on Vista/Win7 without Admin privileges and UAC turned off. If UAC is on or the account isn't an Admin account, EG will not receive Mce Remote commands. This applies to Vista MCE Remotes, I'm not sure about XP MCE Remotes, as they use a different driver."[/edit]

Brett
Last edited by stottle on Mon Jul 20, 2009 11:01 am, edited 1 time in total.
stottle
Plugin Developer
 
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: running Eventghost as standard user??

Postby MacUsers » Mon Jul 20, 2009 10:43 am

stottle wrote:Right now, there's no way to run MceRemote without Admin privileges and UAC turned off.
humm.......
Sorry, forgive my ignorance; then how remote works for Windows Media Center using as normal users? Or this limitation is only when EG is running? Cheers!!!
MacUsers
 
Posts: 8
Joined: Sat Jul 18, 2009 9:40 pm

Re: running Eventghost as standard user??

Postby stottle » Mon Jul 20, 2009 11:08 am

I edited my previous post. Let me know if it isn't clear now.

Remember also that when you first run the MceRemote plugin it will by default remove the registry keys so the OS won't translate the codes. Without those registry keys, the OS will no longer process the IR codes, even if EG is not running. So to get the "default" remote behavior (such as starting MCE when the green button is pressed), those registry keys need to be present.

Brett
stottle
Plugin Developer
 
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: running Eventghost as standard user??

Postby MacUsers » Mon Jul 20, 2009 11:58 am

Thanks Brett, it's much clear now. I was guessing that you must be talking about EG MCE plugin but wanted to make sure. Thanks again. Looks like, I have no other way to run XBMC as normal user (other than admin) for remote to be work using EG. Cheers!!!
MacUsers
 
Posts: 8
Joined: Sat Jul 18, 2009 9:40 pm

Re: running Eventghost as standard user??

Postby stottle » Tue Aug 04, 2009 1:30 pm

I've created a windows service to connect to the MCE driver. Once installed, it can pass IR events to EG without EG needing to run with elevated privileges.

You can get it here. Be the first on the block to try it out!

Brett
stottle
Plugin Developer
 
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm


Return to General Support

Who is online

Users browsing this forum: Bing [Bot], Google Adsense [Bot] and 5 guests