Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Would like to check for a running process then kill it...

If you have a question or need help, this is the place to be.
Post Reply
setherd
Posts: 3
Joined: Wed Aug 06, 2008 9:06 pm

Would like to check for a running process then kill it...

Post by setherd »

I'm currently running Vista home premium SP1 64bit and event ghost 0.3.6.1449

I use sagetv and want to stop the vista media center programs that take over the MCE remote from running.
I need to kill ehtray.exe (main one) and also ehmsas.exe

I have event ghost running taskill.exe with the parameters "/F /IM ehtray.exe /IM ehmsas.exe /T"
that works but I would like to some how periodically check to see if ehtray.exe is running and if it is run my command again.

if anyone could point me in the right direction to check I would greatly appreciate it.

take care,
Seth
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Would like to check for a running process then kill it...

Post by jinxdone »

Wouldn't it be much neater to disable the media center related windows service(s) and stop it from running at all in the first place?

Anyway, you should take a look at the eventghost's 'find task' action (or similiar, can't remember the exact name). With that action you can for example run a macro only if the process in question was found running. Combined with a triggering action that is scheduled I suppose it'd do what you are looking for.
setherd
Posts: 3
Joined: Wed Aug 06, 2008 9:06 pm

Re: Would like to check for a running process then kill it...

Post by setherd »

jinxdone wrote:Wouldn't it be much neater to disable the media center related windows service(s) and stop it from running at all in the first place?

Anyway, you should take a look at the eventghost's 'find task' action (or similiar, can't remember the exact name). With that action you can for example run a macro only if the process in question was found running. Combined with a triggering action that is scheduled I suppose it'd do what you are looking for.
I have the media center services disabled, but stupid vista keeps starting the IR receiver program. I have tried many ways to stop it from starting. it actually pisses me off that I can't control what programs run on my PC.
I have read that if I had the ultimate version or any of the business versions I could use the group policy editor to do this but the home version lack it.

thanks, i'll check out the find task feature :)
setherd
Posts: 3
Joined: Wed Aug 06, 2008 9:06 pm

Re: Would like to check for a running process then kill it...

Post by setherd »

OK I have searched high and low would this be related to the task create/switch plugin?
if so do I neeed to write a macro in python (i don't know any python)
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Would like to check for a running process then kill it...

Post by jinxdone »

I just checked and the action I was referring to is in Window -> "Find a window".

Anyway, since what you are trying to do is archieved by group policy, and the group policies usually just set a registry key, if you know what to change you can usually do the same thing with regedit.

Here's some instructions how to disable the media center service.
http://www.mydigitallife.info/2008/02/2 ... -in-vista/

Microsoft's reference of server 2008/vista group policy registry settings.
http://www.microsoft.com/downloads/deta ... ayLang=en"
Post Reply