To uninstall the application..
I have written a VBScript mainly using taskkill command to kill services..
The script works fine from outside.. but when i embed the script in MSI as a custom action, though the script get's executed, it doesn't kill the services..

The services Imagename in taskmanager view is shown as SYSTEM, so i can't use SC/NET coomands to stop services.. Plz anyone provide me a script that helps stop/kill a service of imagename SYSTEM, that works fine when i embed the script in MSI
0 Comments   [ + ] Show Comments

Comments

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
Not all of VBscript's function's are applicapable with MSI. You could use the vbscript file as an external file to execute.
Make sure the user how's installing the MSI has the appropiate rights.
Answered 04/20/2005 by: mickman
Orange Belt

Please log in to comment
0
I used this:

Stops the MSSQLSSERVER service and all its dependent services.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery("Associators of " _
& "{Win32_Service.Name='MSSQLSSERVER'} Where " _
& "AssocClass=Win32_DependentService " & "Role=Antecedent" )
For each objService in colServiceList
objService.StopService()
Next
Wscript.Sleep 20000
Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service where Name='MSSQLSSERVER'")
For each objService in colServiceList
errReturn = objService.StopService()
Next


works great.
Answered 04/20/2005 by: mickman
Orange Belt

Please log in to comment
0
Hey i have tried the script above.. It works fine for normal processes..
However it doesn't work with killing processes with imagename = SYSTEM in Task Manager.

Plz verify..
Answered 04/20/2005 by: charan
Orange Belt

Please log in to comment
0
Charan..

Did you try to check the registry? There are a total of 6 services for MCAffe Desktop Firewall. You can only see 2 Services if you check the Services under the Administrative Tool but if you can try to browse the Registry using REgedit, you can find the other 4! I don't know if I missed other services... Try and stop all of the services and it might kill that process.. Be sure to stop first all of the depency services..

Browse the regedit:

HKLM\SYSTEM\CurrentControlSet\Services

HOpe this help..
Answered 04/21/2005 by: dj_xest
Fifth Degree Black Belt

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