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[:@]
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)
Please log in to answer
Posted by:
turbokitty
17 years ago
Posted by:
mazessj
17 years ago
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
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
Posted by:
oreillyr
17 years ago
Posted by:
turbokitty
17 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.