I have hard links into system files advapi32.dll, kernel32.dll and etc.
I have used MoveFileEx API for deletion with MOVEFILE_DELAY_UNTIL_REBOOT, it basically uses HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager::PendingFileRenameOperations registry to delete during reboot. I have also included AllowProtectedRenames hack.
Without AllowProtectedRenames there have been many failures, but with this set, there are still a few files (hard links) that cannot be removed in Windows 10.
I wonder if there is any way to get rid of such links without loading external OS, as this issue is in multiple machines.