Skip to content
⌘ NSIS Forum Archive

How to pin/unpin exe to taskbar in windows 10?

4 posts

viveknuna#

How to pin/unpin exe to taskbar in windows 10?

I want to pin/unpin exe to TaskBar in Windows 10?

I'm running nsi script for the same.

This line gives error.
${StdUtils.InvokeShellVerb} $0 $ptfolder01 $ptfile01 5386

Please find the below script:

!addincludedir "..\..\Include"
!include 'StdUtils.nsh'
!include FileFunc.nsh
!include LogicLib.nsh

VIProductVersion 1.2.0.0
VIAddVersionKey FileVersion 1.2

Caption "PinTo10"

var ptfile01
var ptfolder01
var ptfile02
var ptfolder02
var ptfile03
var ptfolder03
var ptfile04
var ptfolder04
var ptfile05
var ptfolder05
var ptfile06
var ptfolder06
var ptfile07
var ptfolder07
var ptfile08
var ptfolder08
var ptfile09
var ptfolder09
var ptfile10
var ptfolder10
var utfile01
var utfolder01
var utfile02
var utfolder02
var utfile03
var utfolder03
var utfile04
var utfolder04
var utfile05
var utfolder05
var utfile06
var utfolder06
var utfile07
var utfolder07
var utfile08
var utfolder08
var utfile09
var utfolder09
var utfile10
var utfolder10
var PinTask
var UnPinTask
var psfile01
var psfolder01
var psfile02
var psfolder02
var psfile03
var psfolder03
var psfile04
var psfolder04
var psfile05
var psfolder05
var psfile06
var psfolder06
var psfile07
var psfolder07
var psfile08
var psfolder08
var psfile09
var psfolder09
var psfile10
var psfolder10
var usfile01
var usfolder01
var usfile02
var usfolder02
var usfile03
var usfolder03
var usfile04
var usfolder04
var usfile05
var usfolder05
var usfile06
var usfolder06
var usfile07
var usfolder07
var usfile08
var usfolder08
var usfile09
var usfolder09
var usfile10
var usfolder10

var PinStart
var UnPinStart
var help

!ifdef NSIS_UNICODE
!addplugindir "..\..\Plugins\Release_Unicode"
!else
!addplugindir "..\..\Plugins\Release_ANSI"
!endif
OutFile "C:\PinTo10.exe"

SilentInstall silent
RequestExecutionLevel user ;no elevation needed for this test
ShowInstDetails hide

Section Main

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/help' $help
${If} ${Errors}
${Else}
StrCpy $help "1"
${EndIf}

; Pin to task ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFOL01:' $ptfolder01
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFILE01:' $ptfile01
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFOL02:' $ptfolder02
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFILE02:' $ptfile02
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFOL03:' $ptfolder03
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFILE03:' $ptfile03
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFOL04:' $ptfolder04
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFILE04:' $ptfile04
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFOL05:' $ptfolder05
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFILE05:' $ptfile05
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFOL06:' $ptfolder06
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFILE06:' $ptfile06
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFOL07:' $ptfolder07
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFILE07:' $ptfile07
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFOL08:' $ptfolder08
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFILE08:' $ptfile08
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFOL09:' $ptfolder09
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFILE09:' $ptfile09
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFOL10:' $ptfolder10
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PTFILE10:' $ptfile10
${If} ${Errors}
${Else}
StrCpy $PinTask "1"
${EndIf}
; Unpin from task ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFOL01:' $utfolder01
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFILE01:' $utfile01
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFOL02:' $utfolder02
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFILE02:' $utfile02
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFOL03:' $utfolder03
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFILE03:' $utfile03
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFOL04:' $utfolder04
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFILE04:' $utfile04
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFOL05:' $utfolder05
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFILE05:' $utfile05
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFOL06:' $utfolder06
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFILE06:' $utfile06
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFOL07:' $utfolder07
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFILE07:' $utfile07
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFOL08:' $utfolder08
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFILE08:' $utfile08
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFOL09:' $utfolder09
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFILE09:' $utfile09
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFOL01:' $utfolder10
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/UTFILE10:' $utfile10
${If} ${Errors}
${Else}
StrCpy $UnPinTask "1"
${EndIf}

