图标缓存 vista_Windows Vista中特殊文件夹恢复为默认文件夹图标的修复

图标缓存 vista

图标缓存 vista

My inbox has been flooded with people asking why the “pretty” icons in their user folder keep turning back into regular folder icons, and what they can do to fix it.  After writing the first article about the Music folder, I decided to just put all of the information into a single article.

我的收件箱里满是人问,为什么用户文件夹中的“漂亮”图标会继续变回常规文件夹图标,以及他们可以采取哪些措施进行修复。 在写完有关Music文件夹的第一篇文章之后,我决定将所有信息放到一篇文章中。

Using the same example as last time, the Music folder here is showing the generic folder icon instead of the slick one that it should be using.

使用与上次相同的示例,此处的“音乐”文件夹显示的是通用文件夹图标,而不是它应该使用的光滑图标。

image

The icons that are displayed on the folders are set through the hidden desktop.ini file inside of each folder. The problem is that a lot of applications seem to screw with this file and cause it to become corrupted or otherwise unusable. What we’ll do here is just reset the offending file to the default values that I’ve listed here.

文件夹中显示的图标是通过每个文件夹中隐藏的desktop.ini文件设置的。 问题在于,许多应用程序似乎都将这个文件搞砸了,并导致该文件损坏或无法使用。 我们在这里要做的只是将有问题的文件重置为我在此处列出的默认值。

To open the desktop.ini file, you’ll need to paste this command into the start menu search or run box, which will open the music folder’s desktop.ini file.

要打开desktop.ini文件,您需要将此命令粘贴到开始菜单搜索或运行框中,这将打开音乐文件夹的desktop.ini文件。

notepad %USERPROFILE%\music\desktop.ini

记事本%USERPROFILE%\ music \ desktop.ini

If you wanted to open the desktop.ini file in the pictures folder instead, you’d substitute “pictures” for “music” in the command, like this:

如果要改为打开pictures文件夹中的desktop.ini文件,则可以在命令中将“ pictures”替换为“ music”,如下所示:

notepad %USERPROFILE%\pictures\desktop.ini

记事本%USERPROFILE%\ pictures \ desktop.ini

You’ll see a file that should look exactly like this, but probably does not.

您会看到一个文件,看起来应该完全像这样,但可能并非如此。

image

Select the entire contents of the file and delete it, replacing the contents with the default values that I’ve listed below. (You only need to pick the one that matches the folder you are trying to edit)

选择文件的全部内容并将其删除,然后将内容替换为下面列出的默认值。 (您只需要选择与您要编辑的文件夹匹配的文件夹即可)

Note that you will need to logout and back in to see the changes, or you could just restart explorer.exe if you are feeling ambitious.

请注意,您将需要注销并重新登录以查看更改,或者,如果您感到雄心勃勃,则可以仅重新启动explorer.exe。

Contacts

联络人

[.ShellClassInfo]LocalizedResourceName=@%CommonProgramFiles%\system\wab32res.dll,-10100InfoTip=@%CommonProgramFiles%\system\wab32res.dll,-10200IconResource=%SystemRoot%\system32\imageres.dll,-181

[.ShellClassInfo] LocalizedResourceName = @%CommonProgramFiles%\ system \ wab32res.dll,-10100InfoTip = @ %% CommonProgramFiles%\ system \ wab32res.dll,-10200IconResource =%SystemRoot%\ system32 \ imageres.dll,-181

Desktop

桌面

[.ShellClassInfo]LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769IconResource=%SystemRoot%\system32\imageres.dll,-183

[.ShellClassInfo] LocalizedResourceName = @%SystemRoot%\ system32 \ shell32.dll,-21769IconResource =%SystemRoot%\ system32 \ imageres.dll,-183

Documents

文件资料

[.ShellClassInfo]LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770IconResource=%SystemRoot%\system32\imageres.dll,-112IconFile=%SystemRoot%\system32\shell32.dllIconIndex=-235

