Archive: How to execute a shoutcut by NSIS?


How to execute a shoutcut by NSIS?
The shoutcut is location in user's system. I try Exec $Path\xxx.lnk or ExecShell open $Path\xxx.lnk, not work.:rolleyes:


Try ExecShell "" "$Path\xxx.lnk" This way the default is used. Maybe open isn't a available shellexec method.


Thanks for quick reply, but ExecShell "" "$Path\xxx.lnk" not work.


IShellLink interface can extract parameters from lnk file, try to write a plug-in.
But I tested this with ShellExecute() and system() calls - both work fine :) BTW NSIS also uses ShellExecute() for ExecShell, so check you code :)
Edit:
But script call not works :(
System plug-in calling ShellExecute should work.


Thanks, after I using System plugins I known why ExecShell not work. System plugins return a 2 value, meaning File was not found. I check my code and add SetShellVarContext all command (The xxx.lnk is in a all user folder), it work. ExecShell not return nothing so I don't known why this command not work.