Le blogouille de Caro et Nico

Entre famille, sport et aventures !

Rename User folder on next reboot

Getting an access denied, even as admin or system account on a (corrupted) user folder you want to be renamed ? Well you can fix that on the next reboot, with the following trick

Navigate as an admin to the registry key located at :

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager

Create a multiSZ named « PendingFileRenameOperations » (or edit the existing one and add two more lines). The two lines are (and hit enter for a final empty line, so total 3 lines:

\??\C:\Users\profile
\??\C:\Users\profile.old

Save that multiSZ and reboot, the folder will be renamed on next reboot.