Deployment of Windows Service Project

O

ochocki

Hi,

I've created a solution with a project of type "Windows Service" and
deployment project for this service that creates installation package.

I want to have more then one copy of this service installed on one
machine. Since it is not possible to have two services with the same
name I faced the problem: how to parametrize installation wizard? I
mean, I would like to be able to modify service name during
installation. Is it possible?

/M
 
D

DeveloperX

Hi,

I've created a solution with a project of type "Windows Service" and
deployment project for this service that creates installation package.

I want to have more then one copy of this service installed on one
machine. Since it is not possible to have two services with the same
name I faced the problem: how to parametrize installation wizard? I
mean, I would like to be able to modify service name during
installation. Is it possible?

/M

In the projectInstaller class add events
ProjectInstaller_BeforeInstall
and
ProjectInstaller_BeforeUninstall

In there I call a method called ChangeName which simply does:

MyLittleServiceInstaller.ServiceName = m.TheName;


In this case m is a mini dialog. It just pops up and asks for the new
name, but you can do what ever you like. Read it from a file, get it
from a web service, etc.
 
O

ochocki

In the projectInstaller class add events
ProjectInstaller_BeforeInstall
and
ProjectInstaller_BeforeUninstall

In there I call a method called ChangeName which simply does:

MyLittleServiceInstaller.ServiceName = m.TheName;

In this case m is a mini dialog. It just pops up and asks for the new
name, but you can do what ever you like. Read it from a file, get it
from a web service, etc.


There is no projectInstaller class. How can I add it?

/M
 
O

ochocki

Here's a link that describes it. Will save me some typing :)

http://www.devx.com/dotnet/Article/20849/1763/page/2

OK, that works, but only partially :(
Looks like it is not even possible to run setup when one instance of
the product (service) is already installed. When I launch it I'm asket
whether to remove or repair the installation.
Is it possible to tell the installer to omit this check? Then I would
be able to specify different installation directory and different
service name.

/M
 

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