473,395 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Multiple services, separate service installers, starting only one in services panel, but all services run

I have created 5 services in my project, in the 1st service I set
servicestorun = array of all 5 services, I have a project installer
with 5 service installers, one for each service. I have code so that
whenever any service starts, stops or timers elapse a log entry is
created. When I install my project, and start the 1st service in the
services console, it shows that the service started and I have the
corresponding log entry confirming it has started. This is where I am
confused. All services start elapsing and are acting as though they
are running, even though only the 1st shows it is running in the
services console. I see log entries for each service elapsing, but
only the 1st services has run it's onstart event. Of course I don't
want all services to run when I only start the one. And how come, when
obviously all services are running because the timer_elapsed event
creates log entries as coded, they never ran their onstart events? And
how come they are running in the first place? And how come they don't
show as running in the services console??? Arghhh...

Please help.

Aug 29 '06 #1
2 2046
Ok so I had some code that started the services in the group that
weren't running. But how come this isn't reflected in the services
console?

colResult = ul.CheckJobStatus()
ServicesNotRun = colResult(1)
ServicesRunning = colResult(2)

Dim Controller As System.ServiceProcess.ServiceController

For Each strServiceName In ServicesNotRun
Controller = New
System.ServiceProcess.ServiceController(strService Name)

If Controller.Status = ServiceControllerStatus.Stopped Then
Controller.Start()
End If
Next

For Each strServiceName In ServicesRunning
Controller = New
System.ServiceProcess.ServiceController(strService Name)

Controller.Stop()
Controller.WaitForStatus(ServiceControllerStatus.S topped)
Controller.Start()
Next

sd******@gmail.com wrote:
I have created 5 services in my project, in the 1st service I set
servicestorun = array of all 5 services, I have a project installer
with 5 service installers, one for each service. I have code so that
whenever any service starts, stops or timers elapse a log entry is
created. When I install my project, and start the 1st service in the
services console, it shows that the service started and I have the
corresponding log entry confirming it has started. This is where I am
confused. All services start elapsing and are acting as though they
are running, even though only the 1st shows it is running in the
services console. I see log entries for each service elapsing, but
only the 1st services has run it's onstart event. Of course I don't
want all services to run when I only start the one. And how come, when
obviously all services are running because the timer_elapsed event
creates log entries as coded, they never ran their onstart events? And
how come they are running in the first place? And how come they don't
show as running in the services console??? Arghhh...

Please help.
Aug 29 '06 #2
Confused....

This code is not the source of my problem...why are these services
running when only one is started? Any help is appreciated.

sd******@gmail.com wrote:
Ok so I had some code that started the services in the group that
weren't running. But how come this isn't reflected in the services
console?

colResult = ul.CheckJobStatus()
ServicesNotRun = colResult(1)
ServicesRunning = colResult(2)

Dim Controller As System.ServiceProcess.ServiceController

For Each strServiceName In ServicesNotRun
Controller = New
System.ServiceProcess.ServiceController(strService Name)

If Controller.Status = ServiceControllerStatus.Stopped Then
Controller.Start()
End If
Next

For Each strServiceName In ServicesRunning
Controller = New
System.ServiceProcess.ServiceController(strService Name)

Controller.Stop()
Controller.WaitForStatus(ServiceControllerStatus.S topped)
Controller.Start()
Next

sd******@gmail.com wrote:
I have created 5 services in my project, in the 1st service I set
servicestorun = array of all 5 services, I have a project installer
with 5 service installers, one for each service. I have code so that
whenever any service starts, stops or timers elapse a log entry is
created. When I install my project, and start the 1st service in the
services console, it shows that the service started and I have the
corresponding log entry confirming it has started. This is where I am
confused. All services start elapsing and are acting as though they
are running, even though only the 1st shows it is running in the
services console. I see log entries for each service elapsing, but
only the 1st services has run it's onstart event. Of course I don't
want all services to run when I only start the one. And how come, when
obviously all services are running because the timer_elapsed event
creates log entries as coded, they never ran their onstart events? And
how come they are running in the first place? And how come they don't
show as running in the services console??? Arghhh...

Please help.
Aug 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Vlad | last post by:
Is there any way to install multiple instances of the same windows service designed with VS.NET 2003? I tried copying the binaries into a separate folder and then copying registry entries for the...
11
by: Mike | last post by:
Looking to find any information on how to properly configure multiple instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking for information on how the multiple instance settings...
2
by: Sachi | last post by:
Hi, I have a requirement were there will be some 3 windows services will be there. But I want only one of this service to hold the control of start, stop and pause features of all this three...
3
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
10
by: John | last post by:
I currently have a Windows Service that runs Transactions that are very Processor/Memory Intensive. I have a requirement to deploy multiple instances of the Web service on the Same server. Each...
1
by: sunil | last post by:
Hello All. I have written a program as an exe that performs some kind of order processing. The program is first configured and then started manually. I have have multiple instances of this...
7
by: Giulio Petrucci | last post by:
Hi everybody, I've a big problem with a Windows Service I've created using C#. It's a very simple service: it just starts a TcpListener listening for incoming connections on a certain ports....
5
by: JT | last post by:
Hi, I think I need a "best practices" lesson on web sites and web services. In order to conform to the restraints of my web host, my web services seem to need to be in a subfolder of my web...
5
by: Curious | last post by:
I installed a service program. It contained executables in the form of .exe and .dll files. And the service was started automatically after the install. Then, I UN-installed the program, but the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.