installer sets broken icon path on 64bit windows #354

Closed
nvaccessAuto opened this Issue Jan 1, 2010 · 4 comments

1 participant

@nvaccessAuto

Reported by timeless on 2009-07-03 09:03
w7 rc1; NVDA 0.6p3.2

The installer managed to put a shortcut on my desktop and in my start menu, both point to:
"C:\Program Files (x86)\NVDA\nvda.exe"
but the icon is: %ProgramFiles%\NVDA\NVDA.exe.

This means that I get the default icon because that path doesn't exist

environment variable table for reference:
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files

@nvaccessAuto

Comment 1 by mdcurran on 2009-07-22 05:36
The line in the installer that creates the desktop shortcut is:

CreateShortCut "$DESKTOP\${PRODUCT}.lnk" "$INSTDIR\${PRODUCT}.exe" "" "$INSTDIR\${PRODUCT}.exe" 0 SW_SHOWNORMAL \
 CONTROL|ALT|N "Shortcut Ctrl+Alt+N"

The parameters to CreateShortcut are:
shortcut file name, target file name, commandline parameters, icon path, icon index, shortcut flags, keyboard shortcut.

According to this line, both target file name, and icon path are pointing to the same thing, which is "$INSTDIR\${PRODUCT}.exe".

${PRODUCT} is defined as "nvda".
$INSTDIR should be the directory you chose at install time.

It seems to me that this is perhaps a bug in Nsis and CreateShortcut. Both target path and icon path should be the same value.

Although this is not an error on 32-bit systems, looking at the icon path for a desktop shortcut on my 32-bit Vista machine, it is also %ProgramFiles% but the target path is "C:\Program Files"

So this bug is definitly not specific to Windows 7 or 64-bit.

I'm interested if this problem exists on XP machines?

@nvaccessAuto

Comment 2 by jteh on 2012-03-14 01:32
We embed the icon in the NVDA executable anyway, so can we just have an empty icon path and let Windows find it in the executable? Or do you still have to specify the executable as the icon path?

We need some sighted help with this one.

@nvaccessAuto

Comment 3 by jteh on 2012-05-11 04:41
We stopped specifying an icon location (237f76d), which seems to cause Windows to use the icon embedded in the target executable (without mangling the path). Certainly, I don't see any error when I press Change icon now and I see a full path instead of one containing environment variables. This means this should be fixed, though we need someone with sight to confirm.

@nvaccessAuto

Comment 4 by jteh on 2012-05-25 01:35
Changes:
Milestone changed from None to 2012.2
State: closed

@nvaccessAuto nvaccessAuto added this to the 2012.2 milestone Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment