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

查看:18
本文介绍了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}Iconsstop.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%AppDataLocal(然后按Enter)
  • 输入:attrib –h IconCache.db(然后按Enter)
  • 输入:del IconCache.db(然后按Enter)
  • 输入:start explorer(然后按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%AppDataLocal (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天全站免登陆