I've configured Inno Setup to uninstall the previous app version when running an installer. However, this means that all icons are deleted. Naturally, users complain that they pin my program to taskbar but the icons disappear after program update. Is there a way to either make the installer pin the icon, or tell preserve the main (desktop or Start menu) icon when uninstalling the old version before update?
The uninstallation is invoked with the following code, so there's not much room for customization there:
Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode)