Skip to content
⌘ NSIS Forum Archive

Shortcut with parameters

2 posts

michiel#

Shortcut with parameters

How can i make an shortcut that executes an command with parameters


I have created an shortcut like this:
CreateShortCut "Start.lnk" '"C:\Start.exe" -k install'

And what i get is an schortcut with the commando
"C:\"C:\Start.exe" -k install"

What i want is the next shortcut:
"C:\Start.exe" -k install

But How???? 😕
kichik#
It's in the FAQ:

I am having problems with CreateShortCut
Make sure you have separated the parameters from the target file.
For example, if you want to create a shortcut to notepad with $INSTDIR\Readme.txt as a parameter don't use:
CreateShortcut "myshortcut.lnk" "notepad.exe $INSTDIR\\Readme.txt" 
Use two separate strings:
CreateShortcut "myshortcut.lnk" "notepad.exe" "$INSTDIR\\Readme.txt"