NinjAndroid
NinjAndroid

Reputation: 63

NSIS Error creating shortcut on desktop

I'm trying to use NSIS for installing my application. When trying to create shortcut on the desktop, it fails. this is the script relevant part i'm using:

SetOutPath "$INSTDIR"
File "${BIN_DIRECTORY}\app.exe"
CreateShortCut "$SMPROGRAMS\app\app.lnk" "$INSTDIR\app.exe"
CreateShortCut "$DESKTOP\app.lnk" "$INSTDIR\app.exe"

This is the log:

Extract: app.exe... 100%
Create shortcut: C:\Users\roeia\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\app\app.lnk
Error creating shortcut: E:\Users\roeia\Desktop\app.lnk

the path is correct, and i don't have any problem to create or modify files there. I'm using windows 7 64bit. Thanks for helping!

Upvotes: 1

Views: 2755

Answers (2)

Regg Thims
Regg Thims

Reputation: 11

Perhaps the use of \r in the executeable path is causing the problem. Try \r to avaoid character substitution.

Upvotes: 0

Seki
Seki

Reputation: 11465

It might be a right problem: do you run the installer as admin?

Specifying RequestExecutionLevel in the script may help to do so:

RequestExecutionLevel admin ;try also with 'highest'

Upvotes: 0

Related Questions