Claire
11/5/2007 3:31:00 PM
Hi
(Visual studio 2005)
My windows installer Setup project needs to install a desktop application
plus an optional Windows Service, into a single destination folder. Both
applications share the same assemblies and are part of the same solution.
Installation of the Windows Service is optional and is to be installed on a
single PC on a LAN, the desktop applications install to one or more pcs on
the same LAN.
Ive added the setup to my solution. Ive added a Checkboxes (A) dialog to the
user interface and will test CHECKBOXA1=1 to query if the service is to be
installed.
I've added the service to Install,Commit,Rollback and Uninstall nodes in the
Custom Actions window.
Ive added the condition CHECKBOXA1=1 to each of the actions.
When I install and uncheck CHECKBOXA1, the service isnt installed but the
files are copied to the target directory. Correct.
I uninstall this and the files and directory are deleted. Correct.
When I install and check CHECKBOXA1, the service IS installed (not running
as this has to be started manually afterwards). Correct.
I uninstall. The service remains in the services list, the files in the
directory are deleted. A file called service.InstallState is to be found in
the install directory.
What am I doing wrong please? If I try to install after this I'm told that a
service with this name already exists and it fails with a rollback.
thanks
Claire