/build/static/layout/Breadcrumb_cap_w.png

Stop a service

Hi All,

Installshield 11.5

I am packaging an application which requires that I stop a pre-existing service prior to install. The service is called "Windows Firewall/Internet Connection Sharing (ICS)". I have gone to a component tab and to "Control NT Services" in the Advanced Settings section I created a new Service with a New Event called "StopService" and filled the fields as follows:

InstallStart : no
InstallStop : yes
InstallDelete : no
UnInstallStart : no
UnInstallStop : no
UnInstallDelete : no
Service Argument : C:\WINDOWS\System32\svchost.exe -k netsvcs
Wait type : Wait for the event to complete.


I moved the event in the InstallExecute sequence to execute after InstallInitialize yet it does not seem to have had any effect. Can anyone shed any light on what is wrong with what I have done or suggest another method of stopping a service that runs from within svchost.exe? Doing my head in[:@]

0 Comments   [ + ] Show comments

Answers (5)

Posted by: turbokitty 17 years ago
6th Degree Black Belt
0
Create a new component using the Component Wizard.

- Choose the second radio button
- Control NT Service
- Name: "SharedAccess"
- Check "Stop the Service"
- "Do Nothing"
- First Radio Button

Let me know how that goes.
Posted by: mazessj 17 years ago
Blue Belt
0
oreillyr,

I could be mistaken, but I think you might run into difficulty stopping the ICS (SharedAccess) service when there are other services on the machine that depend on it. You might have to write a procedure that identifies and stops these dependent services first, then stops ICS. Then I suppose you will need to start these services back up; you will need to re-start ICS first, then re-start the other ICS-dependent services.

--Josh
Posted by: alwaysharsha 17 years ago
Yellow Belt
0
Hi,

You can use VBScripts to stop the service before u install and after u have done u can use another VBScript to start the service.

[:)] Harsha
Posted by: oreillyr 17 years ago
Fifth Degree Brown Belt
0
Thanks Turbo, that worked fine. I am still not sure what the difference between doing it through the GUI and the component wizard was though? Seems to be the same entries in the table!
Posted by: turbokitty 17 years ago
6th Degree Black Belt
0
I think the issue is with your service name. You have to open up the service on the test box and look at the name Windows uses to call it.. you can ignore the executable name in that service property sheet.
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