I found more information out about this issue. From the manual:
Quote:
4.8.1.21 InstallDir
definstdir
Sets the default installation directory. See the variables section for variables that can be used to make this string (especially $PROGRAMFILES). Note that the part of this string following the last \ will be used if the user selects 'browse', and may be appended back on to the string at install time (to disable this, end the directory with a \ (which will require the entire parameter to be enclosed with quotes). If this doesn't make any sense, play around with the browse button a bit.
|
So the problem is with this behavior in NSIS when InstallDir doesn't end with a \. Disable this feature and the icons and shortcuts are fine.
So..
InstallDir "$PROGRAMFILES32\SCHTHACK PSOBB" has the problem.
InstallDir "$PROGRAMFILES32\SCHTHACK PSOBB\" (disables behavior) doesn't have the problem.
It seems to be something going wrong in this feature when it enumerates and appends "SCHTHACK PSOBB" to the directory selection. For example, a user will choose "C:\Program Files (x86)" as the directory rather than a sub directory, and NSIS will fill in the sub directory to match the last string of InstallDir after the last \, in this case "SCHTHACK PSOBB," making it auto to C:\Program Files (x86)\SCHTHACK PSOBB\. For some reason this breaks CreateShortcut icon association and perhaps other functions in NSIS. What it looks like is Windows is looking in the 64-bit Program Files directory for the icon when this function is enabled, even though the program is really in the 32-bit Program Files folder, which I think is the result of this features functionality mixing up the 64-bit and 32-bit Program Files folders or how it resolves them.