; Pin to start ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFOL01:' $psfolder01
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFILE01:' $psfile01
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFOL02:' $psfolder02
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFILE02:' $psfile02
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFOL03:' $psfolder03
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFILE03:' $psfile03
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFOL04:' $psfolder04
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFILE04:' $psfile04
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFOL05:' $psfolder05
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFILE05:' $psfile05
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFOL06:' $psfolder06
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFILE06:' $psfile06
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFOL07:' $psfolder07
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFILE07:' $psfile07
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFOL08:' $psfolder08
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFILE08:' $psfile08
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFOL09:' $psfolder09
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFILE09:' $psfile09
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFOL10:' $psfolder10
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/PSFILE10:' $psfile10
${If} ${Errors}
${Else}
StrCpy $PinStart "1"
${EndIf}


; Unpin from start ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFOL01:' $usfolder01
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFILE01:' $usfile01
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFOL02:' $usfolder02
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFILE02:' $usfile02
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFOL03:' $usfolder03
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFILE03:' $usfile03
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFOL04:' $usfolder04
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFILE04:' $usfile04
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFOL05:' $usfolder05
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFILE05:' $usfile05
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFOL06:' $usfolder06
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFILE06:' $usfile06
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFOL07:' $usfolder07
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFILE07:' $usfile07
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFOL08:' $usfolder08
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFILE08:' $usfile08
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFOL09:' $usfolder09
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFILE09:' $usfile09
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFOL10:' $usfolder10
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

${GetParameters} $R0
ClearErrors
${GetOptions} $R0 '/USFILE10:' $usfile10
${If} ${Errors}
${Else}
StrCpy $UnPinStart "1"
${EndIf}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

${If} $help == "1"

MessageBox MB_OK "PinTo10 is a command line tool to pin and unpin .exe or .lnk files to or from the Windows 10 taskbar and start menu.$\n$\nWith it you can pin or unpin up to 10 different shortcuts to either the taskbar or start menu in one run of the command.$\n$\nIt replaces functionality that Microsoft have removed from their Windows 10 scripting interface."

MessageBox MB_OK "To pin an application or shortcut to the taskbar (replace XX with 01-10)...$\n/PTFOLXX: Followed by the folder containing the file you want to pin.$\n/PTFILEXX: Followed by the name of the file you want to pin.$\n$\nTo unpin an application or shortcut to the taskbar (replace XX with 01-10)...$\n/UTFOLXX: Followed by the folder containing the file you want to unpin.$\n/UTFILEXX: Followed by the name of the file you want to unpin.$\n$\nTo pin an application or shortcut to the start menu (replace XX with 01-10)...$\n/PSFOLXX: Followed by the folder containing the file you want to pin.$\n/PSFILEXX: Followed by the name of the file you want to pin.$\n$\nTo unpin an application or shortcut to the start menu (replace XX with 01-10)...$\n/USFOLXX: Followed by the folder containing the file you want to unpin.$\n/USFILEXX: Followed by the name of the file you want to unpin."
MessageBox MB_OK "Example for pinning two shortcuts to the taskbar...$\nPinTo10.exe /PTFOL01:'%USERPROFILE:%\Desktop' /PTFILE01:'Word 2016.lnk' /PTFOL02:'%USERPROFILE:%\Desktop' /PTFILE02:'Excel 2016.lnk'$\n$\nExample for unpinning a file to the taskbar...$\nPinTo10.exe /UTFOL01:'C\Windows' /UTFILE01:'notepad.exe'$\n$\nExample for pinning a file to the start menu...$\nPinTo10.exe /PSFOL03:'C\Windows' /PSFILE03:'notepad.exe'$\n$\nExample for unpinning a file from the start menu...$\nPinTo10.exe /USFOL01:'%USERPROFILE:%\Desktop' /USFILE01:'Word 2016.lnk'"
Quit
${EndIf}

