cancel
Showing results for 
Search instead for 
Did you mean: 
alina_b
Pilgrim

Install windows service

Hi,

I have a question regarding a Windows service installation. Is there a easy way to update the installation of a Windows Service with InstallShield 2008 Express?

The Win service already exists, so i have to stop it, copy over the new version of the service and start again. With Windows Installer is easy to accomplish this. However, I cannot call an MSI exe out of the InstallShield project. I have to somehow do the same thing I did with Windows Installer, but from InstallShield.

Any ideas?

10x,
Alina
Labels (1)
0 Kudos
9 Replies
Flexera Mike_Marino
Flexera

Re: Install windows service

The easiest way is to use our Professional or Premier tier product that has direct support for starting and stopping services.

If you need to do it in Express, you would need to author a custom action to start and stop the service.
0 Kudos
alina_b
Pilgrim

Re: Install windows service

Thank you for the answer.
I'm downloading a Premier evaluation right now.
Is there a link to a tutorial with installing services with Premier that I can follow?
0 Kudos
DebbieL
Pilgrim

Re: Install windows service

No, we don't have a tutorial, but InstallShield does have a wizard that helps you configure Windows NT services. Here are some basic instructions to get you started.

[LIST=1]
  • In the View Lists under Organization, click Components.
  • Right-click the Components node and then click Component Wizard. The Component Wizard opens.
  • On the Welcome panel of the wizard, select the second option, which lets you install and control Windows NT services.
  • The next panel has options such as Install NT Service and Control NT Service. Select the Control NT Service option to delete the service at run time. (Then, later you can create a separate component by re-runnning the wizard and selecting the Install NT Service option, which will let you update the service on the target machine and specify when it should be started.)
  • Complete the wizard.

    InstallShield creates a new component for the service that you are installing or controlling. To revise any of the service's settings, expand the Advanced Settings node for that component, and then click the Control NT Services node or the Install NT Services node. Modify any settings that are displayed on the right as appropriate.

    Note: These instructions apply to the Premier and Professional editions of InstallShield, but not the Express edition.

    I hope that helps.

    Debbie Landers
    Macrovision Corporation
  • 0 Kudos
    alina_b
    Pilgrim

    Re: Install windows service

    It works.
    Thanks!
    0 Kudos
    royboy
    Pilgrim

    customizing service properties

    The Component Wizard process you mentioned, does it allow you to customize or set some of the service properties. In particular, I would like to set the Startup Type to Manual, and the Log on as: Local System Account (Log On tab). If not, could you suggest another solution to my problem. Thanks.

    As far as starting the service, I'm using a batch file with DOS command-line commands to start the service, and then letting InstallShield run the batch file.

    Roy
    0 Kudos
    apal13
    Pilgrim

    Re: Install windows service

    I need to do the same but with an InstallScript project. The Component Wizard does not exist for these projects. How would I accomplish this?
    0 Kudos
    DebbieL
    Pilgrim

    Re: Install windows service

    In an InstallScript project, you would need to use the Objects view to add the NT Service object to your project. You can download this object from the following page:
    http://www.flexerasoftware.com/products/installshield/files-utilities.htm

    (Click the 2008 tab on that page. Then download and install the item called InstallShield 2008 InstallScript Objects. When you do that, the NT Service object will be available in the Objects view.)
    0 Kudos
    JoderCoder
    Pilgrim

    Re: Install windows service

    I want to install a service in my installer.

    My installer also does Major Upgrades so when doing an upgrade I would want to stop the service and remove the previous one and install the new one. Also after the install, I want to start the service.

    For this, will I have to create 2 components:

    • An Install Service component to install the service
    • A Control Service that starts the service during install; stops and removes the service during uninstall.


    I assume I dont have to worry about sequencing here to make sure Control Service is executed after the Install Service to make sure it doesnt attempt to start a service that is not available yet. I assume stopping and removal are likewise taken care by the Windows Installer standard actions (like StartServices, StopServices) in the correct order.

    So I would appreciate if somebody can comment on my approach here.

    Thanks.
    0 Kudos
    Highlighted
    csuarez
    Pilgrim

    Re: Install windows service

    Hi. What I need is the user can choose between options presented by the components wizard (automatically start or disabled, error control, local system account or another account), how could I solve my problem with a basic msi project? Thanks.
    0 Kudos