保存并恢复桌面图标 [英] Save and restore desktop icons

查看:95
本文介绍了保存并恢复桌面图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!



我需要在Windows 8.1 x64上保存和恢复桌面图标。有解决方案但它实际上并没有在我的电脑上工作。不幸的是我无法确定问题是什么,因为项目的结构对我来说非常复杂(作者使用xaml,deigates等)因为我是C#的新手。



所以我想问你是否有一个现成的解决方案可以解决这个问题的任何编程语言?

或者可能调查过这个问题并知道要走哪个方向?



谢谢!



PS我知道像desktopOK这样的现成实用程序,但我需要编译脚本或代码。



我尝试过:



实际上我发现了解决方案,但实在是太糟糕了。由于有关桌面图标位置的已知信息包含在HKCU \Software \ Microsoft \ Windows \ Shell \ Bags \\\\Desktop \ItemPos ###中,其中### - 桌面分辨率。 />


所以你需要的是:

1.出口HKCU \Software \ Mycoftoft \ Windows \Shell \ Bags \ 1 \Desktop

2.杀死explorer.exe进程

3.导入HKCU \Software \ Microsoft \ Windows \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\桌面

4.启动explorer.exe进程



所以在任何程序或脚本语言上发布都非常容易。但是杀死explorer.exe并不是真正的编程方式...

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

推荐答案

Ivan的解决方案(你链接到的那个)似乎包含了大部分'网络'智慧' 在那里做这个 - 我想知道为什么它对你不起作用(恢复) - 我不会担心xaml,代表等等,我会认为你需要的显着的点点滴滴没有必要,可以抽象out(也许他可能会使用xaml作为他的演示实用程序?)



我找到2个链接,第一个跑到'delphi',呃,文字很难阅读



Torry的Delphi页面 [ ^ ]



但第二个可能会有所帮助,一个c ++实用程序 - 你可以创建一个c ++ dll,例如p /从c#调用它或者只是看看它在c ++和mod中做了什么el c中的工作情况



IconSort:保存/恢复桌面上图标的位置。 |评论,新闻,提示和技巧| dotTechdotTech [ ^ ]




bvgger!第二个链接的下载不可用 - 看起来网站是awol: - (
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 :-(


这篇关于保存并恢复桌面图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