[.ShellClassInfo] LocalizedResourceName = @%SystemRoot%\ system32 \ shell32.dll,-21770IconResource =%SystemRoot%\ system32 \ imageres.dll,-112IconFile =%SystemRoot%\ system32 \ shell32.dllIconIndex = -235

Downloads

资料下载

[.ShellClassInfo]LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21798IconResource=%SystemRoot%\system32\imageres.dll,-184

[.ShellClassInfo] LocalizedResourceName = @%SystemRoot%\ system32 \ shell32.dll,-21798IconResource =%SystemRoot%\ system32 \ imageres.dll,-184

Favorites

收藏夹

[.ShellClassInfo]LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21796IconResource=%SystemRoot%\system32\imageres.dll,-115IconFile=%SystemRoot%\system32\shell32.dllIconIndex=-173

[.ShellClassInfo] LocalizedResourceName = @%SystemRoot%\ system32 \ shell32.dll,-21796IconResource =%SystemRoot%\ system32 \ imageres.dll,-115IconFile =%SystemRoot%\ system32 \ shell32.dllIconIndex = -173

Links

链接

[.ShellClassInfo]LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21810IconResource=%SystemRoot%\system32\imageres.dll,-185DefaultDropEffect=4[LocalizedFileNames]Public.lnk=@shell32.dll,-21816Searches.lnk=@shell32.dll,-9031Recently Changed.lnk=@shell32.dll,-32813Music.lnk=@shell32.dll,-21790Pictures.lnk=@shell32.dll,-21779Documents.lnk=@shell32.dll,-21770

[.ShellClassInfo] LocalizedResourceName = @%SystemRoot%\ system32 \ shell32.dll,-21810IconResource =%SystemRoot%\ system32 \ imageres.dll,-185DefaultDropEffect = 4 [LocalizedFileNames] Public.lnk = @ shell32.dll,-21816Searches.lnk = @ shell32.dll,-9031最近更改.lnk = @ shell32.dll,-32813Music.lnk = @ shell32.dll,-21790Pictures.lnk = @ shell32.dll,-21779Documents.lnk = @ shell32.dll,-21770

Music

音乐

[.ShellClassInfo]LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790InfoTip=@%SystemRoot%\system32\shell32.dll,-12689IconResource=%SystemRoot%\system32\imageres.dll,-108IconFile=%SystemRoot%\system32\shell32.dllIconIndex=-237[LocalizedFileNames]Sample Music.lnk=@%SystemRoot%\system32\shell32.dll,-21806

[.ShellClassInfo] LocalizedResourceName = @%SystemRoot%\ system32 \ shell32.dll,-21790InfoTip = @%SystemRoot%\ system32 \ shell32.dll,-12689IconResource =%SystemRoot%\ system32 \ imageres.dll,-108IconFile =%SystemRoot% \ system32 \ shell32.dllIconIndex = -237 [LocalizedFileNames] Sample Music.lnk = @%SystemRoot%\ system32 \ shell32.dll,-21806

Pictures

图片

[.ShellClassInfo]LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21779InfoTip=@%SystemRoot%\system32\shell32.dll,-12688IconResource=%SystemRoot%\system32\imageres.dll,-113IconFile=%SystemRoot%\system32\shell32.dllIconIndex=-236[LocalizedFileNames]Sample Pictures.lnk=@%SystemRoot%\system32\shell32.dll,-21805

[.ShellClassInfo] LocalizedResourceName = @%SystemRoot%\ system32 \ shell32.dll,-21779InfoTip = @%SystemRoot%\ system32 \ shell32.dll,-12688IconResource =%SystemRoot%\ system32 \ imageres.dll,-113IconFile =%SystemRoot% \ system32 \ shell32.dllIconIndex = -236 [LocalizedFileNames] Sample Pictures.lnk = @%SystemRoot%\ system32 \ shell32.dll,-21805

Saved Games

保存的游戏

[.ShellClassInfo]LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21814IconResource=%SystemRoot%\system32\imageres.dll,-186

[.ShellClassInfo] LocalizedResourceName = @%SystemRoot%\ system32 \ shell32.dll,-21814IconResource =%SystemRoot%\ system32 \ imageres.dll,-186

