Click here to Skip to main content
15,947,958 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there!

I need to save and restore desktop icons on Windows 8.1 x64. There is the solution but it actualy doesn't poperply work on my PC. Unfortunately I'm unable to determine what's the problem because the structure of the project is very complicated for me (the author uses xaml, deigates, etc.) because I'm a newbie on C#.

So I want to ask you maybe there is a ready solution on any programming language that solves that problem?
Or maybe has investigated this question and know in what direction to go?

Thank you!

P.S. I know about ready utilities like DesktopOK but i need a script or a code to be compiled.

What I have tried:

Actually I found out the solution but it's awful. As known information about desktop icons position contains in HKCU\Software\Microsoft\Windows\Shell\Bags\1\Desktop\ItemPos###, where "###" - Desktop resolution.

So all you need is:
1. Export HKCU\Software\Microsoft\Windows\Shell\Bags\1\Desktop
2. Kill explorer.exe process
3. Import HKCU\Software\Microsoft\Windows\Shell\Bags\1\Desktop
4. Start explorer.exe process

So it's really easy to release on any program or script language. But killing explorer.exe is not true programming way...
Posted
Updated 9-Feb-16 12:31pm
v3

1 solution

Ivan's solution (the one you link to) seems to contain most of the 'net 'wisdom'' out there on doing this - I wonder why it doesnt work for you (restoring) - I wouldnt be worried about xaml, delegates etc, I would have thought the salient bits and pieces you need would have no need for that and could be abstracted out ( ie maybe he uses xaml for his demo utility ?)

I found 2 links, the first running off to 'delphi', ugh, the text is hard to read

Torry's Delphi Pages[^]

but the second may help, a c++ utility - you could create a c++ dll for example and p/invoke that from c# or just see what it does in c++ and model the workings in c#

IconSort: save/restore the position of the icons on your desktop. | Reviews, news, tips, and tricks | dotTechdotTech[^]


bvgger ! the 2nd link's downloads are unavailable - looks like the site is awol :-(
 
Share this answer
 
Comments
The_Immortal 10-Feb-16 14:21pm    
The first link contains is non-readable text :(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900