${If} $PinTask == "1"
${StdUtils.InvokeShellVerb} $0 $ptfolder01 $ptfile01 5386
${StdUtils.InvokeShellVerb} $0 $ptfolder02 $ptfile02 5386
${StdUtils.InvokeShellVerb} $0 $ptfolder03 $ptfile03 5386
${StdUtils.InvokeShellVerb} $0 $ptfolder04 $ptfile04 5386
${StdUtils.InvokeShellVerb} $0 $ptfolder05 $ptfile05 5386
${StdUtils.InvokeShellVerb} $0 $ptfolder06 $ptfile06 5386
${StdUtils.InvokeShellVerb} $0 $ptfolder07 $ptfile07 5386
${StdUtils.InvokeShellVerb} $0 $ptfolder08 $ptfile08 5386
${StdUtils.InvokeShellVerb} $0 $ptfolder09 $ptfile09 5386
${StdUtils.InvokeShellVerb} $0 $ptfolder10 $ptfile10 5386
Quit
${EndIf}

${If} $UnPinTask == "1"
${StdUtils.InvokeShellVerb} $0 $utfolder01 $utfile01 5387
${StdUtils.InvokeShellVerb} $0 $utfolder02 $utfile02 5387
${StdUtils.InvokeShellVerb} $0 $utfolder03 $utfile03 5387
${StdUtils.InvokeShellVerb} $0 $utfolder04 $utfile04 5387
${StdUtils.InvokeShellVerb} $0 $utfolder05 $utfile05 5387
${StdUtils.InvokeShellVerb} $0 $utfolder06 $utfile06 5387
${StdUtils.InvokeShellVerb} $0 $utfolder07 $utfile07 5387
${StdUtils.InvokeShellVerb} $0 $utfolder08 $utfile08 5387
${StdUtils.InvokeShellVerb} $0 $utfolder09 $utfile09 5387
${StdUtils.InvokeShellVerb} $0 $utfolder10 $utfile10 5387
Quit
${EndIf}

${If} $PinStart == "1"
${StdUtils.InvokeShellVerb} $0 $psfolder01 $psfile01 51201
${StdUtils.InvokeShellVerb} $0 $psfolder02 $psfile02 51201
${StdUtils.InvokeShellVerb} $0 $psfolder03 $psfile03 51201
${StdUtils.InvokeShellVerb} $0 $psfolder04 $psfile04 51201
${StdUtils.InvokeShellVerb} $0 $psfolder05 $psfile05 51201
${StdUtils.InvokeShellVerb} $0 $psfolder06 $psfile06 51201
${StdUtils.InvokeShellVerb} $0 $psfolder07 $psfile07 51201
${StdUtils.InvokeShellVerb} $0 $psfolder08 $psfile08 51201
${StdUtils.InvokeShellVerb} $0 $psfolder09 $psfile09 51201
${StdUtils.InvokeShellVerb} $0 $psfolder10 $psfile10 51201
Quit
${EndIf}

${If} $UnPinStart == "1"
${StdUtils.InvokeShellVerb} $0 $usfolder01 $usfile01 51394
${StdUtils.InvokeShellVerb} $0 $usfolder02 $usfile02 51394
${StdUtils.InvokeShellVerb} $0 $usfolder03 $usfile03 51394
${StdUtils.InvokeShellVerb} $0 $usfolder04 $usfile04 51394
${StdUtils.InvokeShellVerb} $0 $usfolder05 $usfile05 51394
${StdUtils.InvokeShellVerb} $0 $usfolder06 $usfile06 51394
${StdUtils.InvokeShellVerb} $0 $usfolder07 $usfile07 51394
${StdUtils.InvokeShellVerb} $0 $usfolder08 $usfile08 51394
${StdUtils.InvokeShellVerb} $0 $usfolder09 $usfile09 51394
${StdUtils.InvokeShellVerb} $0 $usfolder10 $usfile10 51394
Quit
${EndIf}

MessageBox MB_OK "This is a command line tool.$\rPlease run it with the '/help' switch for more information."
Quit

SectionEnd

But When I run this script I get the following compilation error. For your reference I'm posting full compilation logs.

MakeNSIS v2.50 - Copyright 1995-2015 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.