Searches

搜索次数

[.ShellClassInfo]LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-9031IconResource=%SystemRoot%\system32\imageres.dll,-18[LocalizedFileNames]Indexed Locations.search-ms=@shell32.dll,-32811Everywhere.search-ms=@shell32.dll,-32814Shared By Me.search-ms=@shell32.dll,-32802Recent Music.search-ms=@shell32.dll,-32803Recent Documents.search-ms=@shell32.dll,-32804Recent Pictures and Videos.search-ms=@shell32.dll,-32806Recent E-mail.search-ms=@shell32.dll,-32807Recently Changed.search-ms=@shell32.dll,-32813

[.ShellClassInfo] LocalizedResourceName = @%SystemRoot%\ system32 \ shell32.dll,-9031IconResource =%SystemRoot%\ system32 \ imageres.dll,-18 [LocalizedFileNames] Indexed Locations.search-ms = @ shell32.dll,-32811Everywhere。 search-ms = @ shell32.dll,-32814由Me.search-ms = @ shell32.dll,-32802Recent Music.search-ms = @ shell32.dll,-32803Recent Documents.search-ms = @ shell32.dll,- 32804最近的图片和视频.search-ms = @ shell32.dll,-32806最近的电子邮件.search-ms = @ shell32.dll,-32807最近更改.search-ms = @ shell32.dll,-32813

Videos

影片

[.ShellClassInfo]LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21791InfoTip=@%SystemRoot%\system32\shell32.dll,-12690IconResource=%SystemRoot%\system32\imageres.dll,-189IconFile=%SystemRoot%\system32\shell32.dllIconIndex=-238[LocalizedFileNames]Sample Videos.lnk=@%SystemRoot%\system32\shell32.dll,-21807

[.ShellClassInfo] LocalizedResourceName = @%SystemRoot%\ system32 \ shell32.dll,-21791InfoTip = @%SystemRoot%\ system32 \ shell32.dll,-12690IconResource =%SystemRoot%\ system32 \ imageres.dll,-189IconFile =%SystemRoot% \ system32 \ shell32.dllIconIndex = -238 [LocalizedFileNames] Sample Videos.lnk = @%SystemRoot%\ system32 \ shell32.dll,-21807

  Hopefully by this point your icons should be back to looking good again…

希望到这一点,您的图标应该又恢复了外观……

image

For extra credit… you can also create a desktop.ini file in any folder and use it to show a custom icon.

为了获得更多荣誉,您还可以在任何文件夹中创建一个desktop.ini文件,并使用它显示自定义图标。

翻译自: https://www.howtogeek.com/howto/windows-vista/fix-for-special-folders-reverting-to-default-folder-icon-in-windows-vista/

