Windows 7上的桌面快捷方式图标错误(Inno Setup) [英] Wrong desktop shortcut icon on Windows 7 (Inno Setup)

查看:823
本文介绍了Windows 7上的桌面快捷方式图标错误(Inno Setup)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Inno Setup创建了一个安装程序。用于桌面快捷方式和开始菜单的图标嵌入在应用程序可执行文件中。

I have created an installer with Inno Setup. The icon used for the desktop shortcut and start menu is embeded in the application executable.

最初创建安装程序时,我没有最终产品图标来自设计团队。当我完成安装程序时,我使用了一个临时图标。

When the installer was initially created, I didn't have the final product icon from the design team. I used a temporary icon instead as I completed the installer.

在我更改最后一个图标之前,一切正常。现在桌面快捷方式和开始菜单图标始终显示旧图标,即使其他地方图标都是正确的。

Everything worked as it should until I changed the icon for the final one. Now the desktop shortcut and start menu icons always display the old icon even though everywhere else the icon is correct.

这是图标声明部分脚本。

This is the Icon declaration section of the script.

[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; WorkingDir: {app}
Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}; IconFilename: {app}\Icons\stop.ico
Name: {commondesktop}\{#MyAppVersionName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon; WorkingDir: {app}

这是我尝试过的:(这是一个Windows 7系统)

Here's what I've tried: (This is a Windows 7 system)

如果我查看快捷方式属性,并选择更改图标,我会看到正确的图标。重新选择它没有任何效果。我也尝试过选择一个不相关的图标,然后重新选择正确的...仍然显示旧图标。

If I look at the shortcut properties, and choose "change icon" I see the correct icon. Re-selecting it has no effect. I've also tried selecting a dis-related icon and then re-selecting the correct on... still shows the old one.

我已经按照建议删除了IconCache.db并重新启动机器,但这也没有效果。

I've followed suggestions to delete the IconCache.db and restarting the machine but this has no effect either.

世界上哪里有旧图标?安装程序中没有任何地方。

Where in the world is the old icon coming from? It's nowhere in the installer.

创意人吗?

推荐答案

它似乎这确实与 IconCache.db 文件有关。我只能猜测某些事情没有以正确的顺序完成(尽管我多次尝试不同的程序)。

It seems that this indeed was related to the IconCache.db file. I can only guess that something wasn't done in the right order (though I tried differing procedures more than once).

以下是我手动执行重置的方法:

Here's how I performed the reset manually:


  • 单击开始按钮>按住 Ctrl + Shift &右键单击开始菜单中的空白区域。

  • 选择退出资源管理器。

  • 按住 Ctrl + Shift + Esc 键以打开任务管理器。

  • 选择文件>新任务。

  • 键入:cmd(并按 Enter )。这将打开命令提示符。

  • 键入: cd / d%userprofile%\ AppData \ Local (并按输入

  • 输入: attrib -h IconCache.db (并按 Enter

  • 类型: del IconCache.db (并按 Enter

  • 输入:启动资源管理器(并按输入

  • Click Start button > Hold down Ctrl+Shift & Right Click on empty area in the Start Menu.
  • Select "Exit Explorer".
  • Hold Ctrl+Shift+Esc keys to open Task Manager.
  • Select "File" > "New Task".
  • Type: cmd (and press Enter). This will open the command prompt.
  • Type: cd /d %userprofile%\AppData\Local (and press Enter)
  • Type: attrib –h IconCache.db (and press Enter)
  • Type: del IconCache.db (and press Enter)
  • Type: start explorer (and press Enter)

现在一切都按照应有的方式呈现。

Now everything renders just as it should.

这篇关于Windows 7上的桌面快捷方式图标错误(Inno Setup)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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