Windows saves the desktop icon layout when the user logs off, and the setting is read during logon. Recently I came across a case where the desktop icons rearrange to their default positions after a restart or logoff/logon cycle. This turned out to be a Permissions issue with a registry key, which kept Windows from writing to it. Here are some fixes for this issue, applies to all versions of Windows including Windows 10.
Using Windows 10? Try these steps first
Recently more number of these cases have been reported; that the desktop icon position and folder views are not retained, is caused by a malware which modifies the following registry key:
Start Regedit.exe and go to the above location. Double-click (default) and set its value data to:
Repeat the same in the following registry path:
Then, delete the following branch at the HKEY_CURRENT_USER hive, not the one in HKEY_CLASSES_ROOT.
(The following branch is to be deleted irrespective of the Operating System you use.)
Exit the Registry Editor.
REG File to automate the above three tasks: Download w10-desktop-icons-guid-fix.zip and save to desktop. Run the REG file to apply the contents to the registry.
Note: If you’re unable to change the value data and getting a permissions error, you need to take ownership of the above registry locations, and then update the value data. For information on how to change ownership, refer article Take ownership of a registry key.
Fixing the desktop folder views registry key (all versions of Windows)
Step 1: Terminate Explorer (Shell) Cleanly
In Windows 8 and 10:
Press and hold the CTRL & SHIFT keys, and right-click on an empty area in the Taskbar. Click the Exit Explorer option.
In Windows Vista & Windows 7
Click Start. Press and hold the CTRL & SHIFT keys, and right-click on an empty area in the Start menu. Click the Exit Explorer option.
In Windows XP:
1. Click Start, Turn Off computer.
2. Press and hold the CTRL, ALT and the SHIFT keys, and click the Cancel button.
For more information on restarting the Explorer shell, visit these pages:
- Exit Explorer and Restart Explorer in Windows 10 and Windows 8?
- Terminate and Restart Explorer.exe Process Cleanly in Windows 7 & Vista
- Terminate and Restart Explorer.exe Process Cleanly in Windows XP
Step 2: Fix Registry Key Permissions
1. Switch to Registry Editor window, and navigate to the following key:
2. Right-click on the Desktop key, and choose Permissions
3. Click Advanced, and delete any "Deny" entries if present.
(While you’re in that screen, make sure that your user account has "Full Control" (Allow) Permissions for the registry branch.
4. Click OK, OK.
5. See if you can create a sample registry value in the Desktop key to test if you can write to the branch.
Step 3: Reset the Desktop Icon Layout Registry Key
This step is required only if the problem remains unresolved although you’re able to write to the Desktop registry key.
1. Using the Registry Editor, rename the key Desktop to Desktop.Old
2. Exit the Registry Editor
3. Press CTRL + ALT + DEL to open Task Manager
4. From the File menu, click Run. Type Explorer.exe and press ENTER
Customize the desktop icons layout as you require, restart Windows and check if the icon positions are retained.
About the author
Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and has a vast experience in the ITeS industry — delivering support for Microsoft's consumer products. He has been a Microsoft MVP [2003 to 2012] who contributes to various Windows support forums.