Update icon from older version with inno setup

大兔子大兔子 提交于 2019-12-12 03:45:09

问题


I installed my icon with

Name: "{commondesktop}\TestApp {#VERSION}"; Filename: "{app}\TestApp.exe"; WorkingDir: "{app}"; IconFilename: "{app}\TestApp.ico";

and if I update my tool (checked in InitializeSetup()) the old icon is still available on desktop (old version number) and the new one also!

Is there a flag to remove the icon if the tool will be updated and not uninstalled?

thx


回答1:


This is one of the reasons why you should generally not include the version number in your icon names.

You can, however, tell Inno to delete these in a later install like so:

[InstallDelete]
Type: files; Name: "{commondesktop}\TestApp 5.2.lnk"

Note that it is best practice to individually name all the previous versions that you have released, instead of using a wildcard. (This is because a wildcard might accidentally delete other icons that the user has created themselves, which they won't be happy about.)



来源:https://stackoverflow.com/questions/14829411/update-icon-from-older-version-with-inno-setup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!