Kill a Process
Hi,
I try to kill a process during uninstall.
I use Wise installer to compile my package and I used this command:
taskkill /F /IM "application ID", but I don't know how to do that during remove.
Thank you for your help.
I try to kill a process during uninstall.
I use Wise installer to compile my package and I used this command:
taskkill /F /IM "application ID", but I don't know how to do that during remove.
Thank you for your help.
0 Comments
[ + ] Show comments
Answers (14)
Please log in to answer
Posted by:
TomB
19 years ago
Try the following:
'Decalre Variables
Dim objWMIService,colProcessList,objProcess
Dim strComputer, strProcess
'Define Variables
strComputer = "."
strProcess = "process" '<= Insert process name here
'Get Process List
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = '" & strProcess & "'")
'Terminate Process
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Posted by:
TheQuaker
19 years ago
Posted by:
brenthunter2005
18 years ago
Posted by:
TheQuaker
18 years ago
Posted by:
shogun_ro
18 years ago
You can also try pskill.exe from system internals. You can make a custom action that runs pskill.exe under system context. Its guaranteed to work on every Windows operating system.
Posted by:
coolamerboy
16 years ago
Greetings all
I have problem to kill a process when i try to uninstall the application vaio event service!
When i uninstall the application manually it say that "vaio event sevice is in use, to set up it you need to stop this program first. Stop vaio evenr service now?
I want to kill this process but i don´t know how!
My uninstall file look like this:
setup.exe /s /f1"z:\APPS\Vaio Event Service\2.7\uninstall.iss"
When i run that nothing happens!
Grateful for any help
I have problem to kill a process when i try to uninstall the application vaio event service!
When i uninstall the application manually it say that "vaio event sevice is in use, to set up it you need to stop this program first. Stop vaio evenr service now?
I want to kill this process but i don´t know how!
My uninstall file look like this:
setup.exe /s /f1"z:\APPS\Vaio Event Service\2.7\uninstall.iss"
When i run that nothing happens!
Grateful for any help
Posted by:
anonymous_9363
16 years ago
Posted by:
coolamerboy
16 years ago
Posted by:
aogilmor
16 years ago
Posted by:
anonymous_9363
16 years ago
ORIGINAL: aogilmorThe presence of a response file would suggest that this is a InstallShield script-driven install, not an MSI-driven one. I have no knowledge of IS script so I can't help in that regard.
It may also be possible to do using the ServiceControl table within the MSI.
ORIGINAL: coolamerboyWhat didn't work? What did you try? What investigations have you done to determine why it didn't work? The old psychic powers have deserted me again... :)
I tried with it and it didn´t work!
Posted by:
coolamerboy
16 years ago
Hi again,
The thing is that i don´t have msi-file here, its an installshield.
I stated with stop the service and i managed to do that but it inly stop the service, the uninstall fails!
setup.exe /S /f1"z:\APPS\vaio event service\2.7\uninstall.iss"
net stop "vaio event service"
But as i said it only stop the service but doesn´t uninstall the application.
I also tried with:
taskkill \IM VESMgr.exe and it kill the process but doesn´t uninstall!
Any ideas?
Thank you
The thing is that i don´t have msi-file here, its an installshield.
I stated with stop the service and i managed to do that but it inly stop the service, the uninstall fails!
setup.exe /S /f1"z:\APPS\vaio event service\2.7\uninstall.iss"
net stop "vaio event service"
But as i said it only stop the service but doesn´t uninstall the application.
I also tried with:
taskkill \IM VESMgr.exe and it kill the process but doesn´t uninstall!
Any ideas?
Thank you
Posted by:
coolamerboy
16 years ago
Posted by:
anonymous_9363
16 years ago
You need to combine BOTH commands, firstly to stop the service and then to uninstall the app.
I suspect that the service may not have fully stopped by the time the uninstall takes place, which is why I suggested using a script. That way, you can test whether the service has stopped or not before proceeding with the uninstall.
I suspect that the service may not have fully stopped by the time the uninstall takes place, which is why I suggested using a script. That way, you can test whether the service has stopped or not before proceeding with the uninstall.
Posted by:
aogilmor
16 years ago
ORIGINAL: VBScab
ORIGINAL: aogilmorThe presence of a response file would suggest that this is a InstallShield script-driven install, not an MSI-driven one. I have no knowledge of IS script so I can't help in that regard.
It may also be possible to do using the ServiceControl table within the MSI.
ORIGINAL: coolamerboyWhat didn't work? What did you try? What investigations have you done to determine why it didn't work? The old psychic powers have deserted me again... :)
I tried with it and it didn´t work!
I was thinking that he is using an MSI to install a product (although the OP's description "Wise installer" is a bit ambiguous - i suppose it could be wise script) --and he needed to make the uninstallstring work to uninstall the old product. Maybe I'm not understanging but it seems to me, from my reading, that you could use ServiceControl to stop a service from another app during install. I have not tried it personally. Getting the uninstallstring to work is another issue - my preference as always is not to rely on the very old installshield and just use my own CA's, RemoveFile and RemoveRegistry entries to get rid of it.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.