Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

replace same shortcut from desktop innosetup

Tags:

inno-setup

There is already a shortcut on the desktop with same name but it was installed by a setup by setupfactory( i want to replace it with inno). now when i install using a setup created by innosetup it creates a new icon rather than replacing the current one . i added the [installDelete] section but doesnt work. I just checked the shortcut properties. the diff i found is one shortcut has owner as administrators group and the other one is my user. but both was installed by the same user. would that be the reason? is there any workaround for this? or can i check if a shortcut with same name exists? Thank you

Both are pointing to the same exe in same path. I m installing in windows 7

like image 729
sjd Avatar asked Mar 25 '13 14:03

sjd


2 Answers

In this case you should check the location of both shortcuts.

Probably one of them is created in Public Desktop folder (for all users) - {commondesktop} and the second is presonalized for Current User Desktop folder - {userdesktop}.

A.

[Icons]
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; 
WorkingDir: "{app}"; Tasks: desktopicon

B.

[Icons]
Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; 
WorkingDir: "{app}"; Tasks: desktopicon
like image 150
RobeN Avatar answered Oct 19 '22 21:10

RobeN


When you are switching between installer frameworks it's generally best to uninstall the old version (via its uninstaller) before installing the new one. (You can automate this.)

If you don't do this, then it's likely that the user will end up with stray uninstaller files on their drive and more than one Add/Remove Programs entry; both of these are ugly.

(This is a one-time thing -- there's no need to uninstall the older version when changing from one Inno or app version to another, only when changing from non-Inno to Inno or the reverse.)

like image 25
Miral Avatar answered Oct 19 '22 20:10

Miral