Save and Restore Desktop icon layout in Windows

When testing various display resolutions or after completing a remote desktop session, the desktop icons may go out of order. Another case is that when you accidentally use the Ctrl+ Scroll button (mouse) on your desktop, the Desktop icon size changes.

But reverting to the original icon size may not restore the custom icon positions on your desktop. You can quickly undo the icon rearrangement by terminating explorer.exe forcefully, but that works only in certain circumstances.

DesktopOK, a standalone program for all versions of Windows (for both 32 and 64-bit), is a handy program that can save multiple configurations of your desktop icons layout and restore a specific setting when needed.

Save and Restore Desktop icon layout in Windows

DesktopOK is a portable program from that works perfectly in Windows 10. There are separate downloads for 32-bit and 64-bit editions.

desktop icon layout desktopok

From the Options menu, optionally you can enable these two settings:

  • Save and restore icon spacing
  • Save and restore icon size

Click the Save button, and the current screen resolution will be the name of the stored setting, followed by the date/time stamp. You can change the naming style in Options if you want.

There is also a button named “Punch the icons (random position)” that scatters your desktop icons in random. After scattering you can use the Restore button to rearrange them from an earlier backup if you want to test.

By default, the saved desktop icon settings are stored in a file named DesktopOK.ini in the following location. Alternately, you can also export the desktop icon configuration to a .dok file via the DesktopOK menu option.


There are additional settings available under the Options tab, like “auto-save” at pre-defined intervals and so on. Unlike other programs, DesktopOK is portable and doesn’t add a shell extension. DesktopOK may come in handy if Windows forgets your desktop icons position sometimes, or if explorer crashes and resets the desktop icons position to default.

DesktopOK Command-line Options:


DesktopOK.exe /save /silent c:\icon_lay.dok
DesktopOK.exe /save "c:\long path name\icon_lay.dok"

DesktopOK.exe /load /silent c:\icon_lay.dok

/silent = don't show error messages
/spacing = save icon spacing
/size = save icon size
/report = Displays a list of unresolved/found symbols in conjunction with /load
For example: DesktopOK.exe /load /report c:\icon_lay.dok

The file name must end with *.dok. This is a teeny overwrite protection for the other system files.

Date, time and resolution
/save c:\save_dok\_date_time_res_.dok

or (Date and time)
/save c:\save_dok\_date_time_.dok

Silent install
/silent -?install

Src: DesktopOK command-line documentation:

Windows 7 and Earlier

Microsoft’s layout.dll shell extension (from the Microsoft Windows NT Resource Kit tools) can save and restore desktop icons position on Windows 32-bit computers. The Layout.dll was originally written for Windows NT/2000. It doesn’t work on Windows 64-bit versions.

This extension works well under Windows 2000, Windows XP through Windows 7 32-bit. I haven’t tested this on Windows 10 32-bit OS.

Installing the Layout.dll shell extension

  1. To add the shell extension, download and save it to a folder.
  2. Unzip the archive and extract the files to your Desktop.
  3. Move LAYOUT.DLL to the Windows\System32 folder.
  4. Right-click LAYOUT.REG and choose Merge.
  5. Click Yes when asked for confirmation.

Note: Store the file in a safe location if you need to uninstall the shell extension at a later time. You may use the file uninstall.reg (included in to remove the entries from right-click menu.

Saving and Restoring desktop icon layout

After installing the shell extension, you’ll see two context-menu options namely Save Desktop Icon Layout and Restore Desktop Icon Layout when you right-click on an empty area on the Desktop. (Tip for advanced users: You can implement the shell extension in the My Computer or Folder context menu as well.)

When you click Save Desktop Icon Layout, the Desktop icon positions are saved to a binary registry value, and you see the following message box:

Saving desktop icon layout
Restore desktop icon layout

Uninstalling the Layout.dll shell extension

To uninstall the layout.dll shell extension, right-click the file uninstall.reg (available in and choose Merge. Then manually delete the file LAYOUT.DLL from your Windows\System32 folder.

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support, my reader. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded in 2005.

18 thoughts on “Save and Restore Desktop icon layout in Windows”

  1. Never mind – it is not Win 7 but 64 bit that was the issue. Found the ‘Serge’ app that seemed to work so far.

  2. I have been looking for something like this for a long time.
    Thanks a lot!

    Is the Layout DLL source available?
    Can you divulge the registry entry that is used for the desktop icon position data?

    This appears to work per user.
    I am interested in cloning a desktop to another user.
    I can copy paste the /Desktop folder icons but that doesn’t get you the position information.

  3. Hmm… that’s odd. I tried redownloading again from this site instead of using the one I had downloaded before, and it worked. The previously downloaded file may have been corrupted.

  4. Anybody have an idea how to use this file without implementing it into the registry? (ie call the functions directly in the DLL as needed)

  5. Similar (actually identical) result as John reported: On my Win-7/64-bit machine, this simply does not do a blessed thing. Adds nothing to the right-click context menu. And BTW, the right-click context menu displayed in the example only slightly resembles my right-click menu.

    I would not try Jimmy’s “at your own risk” link because that’s clearly marked for Vista.

  6. Thank you for this, though it only fixes the issue for my icons when not connected to me second monitor, or when connected to it. Not both.
    (So I can save the icons for one, but if I try to “restore” it once I connect/disconnect the second screen, they need to be manually sorted again.



Leave a Comment