PDA

View Full Version : How to create a shortcut that starts the program in $INSTDIR


zwu_ca
6th September 2010, 20:25
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?

Afrow UK
6th September 2010, 20:48
SetOutPath.

Stu

Wizou
6th September 2010, 22:00
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