Restores missing or broken desktop.ini files for Windows 11 user shell folders.
When desktop.ini files are deleted or corrupted, special folders lose their localized names and custom icons in Explorer. This tool restores them to the Windows 11 defaults.
Desktop, Documents, Downloads, Music, Pictures, Videos, Favorites, Links, Contacts, Searches, Saved Games
Double-click Restore-DesktopIni.cmd or run the PowerShell script directly:
.\Restore-DesktopIni.ps1Changes take effect after re-login or Explorer restart.
- Reads each folder's actual path from the registry (
HKCU\...\User Shell Folders), so custom/relocated folders are handled correctly. - Copies the template
desktop.inifrom this project, converting from UTF-8 to UTF-16 LE with BOM (the encoding Windows requires). - Sets
Hidden + Systemattributes on the file andReadOnlyon the folder, which signals Explorer to honordesktop.ini.
No administrator privileges required.
- Windows 10/11
- PowerShell 5.1+
Unlicense - public domain