Caption "InvokeShellVerb" OutFile "InvokeShellVerb.exe" !addincludedir "..\..\Include" !include 'StdUtils.nsh' RequestExecutionLevel user ShowInstDetails show Section "任务栏锁定" ${StdUtils.InvokeShellVerb} $0 "$SYSDIR" "mspaint.exe" ${StdUtils.Const.ShellVerb.PinToTaskbar} StrCmp "$0" "ok" 0 +3 MessageBox MB_TOPMOST "任务栏锁定成功!" Goto +2 MessageBox MB_TOPMOST "任务栏锁定失败!" SectionEnd Section "任务栏解锁" ${StdUtils.InvokeShellVerb} $0 "$SYSDIR" "mspaint.exe" ${StdUtils.Const.ShellVerb.UnpinFromTaskbar} StrCmp "$0" "ok" 0 +3 MessageBox MB_TOPMOST "任务栏解锁成功!" Goto +2 MessageBox MB_TOPMOST "任务栏解锁失败!" SectionEnd Section "开始菜单锁定" ${StdUtils.InvokeShellVerb} $0 "$SYSDIR" "mspaint.exe" ${StdUtils.Const.ShellVerb.PinToStart} StrCmp "$0" "ok" 0 +3 MessageBox MB_TOPMOST "开始菜单锁定成功!" Goto +2 MessageBox MB_TOPMOST "开始菜单锁定失败!" SectionEnd Section "开始菜单解锁" ${StdUtils.InvokeShellVerb} $0 "$SYSDIR" "mspaint.exe" ${StdUtils.Const.ShellVerb.UnpinFromStart} StrCmp "$0" "ok" 0 +3 MessageBox MB_TOPMOST "开始菜单解锁成功!" Goto +2 MessageBox MB_TOPMOST "开始菜单解锁失败!" SectionEnd