Processing config:
Processing plugin dlls: "C:\Program Files (x86)\NSIS\Plugins\*.dll"
- AdvSplash::show
- Banner::destroy
- Banner::getWindow
- Banner::show
- BgImage::AddImage
- BgImage::AddText
- BgImage::Clear
- BgImage:😁estroy
- BgImage::Redraw
- BgImage::SetBg
- BgImage::SetReturn
- BgImage::Sound
- Dialer::AttemptConnect
- Dialer::AutodialHangup
- Dialer::AutodialOnline
- Dialer::AutodialUnattended
- Dialer::GetConnectedState
- InstallOptions::dialog
- InstallOptions::initDialog
- InstallOptions::show
- LangDLL::LangDialog
- Math::Script
- NSISdl::download
- NSISdl::download_quiet
- Splash::show
- StartMenu::Init
- StartMenu::Select
- StartMenu::Show
- System::Alloc
- System::Call
- System::Copy
- System::Free
- System::Get
- System::Int64Op
- System::Store
- TypeLib::GetLibVersion
- TypeLib::Register
- TypeLib::UnRegister
- UserInfo::GetAccountType
- UserInfo::GetName
- UserInfo::GetOriginalAccountType
- VPatch::GetFileCRC32
- VPatch::GetFileMD5
- VPatch::vpatchfile
- nsDialogs::Create
- nsDialogs::CreateControl
- nsDialogs::CreateItem
- nsDialogs::CreateTimer
- nsDialogs::GetUserData
- nsDialogs::KillTimer
- nsDialogs::OnBack
- nsDialogs::OnChange
- nsDialogs::OnClick
- nsDialogs::OnNotify
- nsDialogs::SelectFileDialog
- nsDialogs::SelectFolderDialog
- nsDialogs::SetRTL
- nsDialogs::SetUserData
- nsDialogs::Show
- nsExec::Exec
- nsExec::ExecToLog
- nsExec::ExecToStack

!define: "MUI_INSERT_NSISCONF"=""

Changing directory to: "C:\Users\Vivek\Downloads\Nsis"

