I am required to send out a package that will stop a service before installing the new app...I have tried to stop it with the Services page but it results in an error 1306. Another application has exclusive rights to this file...as this is an antivirus package, it is imperative that I stop the service just before installing the new one...any help will be appreciated...thanx...
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

1
Assuming the vendor does not provide any command-line means of stopping it, I would say you are looking at a reboot. Set the service to disabled (or manual) in the registry and reboot- when Windows starts back up it should not start and you can do as you wish.

Before going down this path, try the upgrade and make sure the vendor has not accounted for this situation for you.

Best of luck,
Bob
Answered 01/30/2004 by: bkelly
Red Belt

Please log in to comment
1
thanx Bob...the antivirus software has to be sent out to > 1500 PC's and the service must not be off much longer than it takes to install the msi with the new app...I was hoping I could stop the service at the beginning of the execution of the msi...this way we are not open to attacks...I am trying to use launch command from path using taskkill.exe...
Answered 01/30/2004 by: robco
Senior Yellow Belt

Please log in to comment
1
Killing the service is not a bad idea, and this is certianly one way to do it- but if it won't let you- you are forced to seek alternatives. What AntiVirus software is it? I would be suprised if there was not a scripted installation option that would handle the previous/running instance of itself on the target systems. This sounds like a situation that lends itself to a command-line installation instead of repacking. If you must have a MSI, you could always use the MSI to call the command line installation. Take a look at the Package Knowledge Base for tips.
Answered 01/30/2004 by: bkelly
Red Belt

Please log in to comment
1
we are switching from Inoculan to McAfee...I was hoping to handle all of the tasks from 1 msi for ease and efficiency but it looks like we may have to run a command in Tivoli to handle the service followed by the new msi...I will continue to work on this problem with-in the msi just in case...thanx for your prompt response and ideas...
Answered 01/30/2004 by: robco
Senior Yellow Belt

Please log in to comment
1
can you make a batch like that:

net stop ure_service
sc \\%computername% config ure_service start= disabled

msiexec /I uremsi.msi

net start ure_service
sc \\%computername% config ure_service start= auto

---------------

sc query - Queries the status for a service, or enumerates the status for types of services
Answered 02/19/2004 by: thales
Senior Yellow Belt

Please log in to comment
1
thales, thanx for the suggestion...I will put something together with your suggestion to try it out as an alternative...we ended up using a batch to call taskkill to end the antivirus scanner...once the service was stopped in the transform, the other app was installed without any problems...
Answered 03/05/2004 by: robco
Senior Yellow Belt

Please log in to comment
1
From the Window 2000 Scripting Guide

Stoping a service and it's dependencies

'---------------------------------------------------------------------------------------------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery("Associators of " _
& "{Win32_Service.Name='NetDDE'} 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='NetDDE'")
For each objService in colServiceList
errReturn = objService.StopService()
Next
'---------------------------------------------------------------------------------------------


Stoping a service under a specific account

'---------------------------------------------------------------------------------------------

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServices = objWMIService.ExecQuery _
("Select * from win32_Service")
For each objService in colServices
If objService.StartName = ".\netsvc" Then
errReturnCode = objService.StopService()
End If
Next


'---------------------------------------------------------------------------------------------

Hope this helps

Regards,
Answered 03/05/2004 by: Robo Scripter
Orange Senior Belt

Please log in to comment
1
thanx for your suggestion Robo Scripter...I have suggested we test another way to stop this service should time permit...our Desktop admins have elected to use
c:\windows\system32\taskkill /f /t /im "progname".exe etc to stop the service...it does work when sent out with tivoli before the install of the new package...
Answered 03/10/2004 by: robco
Senior Yellow Belt

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