cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
zedaram
Level 3

How to update desktop shortcut properly

Hi everyone!!!

I have strange issue.
I've created two setups of the same product first one with icon A.ico and the second one with B.ico
Now I do following steps.
1. Install of the first setup (with A.ico)
2. I can see that my shortcut is on my desktop, so everything is OK
3. I reinstall software using second setup (with B.ico)
4. I can see that exe's icon was updated properly, it was also updated properly in Add/Remove programs, but my desktop shortcut was not updated.

I can see that shortcut is updated only if I do REBOOT 😞 I want to be able to update icon without restarting computer.

Can anyone help me? What I do wrong?

Thanks,
Labels (1)
0 Kudos
(6) Replies
zedaram
Level 3

One new finding.
The same setups working properly on Windows Vista! :(((
Anyone can help?

Thanks,
0 Kudos
zedaram
Level 3

Hey guys, anyone!!! Please!!!
0 Kudos
chriscw
Level 6

Try adding something like the following to your On AfterFirstUI Install procedure:

//Add a desktop shortcut in all users.
szResult = @ID_STRING11;

AddFolderIcon ( FOLDER_DESKTOP, szResult,"\"" ^ TARGETDIR ^ "\\myexe.exe" ^ "\"", TARGETDIR, TARGETDIR ^ "\\myicon.ico", 0, "", REPLACE);


Or of course you can specify the EXE as the icon file to use a built in Icon, the 0 in my example being replaced my the idex of the Icon you want. You need to do this after copying the files as the shortcut on the desktop is created by Installshield BEFORE it copies the files and therefore normally has no icon because the icon file is not yet in the TARGETDIR location.
0 Kudos
MattQVI
Level 8

I have a similar problem, except that in my latest upgrade the desktop shortcut changed names. It adds the new one but doesn't remove the old one... even with the information being in the RemoveFile table (as I was instructed before).

I even created the shortcut as new, with a different name and it still doesn't remove it.
0 Kudos
Mike_Bryant
Level 3

I have an install where the icon displayed on the desktop is a generic one. When I manually make the desktop refresh the icon changes to the correct version. Perhaps your shortcuts are really there but need a refresh?

I have no idea why my icon didn't get refreshed correctly in the first place. I have another install where the correct icon does get displayed so the refresh behavior is only consistent with the same install but not with different installs.
0 Kudos
MattQVI
Level 8

I tried a manual refresh by pressing F5 but the icon still didn't clean up/disappear.
0 Kudos