This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- IS 2008 - Service to stop and remove on un-installation
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 12, 2007
06:49 AM
IS 2008 - Service to stop and remove on un-installation
Hi,
Using IS 2008 - Basic MSI Project.
Have written a function
=======================================
function MyFunction(hMSI)
begin
if MAINTENANCE then
ServiceStopService( "bigVault Helper Service" );
ServiceRemoveService( "bigVault Helper Service" );
endif;
end;
=======================================
The "Install Exec Sequence" for the function is "After StopServices".
The problem is that the service is not getting stoped and hence not getting removed.
I have tried using the
GetExtendedErrInfo ( svScriptFile, nvLineNumber, nvError )
to get the error and the output that i got was
Error in the file Service.rul line no. 396 and the error code return was 0.
The IS help for the function ("ServiceStopService ") that i have called does not state anything on support for OS Vista
=======================================
ServiceStopService
InstallShield 2008 InstallScript Language Reference
The ServiceStopService function stops the service that is specified by szServiceName.
The ServiceStopService function is supported only for Windows NT, Windows 2000, and Windows XP systems; the function will fail on Windows 95, Windows 98, and Windows Me systems.
=======================================
Using IS 2008 - Basic MSI Project.
Have written a function
=======================================
function MyFunction(hMSI)
begin
if MAINTENANCE then
ServiceStopService( "bigVault Helper Service" );
ServiceRemoveService( "bigVault Helper Service" );
endif;
end;
=======================================
The "Install Exec Sequence" for the function is "After StopServices".
The problem is that the service is not getting stoped and hence not getting removed.
I have tried using the
GetExtendedErrInfo ( svScriptFile, nvLineNumber, nvError )
to get the error and the output that i got was
Error in the file Service.rul line no. 396 and the error code return was 0.
The IS help for the function ("ServiceStopService ") that i have called does not state anything on support for OS Vista
=======================================
ServiceStopService
InstallShield 2008 InstallScript Language Reference
The ServiceStopService function stops the service that is specified by szServiceName.
The ServiceStopService function is supported only for Windows NT, Windows 2000, and Windows XP systems; the function will fail on Windows 95, Windows 98, and Windows Me systems.
=======================================
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 15, 2007
04:46 PM
Is it an option to use the Control NT Service advanced settings in a component?
(If not, is your action scheduled for deferred execution?)
(If not, is your action scheduled for deferred execution?)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 16, 2007
12:08 AM
Yes we have used the Control NT Service advanced settings in a component. We have two events for the service: SerStart and SerStop.
SerStart properties:
Install Start: YES
Install Stop: YES
Service Argument: -install
SerStop properties:
Uninstall Stop: YES
Uninstall Delete: YES
Service Argument: -remove
Regarding the action: In-Script execution: Immediate Execution
Execution scheduling: Always execute.
SerStart properties:
Install Start: YES
Install Stop: YES
Service Argument: -install
SerStop properties:
Uninstall Stop: YES
Uninstall Delete: YES
Service Argument: -remove
Regarding the action: In-Script execution: Immediate Execution
Execution scheduling: Always execute.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 16, 2007
08:37 AM
As a rule, actions that make system changes should be scheduled for deferred execution, and not immediate execution.
Another thing to verify is that ServiceStopService (and the other InstallScript service functions) wants the internal service name, and not the display name...
Another thing to verify is that ServiceStopService (and the other InstallScript service functions) wants the internal service name, and not the display name...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2007
12:28 AM
Thank you sir for your valuable information. Its working.