How to build Installer for Windows Service

D

DBT

When I add an Install project to my Windows Service project everything
compiles and it works okay.

The problem is the Installer only writes the files to disk, but doesn't
actually install the service. Thus I must manually use InstallUtil.exe to
install the service.

I thought the installer handled this. I'm using VS2003.
 
D

Dmitry Baibakov

DBT said:
When I add an Install project to my Windows Service project everything
compiles and it works okay.

The problem is the Installer only writes the files to disk, but doesn't
actually install the service. Thus I must manually use InstallUtil.exe to
install the service.

I thought the installer handled this. I'm using VS2003.
You should add a custom action for install, commit, rollback and
uninstall nodes, including the primary output of your WinServer project.
See in 70-310/320 preparation guide. You may do the following:
1) Navigate to the Solution Explorer, right-click the ServiceSetup
project, point to View, and click Custom Actions from the shortcut menu
2) In Custom Actions, right-click Custom Actions and click Add Custom
Action from the shortcut menu.
3) In the Select Item In Project dialog box, double-click Application
Folder, select Primary Output From WindowsServiceExample (Active), and
click OK. The primary output is added to all four nodes of the custom
actions: Install, Commit, Rollback, and Uninstall.

Dmitry
 
D

DBT

Thanks, that did it ...


Dmitry Baibakov said:
You should add a custom action for install, commit, rollback and
uninstall nodes, including the primary output of your WinServer project.
See in 70-310/320 preparation guide. You may do the following:
1) Navigate to the Solution Explorer, right-click the ServiceSetup
project, point to View, and click Custom Actions from the shortcut menu
2) In Custom Actions, right-click Custom Actions and click Add Custom
Action from the shortcut menu.
3) In the Select Item In Project dialog box, double-click Application
Folder, select Primary Output From WindowsServiceExample (Active), and
click OK. The primary output is added to all four nodes of the custom
actions: Install, Commit, Rollback, and Uninstall.

Dmitry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top