How to Rename a Windows Service

I came across a situation where I wanted to rename a Windows service that had already been installed.  (In this case I wasn’t able to rebuild the application to alter the service installation properties, which would of course be the ideal solution.)  Google was spectacularly unhelpful, so this is how you do it:

Open RegEdit.

Navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices.

Find the key for the service you want to change and simply rename it.

RegEdit screenshot

A reboot was necessary for the change to take effect in the Services snap-in.

You may also encounter a sub-key called DisplayName that you can change.  This is not the same as the key above.  When using “net start” and “net stop,” for example, you need to refer to the key name above.

DisplayName screenshot

I did this on Windows XP and Windows Server 2003; presumably it will also work in Vista, etc.

STANDARD REGEDIT DISCLAIMER:  Do not attempt this unless you know what you’re doing.  The consequences of a mistake could be disastrous.

33 Replies to “How to Rename a Windows Service”

  1. This doesn’t seem to work for me. Changing the display name does but when the registry key name is changed the service will not start. This makes sens to me since the name – which translates to the key name – is a part of the executable.

  2. Not sure why it isn’t working for you. All I did was rename the registry key and reboot (it was done to 3 different services, all .NET programs). I probably made sure the service was stopped first, too. This was on Windows Server 2003, haven’t attempted on any other versions.

  3. If you have a subkey named Enum, you should delete that also. When you start the service up next time, it will recreate with the correct information.

  4. Check your Windows Event viewer for the error given. It might be you adminstrator password for the service may need to be typed again

  5. Unfortunately there is a mistake with this advice. This is actually wrong place to change the service name. This is just the directory Windows looks up for the service. You should change the actual Displayname and the restart the machine.

  6. Rick, your incompetence shouldn’t be translated into insulting others. The exercise worked for me and for others. The problem is between your ears me thinks.

  7. Thanks to the author for documenting this so clearly. The procedure worked perfectly for me, exactly as described. In my case I needed to change both the display name and the actual service name, because both were involved in functions used by the controller for the service I was using. Rebooting was necessary.

  8. This will not work if the service hard-codes its own name, and looks for that name during operations such as startup and shutdown. The rename will appear to work — that is, it will display correctly in the Services list — but any operation will fail with a timeout.

  9. It’s worked for me, but need to be change in 2 other position in this section.
    This section is service depending.
    I changed from MySQL56_1 to MySQL.

  10. I changed the DisplayName and the name of .exe file in this registry, but I did not change the name of the actual folder for the service. Everything works fine, except the service will no longer start automatically even though the startup mode is Automatic. I have to go into services.msc and start the service manually, and then everything works fine. The service now has a different name in services.msc, a different description, and a different .exe filename in Task Manager which is everything I wanted. It just won’t start automatically anymore, any ideas? Thank you.

  11. #Rick, #Kent,… this is a Free, Voluntary piece of Very Useful Info that worked for me and many others here.
    Why do you have to prove you incivility and incompetence when something like this is given to you for free??
    Go back to the rock you came out of.

  12. Wow, I had no idea so many people had been here, and I didn’t even realize this old creaky blog platform could still accept comments. 😮 I’m glad I was able to help some people out. I’m sorry it didn’t work for some of you, but all I can say is that it worked for me at the time. Unfortunately with Windows there could could be a hundred different reasons that something doesn’t work. Thanks all.

  13. Tom, I refer people to this page on a regular basis when people are installing “Sentinel RMS” and the service already exists for another vendor causing the installation to fail. It’s a great source of information. Thank you so much…

  14. This method does work, with some caveats.

    #1 is that if your service is configured to logon with a user/pass, you will need to re-enter that information.

    #2, you must reboot after changing this.

    #3, make sure you’re in the CurrentControlSet, not 001 or 002 since you probably don’t know which of those is actually the current one.

    #4, changing the display name is nice, but some utilities only look at the service name, not the display name (ever tried using SC.exe to query/stop/start a service by the display name?) So yes, there is a use case for this.

    #5, you do this at your own risk, obviously. Worst case you could try changing it back, but the security subkeys in enum/root might laugh at your failback plan.

    #6, if you have any choice in the matter, re-install the service with the right name.

    #7, don’t forget, there are probably other places in the registry where that old service name was used (services/eventlog/…)

    #8, did I or others mention sc.exe? Yup… it can often create a service in a generic way even if the original service installer for whatever ancient thing you’re running is long gone. Use it to create a new service with the name you like and if there are any other settings missing that seem important, manually create those reg values if you think it’ll help.

    #9, relax… it’s free advice, take it or leave it but don’t be a d*** about it

  15. This worked great for me Thank You Tom.

    I just have one suggestion.

    I always, always, always export my registry before editing it and suggest all of you do too.

  16. Worked for me too. Just do as what he said, reboot then reenter the service accounts on the Log on tab of your service’s properties. Thanks man!

  17. This worked very well for me i needed to rename a service so i could perform an update and then rename it again. thanks Tom

Leave a Reply

Your email address will not be published. Required fields are marked *