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
- :
- Re: Install script
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
May 22, 2013
01:10 AM
Install script
I have some services which has to be installed along with the setup, how do i need to install the services. Can anyone let me know how to do this?
I am using Install script project for setup creation.
I am using Install script project for setup creation.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 22, 2013
09:00 AM
Here is some good info:
http://forum.installsite.net/index.php?showtopic=20511
1) Create your Features and related Components with the service related files and dependencies, just as you would for any application.
2) If you have to create a non-default account for your service to use then you can use the SdLogonUserInformation dialog, but I had lots of issues trying to use this feature and I had to import the underlying code and customize to both fix problems and make it more useful in our situation. If the service is to be installed using one of the built-in service accounts you can ignore this issue (and count your blessings).
3) In feature_OnInstalled I would:
a) Archive the values of SERVICE_IS_PARAMS that I need to change.
b) Change values of SERVICE_IS_PARAMS.
c) call ServiceAddService
d) Restore the original values of SERVICE_IS_PARAMS
You can either have ServiceAddService start the service, or if you are not ready for that later you can call ServiceStartService (probably after checking ServiceExistService or calling ServiceGetServiceState to make sure it is not already running.
When a service is installed you should see the related registry keys under
HKLM\SYSTEM\CurrentControlSet\services\ and if necessary prior to starting the service you can edit the some of these keys to add commandline switches, but you should be careful doing this as changing a registry key does not directly change the information the SCM uses in memory. You can use sc.exe to query the service configuration and check whether your setup is doing what you want it to do.
http://forum.installsite.net/index.php?showtopic=20511
1) Create your Features and related Components with the service related files and dependencies, just as you would for any application.
2) If you have to create a non-default account for your service to use then you can use the SdLogonUserInformation dialog, but I had lots of issues trying to use this feature and I had to import the underlying code and customize to both fix problems and make it more useful in our situation. If the service is to be installed using one of the built-in service accounts you can ignore this issue (and count your blessings).
3) In feature_OnInstalled I would:
a) Archive the values of SERVICE_IS_PARAMS that I need to change.
b) Change values of SERVICE_IS_PARAMS.
c) call ServiceAddService
d) Restore the original values of SERVICE_IS_PARAMS
You can either have ServiceAddService start the service, or if you are not ready for that later you can call ServiceStartService (probably after checking ServiceExistService or calling ServiceGetServiceState to make sure it is not already running.
When a service is installed you should see the related registry keys under
HKLM\SYSTEM\CurrentControlSet\services\