PDA

View Full Version : Terminate Application Problem



NewsArchive
06-14-2011, 12:45 AM
SB 7.4.3313

I have an application that runs as a service: LogManager.exe

Runs under username .\PDManager & a password.

For some reason, Terminate Application will not "terminate" this
application.

Returning error code 603 "Process was not currently running"

The process IS running.

This has been an issue on Windows XP 32bit and Windows 7 64bit.

Why would SB not detect that the process is running?

BTW, seems it has something to do with trying to terminate the process while
it runs as a service. Seems to terminate fine if it's running as a normal
EXE.

Thanks!!

Don

NewsArchive
06-14-2011, 12:46 AM
In addition, I'm aware of the "Edit Service" script. Problem is this app
can be "unresponsive" while it is processing log files. Quite a bit of time
can pass by the time it stops processing log files. The installer does not
and should not have to wait that long. I want to kill that process
regardless of whether it is running as a service or a normal EXE. I know
that's dangerous but until a certain 3rd party product is changed I have no
other choice right now.

Thanks,
Don

NewsArchive
06-14-2011, 12:46 AM
Stopping a process is done with a call to TerminateProcess. It is not
possible to kill a process that is running under a security context
different than the one of the process who issued the call to
TerminateProcess.

To end a "service process" with TerminateProcess, you have to enable the
debug privilege (in the Group Policies) that is assigned to Administrators
and is disabled in the access token by default.

BTW, this is not a bug or limitation in SetupBuilder. That is how Windows
is designed!

HTH,
Friedrich

NewsArchive
06-14-2011, 12:46 AM
Don,

Well, you are confusing processes running as an app and services.
Completely different animals! The Services Windows APIs have to be used to
stop your service -- so you have to use the "Edit Service..." script
function to stop it.

Hope this helps.

Friedrich

NewsArchive
06-14-2011, 02:06 AM
Hi Donald,

Have you tried KillProcess on Steve Parker's site?

Sim

NewsArchive
06-15-2011, 01:38 AM
Oh no, I knew it wasn't SB! SB is da bomb diggity!!

You answered my question. I knew it had to have something to do with the
app being a service.

Thanks!!

Don

NewsArchive
06-15-2011, 01:38 AM
> Oh no, I knew it wasn't SB! SB is da bomb diggity!!
>
> You answered my question. I knew it had to have something to do with the
> app being a service.

:-)

Friedrich