Prev Previous Post   Next Post Next
Old 22nd February 2016, 22:24   #1
Junior Member
Join Date: Feb 2016
Posts: 8
Question Shortcut icon not displayed

I have NSIS 2.50.

I am learning about NSIS and I have a working installation script. However, I cannot get the icon to display on the desktop or in the start menu. I have a 64-bit Win7, but it is a 32-bit application (a .jar). I can change the icon to the correct one in Properties and before I do that, I see the error about not being able to find the .ico file in %Program Files%.

I have searched far and wide and tried a lot of things. I have tried
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion" "ProgramFiles (x86)"

But that didn't help. I have tried adding more backslashes to my paths, but it has made no difference. I have tried using $PROGRAMFILES32 instead of $PROGRAMFILES, but that didn't help.

I tried reading the program files registry key and using that to set my install directory, but it didn't help.

Here are the relevant lines from my script:

InstallDir "$PROGRAMFILES\ObitEdit"
CreateShortCut "$SMPROGRAMS\ObitEdit\ObitEdit.lnk" "$INSTDIR\ObitEdit.jar" "" "$INSTDIR\odt_log.ico"
CreateShortCut "$DESKTOP\ObitEdit.lnk" "$INSTDIR\ObitEdit.jar" "" "$INSTDIR\odt_log.ico"

My icon is 48x48. I've tried adding a zero at the end of the CreateShortCut line, and that didn't help.

Everything works great, there's just no picture showing. I've read enough to understand that it has to do with how $PROGRAMFILES is handled once it gets to Windows. I see people find some way to get around it successfully, but nothing has worked for me.

I'm hopeful someone out there can see what's wrong.
ajrjaneway is offline  
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

icon, shortcut

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump