Is there a way to rename a windows service? Not the display name, mind you, the actual name. I can't seem to edit the value in enum\root to be what I want, and there ought to be an easier way, I just can't find it!
3 Answers
IIRC the following worked for me (once):
This is nothing I ever would recommend doing
This is what I did
- open regedit
- navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
- Look at the keys in the treestructure inside the left pane and select the service you would like to rename
- Rename the key using the
Rename
entry in the Context-Menu - If there is a subkey named
enum
delete it. It will get recreated the next time the service starts. - You might want to change the Subkey
DisplayName
according to the new service name - Reboot the machine for changes to take effect
- Pray it did not screw things up
Use SC.exe Create to create a new service in Windows with the paramaters that you want. Then use SC.exe Delete to delete the old service.
SC is a command line program built in to Windows that is used for communicating with the Service Control Manager and services.
-
1I disencourage you to answer old posts without adding some value add, and even not really answering the question. The question is about to rename a service, and create a new one and delete the previous could be used as a comment but seems to be a poor answer. Jun 10, 2015 at 15:44
-
I don't aggree with alphamikevictor. The info is useful for the question. Apr 4, 2019 at 13:29
The permissions on ENUM/Root are quite strict, besides I believe it's a dynamic area controlled by Windows. The place you want to be looking is HKLM\System\CurrentControlSet\Services.
-
Yeah, I tried editing that, but the services menu just declared that a registry key was not found :^)– NateNov 9, 2010 at 20:48
-
You don't say what your service is doing, but you could capture the existing service's parametes as a .REG file, remove the existing service and create a new one using SC.EXE. Then edit the .REG to rename the "key" entries ([HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\<name>\...], plus remove any system generated stuff (password hash, etc). Re-import and reboot. Alternatively, manually add the display name, dependencies, Etc. Of course, I'd test on a VM first ;-) Nov 9, 2010 at 20:59