/build/static/layout/Breadcrumb_cap_w.png

VBScript to kill services with imagename SYSTEM in Task Manager view doesn't work

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

Answers (4)

Posted by: mickman 19 years ago
Orange Belt
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.
Posted by: mickman 19 years ago
Orange Belt
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.
Posted by: charan 19 years ago
Orange Belt
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..
Posted by: dj_xest 19 years ago
5th Degree Black Belt
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..
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