Archive: Problem with Shortcuts to compatability mode executable


Problem with Shortcuts to compatability mode executable
Hi, I'm kind of new to NSIS and for the installer I'm making, I had to set the executable to Windows 98 compatability mode for the install. Doing that was pretty easy and just required a:

WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\filename.exe" "WIN98 DISABLECICERO"

However, the problem is the shortcuts to it created by NSIS. When you right click a shortcut, it displays all the proper information in the compatability tab, however when you run it, it results in the crash you get if compatability mode is not set.

Running the actual EXE in the install folder works perfectly. In fact, if I go to that EXE and click "Create Shortcut," rename it to the shortcut produced by NSIS, and copy it over the NSIS file, the shortcut now works fine.

I already scanned the registry for the .lnk to see if there were specific compatability mode settings for it and there don't appear to be.

I'm hoping someone a bit more experienced with NSIS might have an idea what I can do about this. Thanks.

Quick Edit: I already tried adding a registry entry for the .lnk file like I did for the EXE, but that appears to have no effect.


Fixed
Thanks to some help from developer in #nsis, I got this working :)

It turns out it was due to what SetOutPath was set to. After installing all program files, I had to install some windows fonts so I descended into $WINDIR\Fonts.

This causes all CreateShortcuts to use $WINDIR\Fonts as their "Start In" path which breaks compatibility mode for some quirky reason.

The fix was to, after installing all files, set SetOutPath pack to $INSTDIR.

Everything works great now.