469,313 Members | 2,550 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,313 developers. It's quick & easy.

Windows Installer problems

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
Nov 5 '07 #1
3 2879
Ok, so I realize the cause of the problem. It's having the condition
CHECKBOXA1 = 1 in the Uninstall Custom Action. When I remove that then the
service uninstalls ok (if I selected to install it)
But now I can see that I'll have problems if I didnt install it in the first
place.

So how can I test to see if the service was installed and only uninstall if
it's there?

thanks
Nov 5 '07 #2
But now I can see that I'll have problems if I didnt install it in the
first place.

So how can I test to see if the service was installed and only uninstall
if it's there?
For future reference

In the uninstall section, change "CHECKBOX1A=1" to "(?my.service<>2)" where
my.service is the name of the service as in "Primary output from my.service"
Nov 12 '07 #3
Hi Claire,

We are facing the same problem for a similar situation.

Were you able to find a solution to this problem? If yes we would really
appreciate if you could share with us the same.

Awaiting your response.

Regards,
Anoop

*** Sent via Developersdex http://www.developersdex.com ***
Nov 22 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dermot O'Loughlin | last post: by
9 posts views Thread by =?Utf-8?B?THVpcyBBbnRvbmlvIFJvc2VsbG8gR2FyY2lh?= | last post: by
reply views Thread by =?Utf-8?B?U2ltb25EZXY=?= | last post: by
12 posts views Thread by Alan M Dunsmuir | last post: by
5 posts views Thread by dm3281 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.