|
|
#1 |
|
Junior Member
Join Date: Aug 2004
Posts: 6
|
Desktop icon duplicated four times
Hi,
When installing my application, the desktop icon is duplicated 4 times, i.e. I see 4 icons of my application on the desktop, all of them pointing to the same EXE. If I refresh the desktop with F5 then only one remains. This is the script command I use to create the desktop icon: CreateShortCut "$DESKTOP\MyApp.lnk" "$INSTDIR\myapp.exe" That never happened with previous versions of my software, however on the last install script I added the "SetShellVarContext all" in order to have the installation shared with all users. Is that related? What can I do? Thanks |
|
|
|
|
|
#2 |
|
Major Dude
|
To refresh the desktop, use the code below:
code: |
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Aug 2004
Posts: 6
|
Quote:
I'd like that it just doesn't happen (if possible). |
|
|
|
|
|
|
#4 |
|
Major Dude
|
This is probably a scripting problem.
Remember: You can debug any part of the script using MessageBox command or using DumpState plugin. So even you can solve the problem here. Or you can attach your script if you want it fast or sure. |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Apr 2004
Posts: 130
|
I've seen this happen when a shortcut with the same name already exists under the "all users" area and then you add the same shortcut under the "current user". You can also get the problem to occur by creating the shortcuts through Windows so it appears to be a Windows issue. I've seen it happen other times but never really nailed down the cause. I guess you could check you script to make sure your not doing something like creating duplicate shortcuts.
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Aug 2004
Posts: 6
|
I have only one call to:
CreateShortCut "$DESKTOP\MyApp.lnk" "$INSTDIR\myapp.exe" If there is no solution I'll try the workaround proposed by deguix. |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Jan 2004
Location: London, Ontario, Canada
Posts: 272
|
The following will assure only one instance.
code: |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Aug 2004
Posts: 6
|
Thanks a lot, I'll try this.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|