— Garth P
A service actually has two names — the “Service Name” and the “Display Name”.
Both names are prominently displayed in the Services utility:
The Service Name
The Service Name is the unique identifier of the service. As a result, no two services can have the same Service Name (even with differing case).
And Windows restricts the Service Name in a couple other ways too, specifically:
Its maximum length is 256 characters.
Forward-slash (/) and back-slash (\) characters are not permitted.
So the Service Name is the “real” name of the Windows Service.
All command line programs — including the built-in NET and SC utilities — will accept the Service Name as an identifier of the service. And the Service Name identifies the service in the Windows Registry (in < HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services).
However, because Service Names are used in command line operations, they tend to be terse, technical and downright cryptic. To illustrate, here the Service Names of five important services installed on Windows 10:
Only the Windows OS geeks among us will be able to guess what those services do! 🙂
The Display Name
To counteract the caginess of the Service Name, the Display Name records a “friendlier” value, mainly for user interface programs to identify the service. For example, here are the corresponding Display Names of the services listed above:
User Profile Service
TCP/IP NetBIOS Helper
More meaningful, right? When picking from a list, it’s almost always better to show the Display Name instead of the Service Name. That’s what the Services utility does.
Note that the length of the Display Name is also limited to 256 characters but all characters (including forward-slash and back-slash) are allowed.
And perhaps surprisingly, there is no issue with two services having the same Display Name. However, that can be troublesome for lists that rely on Display Name, as we see here with Services:
So which name would you like to change? The Service Name or the Display Name? Or both?
How to change the Service Name
Unfortunately Microsoft has not provided a great way (i.e. an API) for changing the Service Name. No operating system tools will allow you to change that value — not SC, Services or any other application.
However it is possible to adjust the Service Name — provided that you don’t mind working with the Windows Registry.
To change the Service Name:
Open the Registry Editor.
To do so, press the Windows + R keys to open the Run window, and then type regedit.
On the left, navigate to the section where Windows Services are recorded:
Open the Services key to reveal all the services installed on your computer. The list is sorted alphabetically by Service Name:
Find and highlight your service in the list.
Right-click the entry and choose Rename:
Enter the new name. Remember: limit the length to 256 characters; forward-slashes and back-slashes are not allowed.
Reboot your computer. The new Service Name will not take effect until Windows restarts.
How to change the Display Name
Here are a three ways to change a service’s Display Name.
1. Using the SC command
Run this command from an elevated command prompt:
For example, we have updated the Display Name of the Spooler service:
2. With PowerShell Set-Service
If you prefer PowerShell, the Set-Service cmdlet will do the trick:
As you can see, PowerShell works just as smoothly as SC:
However, be sure to run from a PS prompt with administrative rights, to avoid the dreaded “access denied” error.
3. Updating the service’s registry key
Finally, you can roll up your sleeves and modify the registry value directly.
DisplayName is a REG_SZ (string) value contained in the service’s registry key:
Double-click the “DisplayName” to set a new value:
The new value will take effect after a reboot.
Best of luck with your customers!