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.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

1
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
Answered 11/28/2005 by: TomB
Orange Belt

Please log in to comment
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Hi Tomb,
Thank you for your help but your response is not complete.
I know use a script to kill a process.
But I don't know how to do this since a remove.
Q.
Answered 11/29/2005 by: TheQuaker
Senior Yellow Belt

Please log in to comment
0
If you only want the custom action to run on remove, then you need to condition the action using the following syntax:

REMOVE~="ALL"
Answered 11/30/2005 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
0
I brentHunter,
Thank you for your help.
I 'm going to try this.
Q.
Answered 11/30/2005 by: TheQuaker
Senior Yellow Belt

Please log in to comment
0
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.
Answered 12/01/2005 by: shogun_ro
Orange Belt

Please log in to comment
0
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
Answered 09/23/2008 by: coolamerboy
Senior Yellow Belt

Please log in to comment
0
Killing a process should always be the last resort. Instead, find out the name of the service and stop that, using 'NET STOP [name_of_service]' or, more elegantly, using a WMI-based script. Only if the service fails to stop within a reasonable time should you then think about killing the process.
Answered 09/23/2008 by: VBScab
Red Belt

Please log in to comment
0
I tried with it and it didn´t work!
It seems that my uninstall.cmd is not working, i allready looked in google but i couldn´t figuer it out.
I need help with the syntax, how can i run my uninstall file with or without pskill.

Please help!
Answered 09/23/2008 by: coolamerboy
Senior Yellow Belt

Please log in to comment
0
It may also be possible to do using the ServiceControl table within the MSI. Try that first, then a WMI script, then "net use", then kill the process. As Ian points out this should be a last resort.
Answered 09/23/2008 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
ORIGINAL: aogilmor
It may also be possible to do using the ServiceControl table within the MSI.
The 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.

ORIGINAL: coolamerboy
I tried with it and it didn´t work!
What 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... :)
Answered 09/24/2008 by: VBScab
Red Belt

Please log in to comment
0
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
Answered 09/24/2008 by: coolamerboy
Senior Yellow Belt

Please log in to comment
0
This is my uninstallstring if it help:.

RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\PROFES~1\RunTime\11\50\Intel32\Ctor.dll,LaunchSetup "C:\Program Files\InstallShield Installation Information\{F0D85ADD-DD61-4B43-87A0-6DA52A211A8B}\setup.exe" -l0x9 -removeonly

I tried to use it but i failed.
Answered 09/24/2008 by: coolamerboy
Senior Yellow Belt

Please log in to comment
0
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.
Answered 09/24/2008 by: VBScab
Red Belt

Please log in to comment
0
ORIGINAL: VBScab

ORIGINAL: aogilmor
It may also be possible to do using the ServiceControl table within the MSI.
The 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.

ORIGINAL: coolamerboy
I tried with it and it didn´t work!
What 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 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.
Answered 09/24/2008 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity