MIDI-OX User Forum (http://www.midiox.com/cgi-bin/yabb/YaBB.pl)
General >> Desktop Icon Save and Restore >> Where does windows store it, anyway?
(Message started by: technogirl on May 19th, 2008, 7:45pm)

Title: Where does windows store it, anyway?
Post by technogirl on May 19th, 2008, 7:45pm
Did you find out, while you were writing this, where windows stores the desktop icon location? I mean, is it in a file like desktop.ini or is it in registry values, or what? No one seems to know.

Title: Re: Where does windows store it, anyway?
Post by Jamie OConnell on May 23rd, 2008, 5:01pm
No, I haven't figured out where Windows stores it, but I did figure out how Windows hosts it: Explorer treats the desktop like a large List View control in report mode (with no scrollbars).  If you get a handle to the Desktop SysListView, you can use standard ListView access methods to see where the icon are or move them around.  Of course, you also have to be running in the same process as Explorer (this is why Desktop Restore is a ShellExtension), or use alternative techniques to share memory with Explorer.

[Later...]  Since you asked, I poked around the registry, and think I have the likely area where it's stored:
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop

Look at one of the binary blob values set to your current resolution.  For instance, on mine it is named, "ItemPos1680x1050(1)".  I have others for "ItemPos1280x960(1)" and "ItemPos1024x768(1)".  It looks like both ascii short filenames and UNICODE long filenames are stored as well as other stuff (position? ...)



MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.