469,625 Members | 1,859 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Deployment of Windows Service Project

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
Dec 6 '07 #1
4 3163
On 6 Dec, 15:30, ocho...@gmail.com wrote:
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.
Dec 6 '07 #2
On 6 Gru, 17:08, DeveloperX <nntp...@operamail.comwrote:
On 6 Dec, 15:30, ocho...@gmail.com wrote:
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.

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

/M
Dec 7 '07 #3
On 7 Dec, 07:37, ocho...@gmail.com wrote:
On 6 Gru, 17:08, DeveloperX <nntp...@operamail.comwrote:


On 6 Dec, 15:30, ocho...@gmail.com wrote:
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.

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

/M- Hide quoted text -

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

http://www.devx.com/dotnet/Article/20849/1763/page/2
Dec 7 '07 #4
On 7 Gru, 11:56, DeveloperX <nntp...@operamail.comwrote:
On 7 Dec, 07:37, ocho...@gmail.com wrote:
On 6 Gru, 17:08, DeveloperX <nntp...@operamail.comwrote:
On 6 Dec, 15:30, ocho...@gmail.com wrote:
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.
There is no projectInstaller class. How can I add it?
/M- Hide quoted text -
- Show quoted text -

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
Dec 7 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Wendy Elizabeth | last post: by
reply views Thread by yawnb | last post: by
1 post views Thread by Wendy Elizabeth | last post: by
6 posts views Thread by andrewbb | last post: by
1 post views Thread by kirk.quinbar | last post: by
5 posts views Thread by tshad | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.