marcoow
9th May 2003 11:21 UTC
kill process by name?
Hi,
how can I kill a process by name? The problem is as follows:
first I'M running an installshield setup which dows my main setup. after that I'm running a nsis setup that calls the sun jre setup. when I'm doing that, I sometime get the error that the jre can't write some file like C:\program files\common files\installshield}ikernel\... I think that is because some process of my previous installshield setup is still running. I think when I could kill this process everything should be ok. But in the forums I can only find examples for killing processes by their windows handle, which I don't have for this installshield process. I could only find out it's name. Anybody who could help me?
Marco
kichik
9th May 2003 13:04 UTC
Killing a process, especially an installer, is a very bad idea. You can never know what it leaves behind and what was it doing when you killed it. Instead, you should read this thread to know how to make NSIS wait for the InstallShield installer. If you're not calling the InstallShield installer from NSIS post back here and we'll try to find some other way. In any case, killing the process is not the way.
marcoow
9th May 2003 14:21 UTC
I'm not calling the Installshield from NSIS, but what I do is:
-lanunching an Installshield Setup
-launching an NSIS setup when Installsield Setup is finished
-launching the silent JRE (which is an Installshield setup again) setup from my NSIS setup
kichik
9th May 2003 14:26 UTC
Do you do all that manually?
marcoow
9th May 2003 14:36 UTC
yes
kichik
9th May 2003 14:38 UTC
Then just wait for the InstallShield installer to really finish.
marcoow
9th May 2003 14:45 UTC
I would like to do that, but don't know how.
marcoow
9th May 2003 14:47 UTC
I think I understood you wrong. I'm not doing it "really" manually but by custom actions I inserted in the Installshield etc.
kichik
9th May 2003 14:47 UTC
If you're doing it manually just wait for it to vanish from the task manager.
kichik
9th May 2003 14:49 UTC
I am sorry, can't help you there. You'd have to find out on your own how to cause InstallShield to exit right after it calls NSIS or just call InstallShield from within NSIS as instructed in the above link.