36

Where do Windows XP/Vista/7/... save the positions of the icons on the desktop? Is there a built-in way to save the positions? Can I lock the position of certain items?

Ramhound
  • 44,080
bot47
  • 1,922

7 Answers7

25

They are located in the registry under HKCU\Software\Microsoft\Windows\Shell\Bags\1\Desktop.

The key that should interest you is the ItemPosXXXxXXX(where XXX is your resolution).

enter image description here

The relevant values are Mode, LogicalViewMode, IconSize.

You can combine them as shown in the table:

Style       Mode    LogicalViewMode  IconSize
X-Lg Icons  5       3                0x100
Lg Icons    5       3                0x60
Med Icons   5       3                0x30
Sm Icons    2       3                0x10
List        3       3                0x10
Details     4       1                0x10
Tiles       6       2                0x30

Update

Fortunately found an article that can help you. See: Windows Shellbag Forensics.

J. Scott Elblein
  • 541
  • 1
  • 6
  • 21
stderr
  • 10,569
  • 2
  • 36
  • 50
4

Windows icons tend to move around, especially when screen resolution changes, yet contains no built-in tools to undo such changes.

As registry information may vary for different versions of Windows, better use a third-party utility rather than attempting to do it yourself.

An excellent utility to keep the icons in their place is the free and very versatile Iconoid.

image

harrymc
  • 498,455
2

The icon positions are stored in the registry. Unfortunately I don't have the exact location.

You could use this link to fix the position of the icons: http://www.howtogeek.com/howto/windows-vista/save-and-restore-desktop-icon-layout-in-windows-vista/

It adds two entries to the context menu when you click your desktop: Save Desktop Icon Layout and Restore Desktop Icon Layout.

You can save the current position of the icons. If something messes up the order you can restore them to the saved location.

MonkeyDreamzzz
  • 433
  • 4
  • 7
2

Try export this key:

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

Then re-arrange your desktop, etc., then re-import.

J. Scott Elblein
  • 541
  • 1
  • 6
  • 21
1

I had similar problems - the import would not change anything. Then tried the below steps and it worked on Win 7:

  1. Export the registry entry
  2. Re-arrange one or more icons for testing
  3. Kill explorer.exe (using Task Manager or any other way)
  4. Import the previously exported registry entry
  5. Re-start explorer.exe Voila - the icons are restored as per the imported registry entry.

Key step for the above to work were step#3 & 5.

1

The best application out there is 'DesktopOK'. Its free and saves icon positions at specific resolutions so they don't screw up when you RemoteDesktop to your PC. Saves an unlimited amount of states.

0

I tried every remedy to the icon scrambling problem documented in perhaps a dozen relevant threads.  Nothing worked. Then, I tried the export  /  import trick mentioned in Ben Lavender’s answer.  This didn’t work either; not at first.  But then a strange notion popped into my head.  I added a slight twist gleaned from another conversation.  To my delight, the slightly revised procedure worked.  Here’s the exact sequence of operations:

  1. Export the HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop key (as specified in Ben Lavender’s answer).
  2. Arrange the desktop with appropriately-sized icons in their desired locations.
  3. Right click and select “Refresh” from the local menu.
  4. Import the saved registry key.

Step #3 made all the difference between failure and success.