Ashok
Ashok

Reputation: 1952

why does NSIS sets the target to default INSTDIR?

I'm trying to create an exe installer for a 32-bit application, which would create shortcut for my application as well. I'm using NSIS to build an installer and I'm successful in build the installer. When I run the .exe on a 64-bit windows OS, it creates the necessary folders, updates the Registry and creates a shortcut on the desktop too. However, when I check the properties of the shorcut on the desktop created, the "start-in" parameter is correct. However, the target parameter is wrong. i.e. I use:

createshortcut "$DESKTOP\shortcut.lnk" "$INSTDIR\bin\app.exe" ""

where INSTDIR = programfiles

The start-in is set correctly to: C:\program files(x86).... I was expecting the target to be the same.

But, the target is set to: C:\program files....

Am I missing something here?

Upvotes: 0

Views: 4487

Answers (1)

Anders
Anders

Reputation: 101756

MessageBox $INSTDIR before creating the shortcut, make sure it is C:\program files(x86)\...

Are you calling DisableX64FSRedirection (x64.nsh)?

The start-in/working directory comes from the last call to SetOutPath.

I think NSIS passes the strings pretty much untouched to the shell, you can use the logging build to see the string before it is passed to IShellLink::SetPath

Upvotes: 1

Related Questions