View Single Post
Old 17th April 2018, 18:12   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,153
Quote:
Originally Posted by winman2004 View Post
I even tried creating the shortcut by giving the static path (Ex: D:\MyDesktop) in NSIS script but surprisingly the shortcut is created in the path “C:\Users\user_name\MyDesktop”.
Also, if I give the static path as D:\Desktop for createshortcut, it creates the shortcut in the path “C:\users\user_name\desktop” instead of D drive path.
NSIS does not modify the .lnk path in any way, it is passed directly to IShellLink/IPersistFile.

Which version of Windows is this happening on?

For "SetShellVarContext all" to work you also need "RequestExecutionLevel admin".

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote