Create shortcut in ObjectDock

From NSIS Wiki
Jump to navigationJump to search
Author: Jan (talk, contrib)


Description

Places a shortcut to an application in the ObjectDockâ„¢

Syntax

${DockShortcut} "[target]" "[name]" $var
 
"[target]"   ; full path to the target executable
"[name]"     ; name for the shortcut
 
$var         ; return code: ok|error|aborted|exists
 
---------------------------------------------------------------
 
${DockShortcutAdv} "[target]" "[name]" "[icon]" "[group]" $var
 
"[target]"   ; full path to the target executable
"[name]"     ; name for the shortcut
"[icon]"     ; target icon: exe|ico|png
"[group]"    ; id of the tab (ObjectDock Plus only!)
 
$var         ; return code: ok|error|aborted|exists

Examples

Add normal shortcut to ObjectDock

!include "DockShortcut.nsh"
  !insertmacro "DockShortcut"
 
Section
${DockShortcut} "$INSTDIR\nsis.exe" "Nullsoft Install System" $0
SectionEnd

Add shortcut to 2nd tab of ObjektDock Plus, using a different icon

!include "DockShortcut.nsh"
  !insertmacro "DockShortcutAdv"
 
Section
${DockShortcutAdv} "$INSTDIR\nsis.exe" "Nullsoft Install System" "$INSTDIR\Contrib\Graphics\Icons\classic-install.ico" "2" $0
SectionEnd

Download

DockShortcut.0.2.zip (1 KB)