PDA

View Full Version : How do I running process using process Id or process name and kill it



testuser
09-28-2020, 07:42 AM
Hello,

In our product we do have one requirement in validation phase to find a process using process id or process name(sometimes we need to use id and sometime name) and then kill it, I tried Detect Active Application but it was returning 603 always, can you please help us?


Other question:
I have attached simple project to check if IE is running or not, i tried with other apps as well it is always returns 603, am I doing wrong somewhere?

5013


Thanks in advance!!

Excuse me for the typing mistakes.

linder
09-28-2020, 12:09 PM
Hello,

I have created a simple demo project. It detects if SB10.EXE (the SetupBuilder IDE) is active. Please compile:

https://www.setupbuilder.com/projects/is_sb10_active.zip

Does this help?

Friedrich

linder
09-28-2020, 12:21 PM
See attached screenshot. I have compiled your original .sbp file. It reports that IE is running (in a LOOP until I end IE).

Friedrich

testuser
09-28-2020, 11:30 PM
Hello,

I can see that on your machine the project for IE is running properly, but on my machine it always returns 603. I tried your project to check sb10.exe is running or not, even that is always saying sb10.exe is not running. please find attachment. is there something I am doing wrong? is there something related to OS(I am having win10)?

5015

Thanks

linder
09-29-2020, 02:34 AM
Hello,

to be honest, I have no idea. The return value comes directly from Windows. There is absolutely nothing we can do here (or even try to fix it) because it is native Windows functionality. What kind of Windows version is this? Windows 10 #2004?

I have uploaded a modified test app. What does it return on your machine?

https://www.setupbuilder.com/projects/is_sb10_active2.zip

Friedrich

testuser
09-29-2020, 03:56 AM
Hello,

Tried your given exe it returns 603, please see attachment. which windows native functionality is used by Detect application, so that ill try to find about that why this is happening on my machine.

5016
5017

Thanks

linder
09-29-2020, 09:42 AM
Fixed one minute ago. I had access to a machine via TeamViewer and reproduced the issue. It's related to a specific Windows (update) patch level. More info soon.

Friedrich

linder
09-29-2020, 10:16 AM
This should work fine now on your specific machine:

https://www.setupbuilder.com/projects/is_sb10_active_new.zip

If you are interested, please send your e-mail address to support [at] lindersoft [dot] com and we'll send you the new compiler component (only 5 KB).

Friedrich