Processing script file: "C:\Users\Vivek\Downloads\Nsis\PinTo10.nsi"
!include: "StdUtils.nsh"
!define: "StdUtils.Time"="!insertmacro _StdUtils_Time"
!define: "StdUtils.GetMinutes"="!insertmacro _StdUtils_GetMinutes"
!define: "StdUtils.GetHours"="!insertmacro _StdUtils_GetHours"
!define: "StdUtils.GetDays"="!insertmacro _StdUtils_GetDays"
!define: "StdUtils.Rand"="!insertmacro _StdUtils_Rand"
!define: "StdUtils.RandMax"="!insertmacro _StdUtils_RandMax"
!define: "StdUtils.RandMinMax"="!insertmacro _StdUtils_RandMinMax"
!define: "StdUtils.RandList"="!insertmacro _StdUtils_RandList"
!define: "StdUtils.FormatStr"="!insertmacro _StdUtils_FormatStr"
!define: "StdUtils.FormatStr2"="!insertmacro _StdUtils_FormatStr2"
!define: "StdUtils.FormatStr3"="!insertmacro _StdUtils_FormatStr3"
!define: "StdUtils.ScanStr"="!insertmacro _StdUtils_ScanStr"
!define: "StdUtils.ScanStr2"="!insertmacro _StdUtils_ScanStr2"
!define: "StdUtils.ScanStr3"="!insertmacro _StdUtils_ScanStr3"
!define: "StdUtils.TrimStr"="!insertmacro _StdUtils_TrimStr"
!define: "StdUtils.TrimStrLeft"="!insertmacro _StdUtils_TrimStrLeft"
!define: "StdUtils.TrimStrRight"="!insertmacro _StdUtils_TrimStrRight"
!define: "StdUtils.RevStr"="!insertmacro _StdUtils_RevStr"
!define: "StdUtils.ValidFileName"="!insertmacro _StdUtils_ValidFileName"
!define: "StdUtils.ValidPathSpec"="!insertmacro _StdUtils_ValidPathSpec"
!define: "StdUtils.SHFileMove"="!insertmacro _StdUtils_SHFileMove"
!define: "StdUtils.SHFileCopy"="!insertmacro _StdUtils_SHFileCopy"
!define: "StdUtils.AppendToFile"="!insertmacro _StdUtils_AppendToFile"
!define: "StdUtils.ExecShellAsUser"="!insertmacro _StdUtils_ExecShlUser"
!define: "StdUtils.InvokeShellVerb"="!insertmacro _StdUtils_InvkeShlVrb"
!define: "StdUtils.ExecShellWaitEx"="!insertmacro _StdUtils_ExecShlWaitEx"
!define: "StdUtils.WaitForProcEx"="!insertmacro _StdUtils_WaitForProcEx"
!define: "StdUtils.GetParameter"="!insertmacro _StdUtils_GetParameter"
!define: "StdUtils.TestParameter"="!insertmacro _StdUtils_TestParameter"
!define: "StdUtils.ParameterCnt"="!insertmacro _StdUtils_ParameterCnt"
!define: "StdUtils.ParameterStr"="!insertmacro _StdUtils_ParameterStr"
!define: "StdUtils.GetAllParameters"="!insertmacro _StdUtils_GetAllParams"
!define: "StdUtils.GetRealOSVersion"="!insertmacro _StdUtils_GetRealOSVer"
!define: "StdUtils.GetRealOSBuildNo"="!insertmacro _StdUtils_GetRealOSBld"
!define: "StdUtils.GetRealOSName"="!insertmacro _StdUtils_GetRealOSStr"
!define: "StdUtils.GetOSEdition"="!insertmacro _StdUtils_GetOSEdition"
!define: "StdUtils.VerifyOSVersion"="!insertmacro _StdUtils_VrfyRealOSVer"
!define: "StdUtils.VerifyOSBuildNo"="!insertmacro _StdUtils_VrfyRealOSBld"
!define: "StdUtils.HashText"="!insertmacro _StdUtils_HashText"
!define: "StdUtils.HashFile"="!insertmacro _StdUtils_HashFile"
!define: "StdUtils.TimerCreate"="!insertmacro _StdUtils_TimerCreate"
!define: "StdUtils.TimerDestroy"="!insertmacro _StdUtils_TimerDestroy"
!define: "StdUtils.GetLibVersion"="!insertmacro _StdUtils_GetLibVersion"
!define: "StdUtils.SetVerbose"="!insertmacro _StdUtils_SetVerbose"
!define: "StdUtils.Const.ShellVerb.PinToTaskbar"="0"
!define: "StdUtils.Const.ShellVerb.UnpinFromTaskbar"="1"
!define: "StdUtils.Const.ShellVerb.PinToStart"="2"
!define: "StdUtils.Const.ShellVerb.UnpinFromStart"="3"
!include: closed: "StdUtils.nsh"
!include: "C:\Program Files (x86)\NSIS\Include\FileFunc.nsh"
!define: "FILEFUNC_INCLUDED"=""
!include: "C:\Program Files (x86)\NSIS\Include\Util.nsh"
!include: closed: "C:\Program Files (x86)\NSIS\Include\Util.nsh"
!define: "Locate"="!insertmacro LocateCall"
!define: "un.Locate"="!insertmacro LocateCall"
!define: "GetSize"="!insertmacro GetSizeCall"
!define: "un.GetSize"="!insertmacro GetSizeCall"
!define: "DriveSpace"="!insertmacro DriveSpaceCall"
!define: "un.DriveSpace"="!insertmacro DriveSpaceCall"
!define: "GetDrives"="!insertmacro GetDrivesCall"
!define: "un.GetDrives"="!insertmacro GetDrivesCall"
!define: "GetTime"="!insertmacro GetTimeCall"
!define: "un.GetTime"="!insertmacro GetTimeCall"
!define: "GetFileAttributes"="!insertmacro GetFileAttributesCall"
!define: "un.GetFileAttributes"="!insertmacro GetFileAttributesCall"
!define: "GetFileVersion"="!insertmacro GetFileVersionCall"
!define: "un.GetFileVersion"="!insertmacro GetFileVersionCall"
!define: "GetExeName"="!insertmacro GetExeNameCall"
!define: "un.GetExeName"="!insertmacro GetExeNameCall"
!define: "GetExePath"="!insertmacro GetExePathCall"
!define: "un.GetExePath"="!insertmacro GetExePathCall"
!define: "GetParameters"="!insertmacro GetParametersCall"
!define: "un.GetParameters"="!insertmacro GetParametersCall"
!define: "GetOptions"="!insertmacro GetOptionsCall"
!define: "un.GetOptions"="!insertmacro GetOptionsCall"
!define: "GetOptionsS"="!insertmacro GetOptionsSCall"
!define: "un.GetOptionsS"="!insertmacro GetOptionsSCall"
!define: "GetRoot"="!insertmacro GetRootCall"
!define: "un.GetRoot"="!insertmacro GetRootCall"
!define: "GetParent"="!insertmacro GetParentCall"
!define: "un.GetParent"="!insertmacro GetParentCall"
!define: "GetFileName"="!insertmacro GetFileNameCall"
!define: "un.GetFileName"="!insertmacro GetFileNameCall"
!define: "GetBaseName"="!insertmacro GetBaseNameCall"
!define: "un.GetBaseName"="!insertmacro GetBaseNameCall"
!define: "GetFileExt"="!insertmacro GetFileExtCall"
!define: "un.GetFileExt"="!insertmacro GetFileExtCall"
!define: "BannerTrimPath"="!insertmacro BannerTrimPathCall"
!define: "un.BannerTrimPath"="!insertmacro BannerTrimPathCall"
!define: "DirState"="!insertmacro DirStateCall"
!define: "un.DirState"="!insertmacro DirStateCall"
!define: "RefreshShellIcons"="!insertmacro RefreshShellIconsCall"
!define: "un.RefreshShellIcons"="!insertmacro RefreshShellIconsCall"
!include: closed: "C:\Program Files (x86)\NSIS\Include\FileFunc.nsh"
!include: "C:\Program Files (x86)\NSIS\Include\LogicLib.nsh"
!include: closed: "C:\Program Files (x86)\NSIS\Include\LogicLib.nsh"
VIAddVersionKey: "FileVersion" "1.2"
Caption: "PinTo10"
Var: "ptfile01"
Var: "ptfolder01"
Var: "ptfile02"
Var: "ptfolder02"
Var: "ptfile03"
Var: "ptfolder03"
Var: "ptfile04"
Var: "ptfolder04"
Var: "ptfile05"
Var: "ptfolder05"
Var: "ptfile06"
Var: "ptfolder06"
Var: "ptfile07"
Var: "ptfolder07"
Var: "ptfile08"
Var: "ptfolder08"
Var: "ptfile09"
Var: "ptfolder09"
Var: "ptfile10"
Var: "ptfolder10"
Var: "utfile01"
Var: "utfolder01"
Var: "utfile02"
Var: "utfolder02"
Var: "utfile03"
Var: "utfolder03"
Var: "utfile04"
Var: "utfolder04"
Var: "utfile05"
Var: "utfolder05"
Var: "utfile06"
Var: "utfolder06"
Var: "utfile07"
Var: "utfolder07"
Var: "utfile08"
Var: "utfolder08"
Var: "utfile09"
Var: "utfolder09"
Var: "utfile10"
Var: "utfolder10"
Var: "PinTask"
Var: "UnPinTask"
Var: "psfile01"
Var: "psfolder01"
Var: "psfile02"
Var: "psfolder02"
Var: "psfile03"
Var: "psfolder03"
Var: "psfile04"
Var: "psfolder04"
Var: "psfile05"
Var: "psfolder05"
Var: "psfile06"
Var: "psfolder06"
Var: "psfile07"
Var: "psfolder07"
Var: "psfile08"
Var: "psfolder08"
Var: "psfile09"
Var: "psfolder09"
Var: "psfile10"
Var: "psfolder10"
Var: "usfile01"
Var: "usfolder01"
Var: "usfile02"
Var: "usfolder02"
Var: "usfile03"
Var: "usfolder03"
Var: "usfile04"
Var: "usfolder04"
Var: "usfile05"
Var: "usfolder05"
Var: "usfile06"
Var: "usfolder06"
Var: "usfile07"
Var: "usfolder07"
Var: "usfile08"
Var: "usfolder08"
Var: "usfile09"
Var: "usfolder09"
Var: "usfile10"
Var: "usfolder10"
Var: "PinStart"
Var: "UnPinStart"
Var: "help"
PluginDir: "..\..\Plugins\Release_ANSI"
OutFile: "C:\PinTo10.exe"
SilentInstall: silent
ShowInstDetails: hide
Section: "Main"
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $help "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinTask "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $PinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
ClearErrors
!insertmacro: GetOptionsCall
!insertmacro: end of GetOptionsCall
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _Else
!insertmacro: end of _Else
StrCpy $UnPinStart "1" () ()
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: _If
!insertmacro: end of _If
MessageBox: 0: "PinTo10 is a command line tool to pin and unpin .exe or .lnk files to or from the Windows 10 taskbar and start menu.

