Exe losing icon in program files folder
Hey there! Newcomer reporting in. :)
I'm making my very first NSIS installer and have come across a frustrating problem I can't seem to overcome.
After installing the data, the installed application's executable's icon is lost. The icon still seems to be there if I look at the properties or try to remove the file, but isn't displayed otherwise. This also expands to the start menu link, and the possible desktop shortcut.
Here is a very trimmed down look at the .nsi (every file, including the application executable, is in data folder):
!include MUI2.nshThis seems to only happen if I install in the default directory C:\Program Files (x86)\... , installing somewhere else seems to work fine. The uninstaller has no problem regardless of install location (icon added with MUI_UNICON).
...
!define AppName "Freeze Engine"
!define AppExecutable "Freeze Engine.exe"
!define AppUninstall "Uninstall Freeze Engine.exe"
!define ResourceDir "data"
InstallDir "$PROGRAMFILES\${AppName}"
Var StartMenuFolder
!define SMExecutableLink "${AppName}.lnk"
!define SMUninstallLink "Uninstall ${AppName}.lnk"
...
Section "Install"SetShellVarContext allSectionEnd
SetOutPath $INSTDIR
File /r ${ResourceDir}\*.*
writeUninstaller "$INSTDIR\${AppUninstall}"
!insertmacro MUI_STARTMENU_WRITE_BEGIN AppNameCreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${SMExecutableLink}" "$INSTDIR\${AppExecutable}" \!insertmacro MUI_STARTMENU_WRITE_END
"" "$INSTDIR\${AppExecutable}" 0
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${SMUninstallLink}" "$INSTDIR\${AppUninstall}" \
"" "$INSTDIR\${AppUninstall}" 0
While searching, I came across http://forums.winamp.com/showthread.php?t=327806 which seems somewhat similar, but appears to be limited to shortcuts.
Would any friendly person be able to tell what I'm doing wrong? :hang: