Can't run two instances of eventghost in two user accounts

Found a bug in EventGhost? Report it here.

Can't run two instances of eventghost in two user accounts

Postby zeflash » Tue Jan 13, 2009 9:08 pm

I already posted a msg in the general support forum, but maybe it's better to do it here to get an answer.

I have a laptop that I share with my wife. We each have a separate user account, and both are logged in at the same time most of the time.
I'd like to have eventghost running for her and for me, but something is wrong and it's not working.
When EG is started in one account, it doesn't start anymore in the other one. A second process for the current user gets created, but doesn't do anything, no UI, nothing.

IT would be great if the app could be run independently in each accounts; right now I have to juggle between accounts to first close EG in the other one to start it in the current one. Not ideal ;)
zeflash
 
Posts: 39
Joined: Thu Jul 12, 2007 2:55 pm

Re: Can't run two instances of eventghost in two user accounts

Postby zeflash » Thu Jan 22, 2009 5:12 pm

Nothing to say about this? I'm surprised!
zeflash
 
Posts: 39
Joined: Thu Jul 12, 2007 2:55 pm

Re: Can't run two instances of eventghost in two user accounts

Postby CollinR » Thu Jan 22, 2009 7:15 pm

What functions are you wanting EventGhost to perform?
Windows XP Pro sp3 - Several Machines usually latest beta but who knows.
Inputs: TCP / IR (USBUIRT) / RF(X10 Remote) / CLI-Batch / CCTV Motion / Ocelot
Outputs: TCP / IR (USBUIRT) / SageTV / SageTV Clients / YAC CallerID / HAL v3.7.3 / Ocelot
CollinR
Experienced User
 
Posts: 265
Joined: Tue Sep 05, 2006 7:16 am
Location: Oklahoma

Re: Can't run two instances of eventghost in two user accounts

Postby zeflash » Thu Jan 22, 2009 7:44 pm

I thought is was pretty clear from the first post;
I would like to have eventghost running properly in both accounts at the same time. Right now it's not the case, when it runs in one account it prevents the other one to start it
zeflash
 
Posts: 39
Joined: Thu Jul 12, 2007 2:55 pm

Re: Can't run two instances of eventghost in two user accounts

Postby Bartman » Thu Jan 22, 2009 9:36 pm

I have such a setup running on another machine and I did not encounter any problems. It is a rather old version though..
Bartman
Plugin Developer
 
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: Can't run two instances of eventghost in two user accounts

Postby zeflash » Mon Jan 26, 2009 3:31 pm

Interesting. In my case, my account has admin rights, my wife's doesn't. When I installed it in my wife's account I think it asked me an admin authorization, not really sure.

I'll try to reinstall everything again see if it makes things work better.
zeflash
 
Posts: 39
Joined: Thu Jul 12, 2007 2:55 pm

Re: Can't run two instances of eventghost in two user accounts

Postby Bartman » Wed Jan 28, 2009 9:56 pm

Why did you install it in a second account? The setup on virtually all applications does require admin rights, but the software should be installed only once.
Bartman
Plugin Developer
 
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: Can't run two instances of eventghost in two user accounts

Postby zeflash » Fri Jan 30, 2009 1:42 pm

Ok, my mistake. I redid the whole installation after uninstalling everything (and losing the config file I hadn't backed up :( )
Let me be really specific. I'm on vista 32, UAC is on, my account has admin rights, my wife's doesn't.

I installed EG on my account, Setup went fine.
I then ran EG. In process explorer, I noticed it created two processes, both under my account's credential. One is a job (takes about 28MB), the other only takes 4.5MB.
I then switched to my wife's account, EG was now available in all programs. I started it, and nothing showed up.

Running process explorer again, I now see 3 eventghost processes: the previous two I talked about under my account. and a new one under my wife's account, using 4.5MB.

So I kill everything on both accounts, start EG again on my account, I only see one EG process, 28MB, window showing up. Switch to the other account, start EG, nothing's up. Back in my account, close EG normally, and now I see a new process running on my wife's account, 28MB. Switch to my wife's account, and there you now have EG running normally - but telling some errors have been logged; here's the content of the log file:
Code: Select all
Traceback (most recent call last):
  File "EventGhost.pyw", line 34, in <module>
  File "C:\Program Files\EventGhost\eg\__init__.py", line 23, in <module>
    import Cli
  File "C:\Program Files\EventGhost\eg\Cli.py", line 127, in <module>
    e = win32com.client.Dispatch("{7EB106DC-468D-4345-9CFE-B0021039114B}")
  File "win32com\client\__init__.pyc", line 95, in Dispatch
  File "win32com\client\dynamic.pyc", line 98, in _GetGoodDispatchAndUserName
  File "win32com\client\dynamic.pyc", line 78, in _GetGoodDispatch
pywintypes.com_error: (-2146959355, 'Server execution failed', None, None)
Traceback (most recent call last):
  File "EventGhost.pyw", line 34, in <module>
  File "C:\Program Files\EventGhost\eg\__init__.py", line 23, in <module>
    import Cli
  File "C:\Program Files\EventGhost\eg\Cli.py", line 127, in <module>
    e = win32com.client.Dispatch("{7EB106DC-468D-4345-9CFE-B0021039114B}")
  File "win32com\client\__init__.pyc", line 95, in Dispatch
  File "win32com\client\dynamic.pyc", line 98, in _GetGoodDispatchAndUserName
  File "win32com\client\dynamic.pyc", line 78, in _GetGoodDispatch
pywintypes.com_error: (-2146959355, 'Server execution failed', None, None)


And obviously if I now try to run EG in my account, it's not showing up either, just like before but with inverted roles.

It's interesting to see that in your case it works. What's different? are you using vista? do both accounts have admin rights or just one? Which version of EG are you using?
zeflash
 
Posts: 39
Joined: Thu Jul 12, 2007 2:55 pm

Re: Can't run two instances of eventghost in two user accoun

Postby Jazz » Mon Oct 24, 2011 11:48 am

I have got exactly the same bug as zeflash described in his last post. I'am using latest release 0.4.1.r1540. Did someone managed to workaround this issue? Or maybe developers could possibly fix it? This bug is pretty old.
Jazz
 
Posts: 3
Joined: Mon Oct 24, 2011 11:36 am

Re: Can't run two instances of eventghost in two user accoun

Postby eatmeimadanish » Tue Nov 01, 2011 4:40 pm

The issue is running EG in session 0. In Vista (and windows 7) the system likes to run everything in a protected session. When you run as admin, Session 0 is started (console) and is now at the kernel level. This will impact all user accounts. Try running EG normally in both sessions, without elevated permissions, and see if that gets you better results.
eatmeimadanish
Experienced User
 
Posts: 96
Joined: Thu Oct 01, 2009 5:11 pm

Re: Can't run two instances of eventghost in two user accoun

Postby Jazz » Sun Nov 20, 2011 5:04 pm

I do run EG in both session as normal users, without elevated permissions. Running EG in one session as an admin does not change anything. The problem still persist in EventGhost 0.4.1.r1544.
Jazz
 
Posts: 3
Joined: Mon Oct 24, 2011 11:36 am

Re: Can't run two instances of eventghost in two user accoun

Postby eatmeimadanish » Tue Nov 22, 2011 10:25 pm

My point was that running EG as any kind of admin could be your problem. You are more than likely going to need to virtualize the second EG in a windows XP layer (try running in compatibility mode) and see if that works better.
eatmeimadanish
Experienced User
 
Posts: 96
Joined: Thu Oct 01, 2009 5:11 pm

Re: Can't run two instances of eventghost in two user accoun

Postby Jazz » Thu Jan 26, 2012 8:11 am

Finally, I’ve managed to find workaround to this problem. In the Task Scheduler I’ve created two tasks:
1. that launches EventGhost by executing command:
Code: Select all
"C:\Program Files (x86)\EventGhost\EventGhost.exe" -h -e OnInitAfterBoot
at user log on or on connection to user session from local computer,

2. that stops EventGhost by executing command:
Code: Select all
taskkill /im EventGhost.exe /f
on disconnect from user session from local computer (now I’m looking for some more elegant way to end EventGhost).

In both tasks I had to change user account set to be used when running the tasks to group Users (by default it is user used to create the task).

This solution prevents running many instances of EventGhost on many accounts.
Jazz
 
Posts: 3
Joined: Mon Oct 24, 2011 11:36 am

Re: Can't run two instances of eventghost in two user accoun

Postby prorokrak » Sun Mar 18, 2012 5:23 pm

Hi, I had exactly the same problem: Win7 x64, two accounts, one admin, the second one user. If the EventGhost was run in one account, it could not be run in the second one account (no matter if it was admin or user account). The user who logged in to his account as the first was the only one who could use EventGhost - quite weird in these days of multiusers systems.

Your post showed me a way, while I adjusted your solution a bit.
First I use this:
Jazz wrote:2. that stops EventGhost by executing command:
Code: Select all
taskkill /im EventGhost.exe /f

However, I run this command not when disconnecting from user session because I couldn't use EventGhost when an account is locked. I run it on connecting to any session. This required another adjustment:
Jazz wrote:In both tasks I had to change user account set to be used when running the tasks to group Users

Because I need to kill processes running in another session I had to run above mentioned command with admin rights. Therefore, I used credentials of the user with admin rights (although Administrators account should also work).

Basically, my solution looks like this:

On logon/connect to any account I run two tasks:
  1. Code: Select all
    taskkill /im EventGhost.exe /f
    run with admin credentials
  2. Code: Select all
    "C:\Program Files (x86)\EventGhost\EventGhost.exe" -h -e OnInitAfterBoot
    run under "Users" account (this command is run after a short pause needed to give time to the first task to end the processes of EventGhost)

What I like on this solution is that it enables me to share the settings of EventGhost in both accounts.

What I DON'T like on this solution is I have to be very careful not to forget to save any changes made in EventGhost. Otherwise, all my changes would be lost. Therefore, I would prefer if EventGhost could be run in separate accounts just as other programs do.
prorokrak
 
Posts: 1
Joined: Sun Mar 18, 2012 4:45 pm


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests