Bomzinho
Bomzinho

Reputation: 161

"Start in" path not proper

Inorder to create a Startup shortcut, in my setup scritp, i have entered the command as follows:

CreateShortCut "$SMSTARTUP\application.lnk" "$INSTDIR\<AppFolder>\application.exe" "$INSTDIR\application.ico"

After installing the setup, the shortcut gets created successfully. However, it does not start the application properly. My application when invoked, takes some properties set in an xml placed in the application folder itself. So,I checked the properties of the Startup shortcut, this is what it shows:

Target: c:\Program files\folder1\folder2\folder3\application folder name\application.exe (here, c:\program files\folder1\folder2\folder3 is my $INSTDIR)

Start in: c:\Program files\folder1\folder2\folder3\ .....Here the "application folder" is not showing up. I need the application folder as it is from where the exe will start in. When i manually edit the path in the properties, then my app starts properly.

Requesting for a method/script so that in "Start in" the missing application folder name appears. i.e it Start in: c:\program files\........\application folder\

Thanks,

Upvotes: 0

Views: 115

Answers (1)

Seki
Seki

Reputation: 11465

The "working directory" that is set in a shortcut depends on the current working directory at the time CreateShortcut is executed byt NSIS.

To change it, set the current directory with SetOutPath before the CreateShortcut statement.

See the CreateShortCut reference for details.

Upvotes: 1

Related Questions