H
hpark2_1999
Hi!
I know how easy it is to create an NT services using .net framework
(using Visual Studio 2003).
Here is my problem.
I came across a situation where I would like to run 2 instances of a
service executable. From what I have seen the Service name has to be
specified as a "Name" property for the service.
Here is the gist of what I would like to do:
I have an executable which runs as a windows service.
This program connects to a database every 5 min. reads data, creates a
file.
Now, a need came up which I would like to connect to another database.
Database information is in configuration file so pointing to different
database consists of stopping the service, change the config file and
re-start the service.
However, now, I want to run the program to do the same thing on 2
different database simultaneously.
Even if I put 2 copies of executables in different directory, I can not
create 2 different instance of the same service using installTools
since the name of the service is embedded in the program itself (isn't
it??)
What would be the best way of doing this without keeping 2 different
version of the program?
Thanks.
Harry Park.
I know how easy it is to create an NT services using .net framework
(using Visual Studio 2003).
Here is my problem.
I came across a situation where I would like to run 2 instances of a
service executable. From what I have seen the Service name has to be
specified as a "Name" property for the service.
Here is the gist of what I would like to do:
I have an executable which runs as a windows service.
This program connects to a database every 5 min. reads data, creates a
file.
Now, a need came up which I would like to connect to another database.
Database information is in configuration file so pointing to different
database consists of stopping the service, change the config file and
re-start the service.
However, now, I want to run the program to do the same thing on 2
different database simultaneously.
Even if I put 2 copies of executables in different directory, I can not
create 2 different instance of the same service using installTools
since the name of the service is embedded in the program itself (isn't
it??)
What would be the best way of doing this without keeping 2 different
version of the program?
Thanks.
Harry Park.