473,325 Members | 2,308 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,325 software developers and data experts.

How do you determine the actual ServiceName of the running Windows Service process

I can install/register a service application (one exe file) as different
Windows Services. How can I get the EventLogs for each process to write
entries under different sources? The eventlog needs to now the ServiceName
of the current process (servicebase), but you have to hard code that the
ServiceName at design time.

eg.

my application: abc.exe
register a service: c:\> srvinst.exe "ABC_Service_1" c:\mypath\abc.exe
register another service: c:\> srvinst.exe "ABC_Service_2"
c:\mypath\abc.exe

I would like the eventlog entries from these to running services to be
distinquishable. Any ideas on how I can do this?
Nov 16 '05 #1
0 1430

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

Similar topics

7
by: Ross Presser | last post by:
OK, I've been researching this problem and can't find a definitive answer yet. The situation is one that seems to have come up a few times to different folks. I am writing an application that...
4
by: ImSoLost | last post by:
I'm running a really long process from ASP.NET and need some help... I am making a method call when the user presses a button from my webpage, which goes into a database and parses a file. This...
11
by: Laser Lu | last post by:
Hi, Does anyone know whether the ASP.NET process is running as a WindowsService? If it is, then what's the ServiceName? Thanks for any replies:)
0
by: John Smith | last post by:
How do I retrieve the ServiceName of the service I am currently running programmatically? I have a class that I have created that I want to programmatically get the name of my current service. ...
0
by: Paul Chapman | last post by:
I have created a service with an installer in Visual Studio 2005 C# and it works just fine. The service simply runs a program with given parameters. I now want to duplicate the service to enable it...
1
by: =?Utf-8?B?U3ludGF4IDM3NzA3?= | last post by:
I have found lots of people talking about this issue, but no one seems to have a solution. I could really use some help here. Has anyone seen this or have any ideas? I have been running the...
12
by: Shadlan | last post by:
Hi. I need to know if a service is running on my server. Is there any PHP instruction that I can use to do this?
4
by: mmaslar | last post by:
I'm writing a Windows Service. When it starts running, "Service started successfully." is written to the Event Log, w/ a Source of "Service1". Cool -- this happens by default. I'd rather a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.