Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have written a service which logs to the Windows Event Log when it has any problems. This works fine and the service name is shown correctly in the Source column of the Event Viewer. The problem I am seeing is when my service hits some major problems like the networking layer has died etc. When this happens the event log shows errors about my service but the service name is shown as a truncated 8 character name. This name looks to be that of the executable and not the service name. Is this normal behaviour for a truncated name to be show ?

share|improve this question

Services in XP have two names, the long friendly 'Display' name that you see when you open the Services MMC, or type "NET START" at the command line, and a shorter 'Service Name' that's used internally.

If you open the Services MMC (from Control Panel -> Administrative Tools -> Services) and then double-click a service that has a long name, you should see the "Service Name" at the top of the window, which is generally a shorter version of the "Display Name" that's far more script/command line friendly.

For instance it's much easier to type net start RDSessMgr than net start "Remote Desktop Help Session Manager"

It sounds like your app is echoing it's Service Name to the log rather than the Display Name.

share|improve this answer

What version of Windows are you using? I found that process names were limited to a certain number of characters under Windows 2000 Task Manager - Event Viewer might have the same problem. XP seemed to remove the limit though.

share|improve this answer
I am seeing this under Windows XP. – Retrocoder Nov 4 '09 at 8:34

You must log in to answer this question.