FileRisk: Do not touch
- Hidden
UsrClass.dat C:\Users\<utilisateur>\AppData\Local\Microsoft\Windows\UsrClass.dat
Registry hive for the user's HKCU\Software\Classes: file associations and COM registrations specific to the profile; locked during the session.
What it’s for
UsrClass.dat is the hive file that backs the user’s HKEY_CURRENT_USER\Software\Classes key. It complements NTUSER.DAT. It contains user-specific class data: file type associations, per-user COM registrations and Explorer interface settings. When the profile loads, it is mounted under HKEY_USERS\<SID>_Classes.
What it contains
A binary file in registry hive format, with transaction files (UsrClass.dat.LOG1, .LOG2) in the same folder. It is hidden and a system file. Depending on use, it may also keep traces of folder navigation (Explorer view settings).
Risks and best practices
- A corrupted or missing
UsrClass.datbreaks file associations, crashes Explorer or prevents sign-in. Do not swap the file: for a corrupted profile, create a new profile and migrate the data. - The file is locked while the user is signed in. To open it, load the hive with Regedit or
reg loadfrom another session, on a copy, after a backup. - It keeps traces of user activity (Explorer view settings, for example), so treat any copy as personal data.
- Back up the whole profile rather than this file alone.
Useful commands
# File presence and date (hidden, read-only)Get-Item -Force "$env:LOCALAPPDATA\Microsoft\Windows\UsrClass.dat*" | Select-Object Name, Length, LastWriteTime, Attributes
# Hives loaded for signed-in usersGet-ChildItem Registry::HKEY_USERS | Select-Object Name
# Read a class key of the current user (example: .txt association)Get-ItemProperty 'HKCU:\Software\Classes\.txt' -ErrorAction SilentlyContinue