The issue – Denial of access permission on the certain registry entries causes lsclean to fail. When RMS server starts, it creates these registry entries for persisting some information and assigns the default permissions to these entries. It may be that that some external application had changed the default access permission of these entries or it’s root entry.
Solution – Add the following two entries to a txt file, and use the regini command in command prompt on that text file to add these to the registry.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Ntpad\HELPMENU [1 5 10 21]
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Ntpad [1 5 10 21]
This will elevate the registry permissions to let lsclean clean the persistence.