简体   繁体   English

如何更改 NSIS 中的卸载程序图标?

[英]How to change Uninstaller icon in NSIS?

I have a file compiled with NSIS.我有一个用 NSIS 编译的文件。

Since MUI_ICON is used, after executing the installer file, the desired icon is displayed in the progress stage,由于使用了MUI_ICON,执行安装程序文件后,在进度阶段显示所需的图标,

If you use MUI_UNICON, the desired icon is displayed in Add/Remove Programs.如果您使用 MUI_UNICON,所需的图标将显示在添加/删除程序中。

However, an executable file and Uninstall.exe were created using the Installer, but但是,使用安装程序创建了一个可执行文件和 Uninstall.exe,但

This Uninstall.exe shows the default icon for NSIS, not the one I intended.这个 Uninstall.exe 显示了 NSIS 的默认图标,而不是我想要的图标。

Default icon: modern-uninstall-colorful.ico默认图标:modern-uninstall-colorful.ico

How can I change this default icon at build time?如何在构建时更改此默认图标?

MUI_UNICON is correct and will change the uninstaller.exe icon. MUI_UNICON是正确的并且会改变uninstaller.exe 的图标。

If you see the wrong icon in Explorer then that is because it is caching the old icon.如果您在资源管理器中看到错误的图标,那是因为它正在缓存旧图标。 Rename your.exe and it should show the new icon.重命名 your.exe,它应该会显示新图标。 You can verify the icon by looking at the resources with Resource Hacker ...您可以通过使用Resource Hacker查看资源来验证图标...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM