How to find the short names of services

This article was previously published under Q271362
This article has been archived. It is offered "as is" and will no longer be updated.
Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows XP and Windows Vista
This article describes how to determine the short name of a service, which you can use at a command prompt or in a batch file.
More information
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

You can locate the short service name by means of the graphical user interface (GUI) in Windows 2000 and through the registry in Windows NT 4.0.

Also, you can use a script in combination with Windows Management Instrumentation (WMI) with both Windows 2000 and Windows NT 4.0 to output all services, including the display name, the short name, and the current state of the service.

Windows 2000 GUI location

Most locations in the Windows 2000 GUI list the display name of a service (for example, Computer Management); however, you can locate the short service name by performing the following steps:
  1. Click Start, and then point to Programs.
  2. Click Administrative Tools, and then click Services.
  3. Right-click on a service in the list in the right pane, and then on the Context menu, click Properties.
  4. On the General Tab of the selected service's properties, the short name of the service is given by the entry following Service Name. The following table provides examples of some display names of Windows 2000 services:
Display NameShort Name
Routing and Remote AccessRemoteaccess
DNS ServerDns
DNS ClientDnscache
Windows Management Instrumentation Driver ExtensionsWmi

Finding the Service Name (the Short Name of a Service) in Windows NT 4.0 (in Windows 2000 This Is Not Necessary)

In Windows NT 4.0, the short service name is not viewable in the GUI; however, you can use the display name to find the short name by searching the registry. To do so, perform the following steps:
  1. Click Start, point to Settings, click Control Panel, double-click Services or at a command prompt, run the net start command. Then locate the display name of the service you want. For example, in Windows NT 4.0 running Routing and Remote Access, the net start command correlates the service with the name "Routing and Remote Access Service".
  2. Start Regedit and select the following registry key:
    My Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
  3. Using the Edit/Find feature, search for the "Routing and Remote Access Service" string. Click to select the Data check box and click to select the Match Whole String Only check box in the search options. The DisplayName value is displayed with the "Routing and Remote Access Service" string. The name of the key in which this value is displayed is the short name of the service.

    For example, the DisplayName "Routing and Remote Access Service" is located in the "router" key. Therefore, the name of the short service name is "Router".
The following table provides examples of some display names of Windows NT 4.0 services:

Display NameShort Name
Routing and Remote Access ServiceRouter
Microsoft DNS ServerDns
TCP/IP NetBIOS HelperLmhosts
Windows Internet Naming ServiceWins

NOTE: The display or the short service name may be different between Windows NT 4.0 and Windows 2000. For example, in Windows 2000, the Routing and Remote Access service's display name is "Routing and Remote Access" with a short name of "Remoteaccess". In Windows NT 4.0, the display name is "Routing and Remote Access Service" with a short name of "Router".

At a command prompt, you can start and stop the Microsoft DNS Server service (NT 4.0) or DNS Server service (Windows 2000) by using the net stop dns&net start dns command.

Using a Visual Basic Script in Combination with WMI on Windows 2000 or Windows NT 4.0

You can run the following script with the cscript services.vbs command from a command prompt in Windows 2000 and Windows NT 4.0 (after WMI is installed):

NOTE: This is an example of a script using WMI and the script should only be used at the command prompt. Copy this sample information into Microsoft Windows Notepad and name the file "Services.vbs":
'********************************************************************'* File:        services.vbs'* Purpose:     display service information on a computer using WMI '* Requires:    WMI to be installed on server specified'* Revisions:   Initial development - 01/08/01, tonymu'* Disclaimer:  This code is to be used for sample purposes only'*              Microsoft does not guarantee its functionality'********************************************************************'Known Issues:'   The following error will be returned if WMI is not installed'        <path-to>\services.vbs(23, 1) Microsoft VBScript runtime error: ActiveX component can't create object: 'GetObject'Dim oArgs, strServerName, oServiceSet, oWshNetworkSet oArgs = WScript.ArgumentsIf oArgs.Count > 0 Then   strServerName = trim(oArgs(0))Else   strServerName = "LocalHost"End IfSet oServiceSet = GetObject("winmgmts:{impersonationLevel=impersonate}!//" & strServerName & "/root/cimv2").InstancesOf("Win32_Service")If strServerName = "LocalHost" Then   Set oWshNetwork = WScript.CreateObject("WScript.Network")   WScript.Echo "Service Information retrieved from " & oWshNetwork.ComputerName   Set oWshNetwork = NothingElse   WScript.Echo "Service Information retrieved from " & strServerNameEnd IfWScript.Echo String(75, "_")For each Service in oServiceSet	WScript.Echo	WScript.Echo "   " & Service.Description	WScript.Echo "      Short Name:    " & Service.Name 	WScript.Echo "      Current State: " & Service.StateNextWScript.Echo String(75, "_")Set oServiceSet = Nothing				
To obtain the DisplayName or the ServiceKeyName for a service, you can use Sc.exe. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
251192 How to create a Windows service by using Sc.exe

Article ID: 271362 - Last Review: 12/05/2015 21:23:17 - Revision: 4.0

Microsoft Windows 2000 Server, Microsoft Windows 2000 Advanced Server, Microsoft Windows 2000 Professional Edition, Microsoft Windows NT Server 4.0 Standard Edition

  • kbnosurvey kbarchive kbenv kbhowto KB271362