Skip to content
⌘ NSIS Forum Archive

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

3 posts

zwu_ca#

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?
Wizou#
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