Archive: kill process by name?


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


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.


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


Do you do all that manually?


yes


Then just wait for the InstallShield installer to really finish.


I would like to do that, but don't know how.


I think I understood you wrong. I'm not doing it "really" manually but by custom actions I inserted in the Installshield etc.


If you're doing it manually just wait for it to vanish from the task manager.


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.