With it you can pin or unpin up to 10 different shortcuts to either the taskbar or start menu in one run of the command.

It replaces functionality that Microsoft have removed from their Windows 10 scripting interface."
MessageBox: 0: "To pin an application or shortcut to the taskbar (replace XX with 01-10)...
/PTFOLXX: Followed by the folder containing the file you want to pin.
/PTFILEXX: Followed by the name of the file you want to pin.

To unpin an application or shortcut to the taskbar (replace XX with 01-10)...
/UTFOLXX: Followed by the folder containing the file you want to unpin.
/UTFILEXX: Followed by the name of the file you want to unpin.

To pin an application or shortcut to the start menu (replace XX with 01-10)...
/PSFOLXX: Followed by the folder containing the file you want to pin.
/PSFILEXX: Followed by the name of the file you want to pin.

To unpin an application or shortcut to the start menu (replace XX with 01-10)...
/USFOLXX: Followed by the folder containing the file you want to unpin.
/USFILEXX: Followed by the name of the file you want to unpin."
MessageBox: 0: "Example for pinning two shortcuts to the taskbar...
PinTo10.exe /PTFOL01:'%USERPROFILE:%\Desktop' /PTFILE01:'Word 2016.lnk' /PTFOL02:'%USERPROFILE:%\Desktop' /PTFILE02:'Excel 2016.lnk'

