Archive: Problem with Shortcut 'Start In' field


Problem with Shortcut 'Start In' field
I'm having problems with shortcuts I create pointing to the correct location for the 'Start In' parameter.

This chunk of code will make the Target correct (the application launches), but since the Start In points to "C:\Documents and Settings\All Users\Start Menu\Programs" getif.exe creates a log file in the start menu instead of its directory.

Am I missing something obvious?


;Create shortcut
SetShellVarContext All
SetOutPath $SMPROGRAMS
CreateShortcut $SMPROGRAMS\GetIF.lnk
$PROGRAMFILES\Getif\getif.exe

Use SetOutPath to set the Start In folder path.
Surely you want to set it to "$PROGRAMFILES\Getif" not "$SMPROGRAMS"?

-Stu


Re: Problem with Shortcut 'Start In' field
Hi BSOD2600,

You might want to try CreateShortcut $SMPROGRAMS\GetIF.lnk $PROGRAMFILES\Getif\getif.exe "" $PROGRAMFILES\Getif, if you don't use SetOutPath as suggested by AfrowUK. ;)

The "" are the optional command line parameters.

Hope this helps,

KenA


The 4th (optional) parameter of CreateShortcut specifies the icon path not the Start In path, and the 5th being the icon index.
SetOutPath is the only way to set the Start In path.

-Stu


Originally posted by Afrow UK
The 4th (optional) parameter of CreateShortcut specifies the icon path not the Start In path, and the 5th being the icon index.
SetOutPath is the only way to set the Start In path.

-Stu
I stand corrected. :o To Afrow UK you listen.

KenA