I am having problems with CreateShortcut: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
(Created page.) |
m (Added syntax highlight.) |
||
Line 3: | Line 3: | ||
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: | ||
<highlight-nsis> | |||
CreateShortcut "myshortcut.lnk" "notepad.exe $INSTDIR\Readme.txt" | CreateShortcut "myshortcut.lnk" "notepad.exe $INSTDIR\Readme.txt" | ||
</highlight-nsis> | |||
Use two separate strings: | Use two separate strings: | ||
<highlight-nsis> | |||
CreateShortcut "myshortcut.lnk" "notepad.exe" "$INSTDIR\Readme.txt" | CreateShortcut "myshortcut.lnk" "notepad.exe" "$INSTDIR\Readme.txt" | ||
</highlight-nsis> | |||
[[Category:Scripting FAQ]] | [[Category:Scripting FAQ]] |
Revision as of 04:13, 31 July 2005
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"