Violet Giraffe
Violet Giraffe

Reputation: 33605

Is there a way to preserve the pinned icon during application update?

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)

Upvotes: 1

Views: 275

Answers (1)

Violet Giraffe
Violet Giraffe

Reputation: 33605

Turns out Inno Setup can handle update correctly. All I have to do is remove my code that invokes uninstaller before installing a new version, and then I had to add an attribute:

UsePreviousAppDir=yes

More info on the topic: http://www.jrsoftware.org/iskb.php?updateinstall

Upvotes: 0

Related Questions