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.

FORCE quitting an application... (harder than it sounds)

If you have a question or need help, this is the place to be.
Post Reply
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

FORCE quitting an application... (harder than it sounds)

Post by stisev »

I need to run a program called Notebook Hardware Control, then kill it. I've figured out a way to have EG do this on startup (by using Main.init macro in EG).

I can run the program just fine. The problem is CLOSING it. No matter what I do, it just doesn't seem to work.

I've tried:

1) Find window, bring to front, and alt+f4 keystroke or close commands
2) Taskkill XML (see below)

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1262">
    <Action Name="Taskkill NHC.exe">
        System.Execute(u'{eg.folderPath.System}\\taskkill.exe', u'/F /IM nhc.exe', 0, False, 2, u'')
    </Action>
</EventGhost>
Neither of these works. I'the process name is "nhc.exe".

If anyone has any ideas, please share.
Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: FORCE quitting an application... (harder than it sounds)

Post by Bartman »

I guess using the taskkill command does not work at the command line too?
Is the taskkill command issued by a user with admin priviliges?
Does the nhc.exe run under the same user account as the one you are trying to kill it with?
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Re: FORCE quitting an application... (harder than it sounds)

Post by stisev »

Bartman wrote:I guess using the taskkill command does not work at the command line too?
Is the taskkill command issued by a user with admin priviliges?
Does the nhc.exe run under the same user account as the one you are trying to kill it with?

I guess using the taskkill command does not work at the command line too?
>>that's correct. :(


Is the taskkill command issued by a user with admin priviliges?
>>yes


Does the nhc.exe run under the same user account as the one you are trying to kill it with?
>>yess
Post Reply