View Full Version : Install windows service

11-16-2007, 12:38 AM

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?


Mike Marino
11-19-2007, 11:24 AM
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.

11-19-2007, 07:05 PM
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?

11-20-2007, 09:32 AM
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.

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

11-26-2007, 01:07 AM
It works.

01-16-2008, 02:13 PM
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.


10-14-2009, 02:23 PM
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?

10-15-2009, 08:04 AM
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:

(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.)

03-03-2011, 01:58 PM
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.


11-18-2011, 12:20 PM
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.