Archive: How to create a shortcut that starts the program in $INSTDIR


How to create a shortcut that starts the program in $INSTDIR
If I do this:

CreateShortcut $SMPROGRAMS\$StartMenuGroup\my.lnk $INSTDIR\my.exe

it starts the program in the directory "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\mydir" on Windows 7. So how to change the starting directory to $INSTDIR?


SetOutPath.

Stu


As documented in NSIS help file about CreateShortcut :

$OUTDIR is used for the working directory. You can change it by using SetOutPath before creating the Shortcut