问题
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