Fix for Desktop Icons Layout Not Getting Saved Upon Restarting Windows

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. Are you experiencing the same problem in your Windows XP/2003/Vista/7/8/10 PC? If so, here is a solution that you can give it a go.

Using Windows 10? Try this 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 %SystemRoot%\system32\

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 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.

Step 1: Terminate Explorer (Shell) Cleanly

Instructions for Windows XP

1. Click Start, Turn Off computer.

2. Press and hold the CTRL, ALT and the SHIFT keys, and click the Cancel button.

Instructions for Windows 7 & Vista

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.

Instructions for 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.

For details, visit these pages:

  1. Exit Explorer and Restart Explorer in Windows 10 and Windows 8?
  2. Terminate and Restart Explorer.exe Process Cleanly in Windows 7 & Vista
  3. Terminate and Restart Explorer.exe Process Cleanly in Windows XP )

The above step causes Windows Explorer (shell) to terminate cleanly.

Step 2: Fix Registry Key Permissions

1. Switch to Registry Editor window, and navigate to the following key:

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ Shell \ Bags \ 1 \ Desktop

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 something else, say OldDesktop

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

5. Customize the desktop icons layout as you require, restart Windows and check if the icon positions are retained.

19 thoughts on “Fix for Desktop Icons Layout Not Getting Saved Upon Restarting Windows

  1. When I went to those registry keys, the values I was supposed to change were already what you said I was supposed to replace them with. However, I still have the desktop icon problem. Any ideas?

  2. I am using virtual XP (VXP) on a windows 7 machine.

    I’m stuck at the step, “1. Click Start, Turn Off computer.”

    In VXP, when I click Start, the only option I have is to “Log Off (user name)”.

    So how do I get past the first step of this fix?


  3. OS: Vista Home Premium (64 bit).

    I had fixed auto-arrange problem maybe a year ago with a 3rd party program, LAYOUT.DLL and associated key LAYOUT.REG. Last week after removing some malware (which wasn’t a virus and didn’t seem to be causing a problem but turned up in a scan), the problem reappeared.

    I originally thought auto-arrange had come back after running Memory test and Drive test, but that’s only when I discovered it because of the restart. Can’t say whether icons were rearranged after Memory Test because I didn’t have to look at the icons to run Drive Test. When I started Memory Test I hadn’t recently rebooted so can’t say the problem definitely preceded it.

    Besides removing malware, I had installed one seemingly unrelated Windows update, which was only for Windows Defender.

    I tried merging again LAYOUT.REG, which made no difference. Then I tried System Restore, which made Windows Defender complain that it needed to update but otherwise made no difference. I am certain that the icon defaulting problem did not precede that restore point, since it was from only about 12 hours before and the problem is anything but subtle. I turn the computer off when I’m not using it.

    I’ve tried everything in this blog (permissions were all OK so no change there) up to and including renaming the Desktop key to OldDesktop and restarting Explorer. Now I’m really puzzled! Not only did it make no difference in the layout behavior, but I really expected Explorer would create a new Desktop key. It didn’t (yes, I refreshed the regedit display)!

    I believe LAYOUT.DLL is still working to some extent because if I enable auto-arrange or disable snap-to-grid and then restart Explorer I find those settings restored (but the icons defaulted).

    I’m not a real Windows geek, just an experienced user with a problem. I use regedit only when I have trustworthy-looking instructions to follow.

    CCleaner found a lot of registry issues, and I let it fix the ones I understood. The rest were missing shared dll’s for iTunes, invalid firewall settings (which I don’t dare fix because it took me a long time to get Vista, XP and 7 to talk to each other), unused file extensions (which I fixed with discretion) – nothing obviously related to this problem.

    I’ve found this blog quite instructive even though I still have this rather aggravating problem. I’d been using Restart and later Task Manager to exit/restart Explorer until I found here the right way to do it.

    Anything else I can try do to fix it?

  4. what exactly was the fix here ?????, all i seem to have done was to delete any denied entries and make sure my account was allowed, which it was.

  5. To run a program without Explorer running, give it the three key (Ctrl-Alt-Del) and from the next screen you see, Start Task Manager. In Task Manager’s Applications tab, press the New Task button. This will give you a dialog where you can enter the name of a program (like explorer.exe).

Comments are closed.