473,471 Members | 4,095 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Service project

I have a .NET project whose final products are two background services
that you can see, start, or stop in the "Services" panel.

I have a folder containing the executables in the form of .dll
and .exe. How can I use the executables to start the services?

Jun 29 '07 #1
3 983
Curious wrote:
I have a .NET project whose final products are two background services
that you can see, start, or stop in the "Services" panel.

I have a folder containing the executables in the form of .dll
and .exe. How can I use the executables to start the services?
You have to use the .Net Framework Service Controller in code.
Jun 30 '07 #2
They're both defined as sub-classes of
"System.ServiceProcess.ServiceBase". I've built the executables. But
don't know how to get the services started.

Jul 1 '07 #3

"Curious" <fi********@yahoo.comwrote in message
news:11**********************@q69g2000hsb.googlegr oups.com...
They're both defined as sub-classes of
"System.ServiceProcess.ServiceBase". I've built the executables. But
don't know how to get the services started.
This is how I have done it which works the same way in VB or C#.Net

Dim theServiceController as System.ServiceProcess.ServiceController
me.theServiceController = New System.ServiceProcess.ServiceController()
me.theServiceController.MachineName = "Curious"
me.theServiceController.ServiceName = "CuriousService"

if (theServiceController.Status = ServiceControllerStatus.Stopped) then
theServiceController.Start()
end if
Jul 2 '07 #4

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

Similar topics

3
by: Jeremy S. | last post by:
On my dev machine (XP/Pro with VS.NET 2003) I have been developing a Windows Service and installing it on the local machine by opening the Visual Studio Command Prompt and then executing . Now I...
5
by: Derek Martin | last post by:
I am creating a windows service and have added a reference to a DLL project that I have created. That DLL file is correctly referenced in both a windows app and a web app, all in the same...
0
by: Sathyaish | last post by:
I've written a Web Service that has main service class. Let's call the main class that exposes the service interface as Service1. So, we have: public class Service1:...
2
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
7
by: Mantorok | last post by:
Hi all I have a web-service that references another project (the component) that actually carries out the work, the web-service is simply acting as the public interface. The web-service on...
3
by: JM | last post by:
Hi, I have created a Solution in VS 2005 with 2 simple projects. First project is simple Windows Service which writes an entry into event log when it starts and when it stops. Nothing else. I...
3
dmjpro
by: dmjpro | last post by:
plz send me a good link which can clearify me how the J2EE framework works i want the details information .... plz help thanx
0
by: =?Utf-8?B?U2ltb25EZXY=?= | last post by:
Hi All I would like to install the same Windows Service project on the same server under different names, one for each customer. I have been able to do it but I would like an expert opinion as...
7
by: Rick | last post by:
I have a web service that I converted from VS 2003 Framework 1.1. to VS 2005 Framework 2.0. I tried to use the same IIS web site to run the web service. I deleted the Framework 1.1 files published...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.