图标缓存 vista

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
文件夹加密static void Main() { Application.Run(new Form1()); } private void button1_Click(object sender, System.EventArgs e) { if(foldeOpen.ShowDialog ()==DialogResult.OK ) { try { if(foldeOpen.SelectedPath .Substring (3,10)=="Documents ") { MessageBox.Show ("孤竹残梦提醒:不建议伪装系统文件夹下文件,可能会造成系统出问题","提示信 息",MessageBoxButtons.OK,MessageBoxIcon.Error); } else { AfoldePath.Text =foldeOpen.SelectedPath; } } catch { if(foldeOpen.SelectedPath.Length >=4) { AfoldePath.Text =foldeOpen.SelectedPath; } else { MessageBox.Show ("孤竹残梦提醒:不能对盘符进行伪装","提示信 息",MessageBoxButtons.OK,MessageBoxIcon.Error); } } } } private void AddPassword_Click(object sender, System.EventArgs e) { if(this.AfoldePath.Text=="") { MessageBox.Show("请选择文件夹路径!","提示信息",MessageBoxButtons.OK,MessageBoxIcon.Error); } else if(this.comboBox1.Text=="加密类型") { MessageBox.Show("请选择加密类型!","提示信息",MessageBoxButtons.OK,MessageBoxIcon.Error); } else { try { ProcessStartInfo p3=new ProcessStartInfo ("attrib.exe",@"-s -r -a -h "+AfoldePath.Text); p3.WindowStyle= System.Diagnostics.ProcessWindowStyle.Hidden; Process.Start (p3); ProcessStartInfo p1=new ProcessStartInfo ("attrib.exe",@"-s -r -a -h "+AfoldePath.Text+@"/desktop.ini"); p1.WindowStyle= System.Diagnostics.ProcessWindowStyle.Hidden; Process.Start (p1); StreamWriter sw2=new StreamWriter (AfoldePath.Text+@"/desktop.ini" ); sw2.WriteLine (@"[.ShellClassInfo]" ); sw2.WriteLine ("CLSID="+GetPasType());
实现文件夹的伪装,保护系统安全namespace 伪装文件夹 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { comboBox1.SelectedIndex = 0; } private string GetFolType() { int Tid = comboBox1.SelectedIndex; switch (Tid) { case 0: return @"{20D04FE0-3AEA-1069-A2D8-08002B30309D}"; case 1: return @"{450D8FBA-AD25-11D0-98A8-0800361B1103}"; case 2: return @"{992CFFA0-F557-101A-88EC-00DD010CCC48}"; case 3: return @"{21EC2020-3AEA-1069-A2DD-08003B30309D}"; case 4: return @"{D6277990-4C6A-11CF-8D87-00AA0060F5BF}"; case 5: return @"{2227A280-3AEA-1069-A2DE-08002B30309D}"; case 6: return @"{208D2C60-3AEA-1069-A2D7-08002B30309D}"; case 7: return @"{645FF040-5081-101B-9F08-00AA002F954E}"; case 8: return @"{85BBD920-42A0-1069-A2E4-08002B30309D}"; case 9: return @"{BD84B380-8CA2-1069-AB1D-08000948F534}"; case 10: return @"{20D04FE0-3AEA-1069-A2D8-08002B30309D}"; } return @"{20D04FE0-3AEA-1069-A2D8-08002B30309D}"; } private void Camouflags(string str) { StreamWriter sw = File.CreateText(textBox1.Text.Trim() + @"\desktop.ini"); sw.WriteLine(@"[.ShellClassInfo]"); sw.WriteLine("CLSID="+str); sw.Close(); File.SetAttributes(textBox1.Text.Trim() + @"\desktop.ini", FileAttributes.Hidden); File.SetAttributes(textBox1.Text.Trim(), FileAttributes.System); MessageBox.Show("伪装成功!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); } private void button2_Click(object sender, EventArgs e) { if (this.textBox1.Text == "") { MessageBox.Show("请选择文件夹路径!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { try { if (textBox2.ReadOnly == false) { string str = textBox2.Text.Trim(); if (str.StartsWith(".")) str = str.Substring(1); if (!str.StartsWith("{") || str.Trim().Length != 38) { MessageBox.Show("自定义类型错误!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { Camouflags(str); } } else { Camouflags(GetFolType()); } } catch { MessageBox.Show("已经伪装过!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } private void button3_Click(object sender, EventArgs e) { if (textBox1.Text == "") { MessageBox.Show("请选择加密过的文件夹!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { try { FileInfo fi = new FileInfo(textBox1.Text.Trim() + @"\desktop.ini"); if (!fi.Exists) { MessageBox.Show("该文件未被伪装!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { System.Threading.Thread.Sleep(1000); File.Delete(textBox1.Text + @"\desktop.ini"); File.SetAttributes(textBox1.Text.Trim(), FileAttributes.Normal); MessageBox.Show("还原成功", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch { MessageBox.Show("不要多次还原"); } } } private void button1_Click(object sender, EventArgs e) { if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) { if (folderBrowserDialog1.SelectedPath.Length >= 4) { textBox1.Text = folderBrowserDialog1.SelectedPath; } else { MessageBox.Show("不能对盘符进行伪装", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值