I am having problems with CreateShortcut: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (Added syntax highlight.) |
(the 'c' in cut was not capital, will stop text highlighting in notepad++) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
Make sure you have separated the parameters from the target file. | 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: | For example, if you want to create a shortcut to notepad with $INSTDIR\Readme.txt as a parameter, don't use this: | ||
<highlight-nsis> | <highlight-nsis> | ||
Line 7: | Line 7: | ||
</highlight-nsis> | </highlight-nsis> | ||
Instead, use two separate strings: | |||
<highlight-nsis> | <highlight-nsis> | ||
CreateShortCut "myshortcut.lnk" "notepad.exe" "$INSTDIR\Readme.txt" | |||
</highlight-nsis> | </highlight-nsis> | ||
[[Category:Scripting FAQ]] | [[Category:Scripting FAQ]] |
Latest revision as of 04:02, 14 February 2008
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 this:
CreateShortcut "myshortcut.lnk" "notepad.exe $INSTDIR\Readme.txt"
Instead, use two separate strings:
CreateShortCut "myshortcut.lnk" "notepad.exe" "$INSTDIR\Readme.txt"