Example for unpinning a file to the taskbar...
PinTo10.exe /UTFOL01:'C\Windows' /UTFILE01:'notepad.exe'

Example for pinning a file to the start menu...
PinTo10.exe /PSFOL03:'C\Windows' /PSFILE03:'notepad.exe'

Example for unpinning a file from the start menu...
PinTo10.exe /USFOL01:'%USERPROFILE:%\Desktop' /USFILE01:'Word 2016.lnk'"
Quit
!insertmacro: _EndIf
!insertmacro: end of _EndIf
!insertmacro: _If
!insertmacro: end of _If
!insertmacro: _StdUtils_InvkeShlVrb
Push: $ptfolder01
Push: $ptfile01
Push: 5386
Invalid command: StdUtils::InvokeShellVerb
Error in macro _StdUtils_InvkeShlVrb on macroline 4
Error in script "C:\Users\Vivek\Downloads\Nsis\PinTo10.nsi" on line 768 -- aborting creation process


When I'm trying to call some other methods, then also I'm getting the same error in line ${StdUtils.Rand} $1.

!include 'StdUtils.nsh'

Section
${StdUtils.Rand} $1
DetailPrint "Random number obtained via StdUtils::Rand is: $1"
SectionEnd
Anders#
You did not put StdUtils.dll in the correct plugin folder.

You are not supposed to pin shortcuts to the taskbar anyway, please don't do this.
viveknuna#
Originally Posted by Anders View Post
You did not put StdUtils.dll in the correct plugin folder.

You are not supposed to pin shortcuts to the taskbar anyway, please don't do this.


I have moved dll to plugin folder.
Why I should not pin exe or shortcut to taskbar?PinTo10.exe does the same.
Anders#
Originally Posted by viveknuna View Post
Why I should not pin exe or shortcut to taskbar?PinTo10.exe does the same.
Because the user is supposed to be the only one pinning things.

See http://blogs.msdn.com/b/oldnewthing/.../10583474.aspx and http://blogs.msdn.com/b/oldnewthing/.../03/54760.aspx