diff --git a/install.cmd b/install.cmd new file mode 100644 index 0000000..f08a59c --- /dev/null +++ b/install.cmd @@ -0,0 +1,4 @@ +@echo off + +%* +exit /b %errorlevel% diff --git a/pinapp.cmd b/pinapp.cmd new file mode 100644 index 0000000..3693796 --- /dev/null +++ b/pinapp.cmd @@ -0,0 +1,28 @@ +@echo off + +if not exist "%systemdrive%\Install\system\getvariables.cmd" ( + echo Missing %systemdrive%\Install\system\getvariables.cmd + exit /b 1 +) +call "%systemdrive%\Install\system\getvariables.cmd" +if [%pinappmod%] == [] ( + echo PINAPPMOD not set! + exit /b 1 +) + +if not exist %pinappmod% ( + echo Missing %pinappmod% + exit /b 1 +) +set _exename=%1 + +if [%_exename%] == [] ( + echo Usage: %0 ^ + exit /b 1 +) +if not exist %_exename% ( + echo Missing executable %_exename% + exit /b 1 +) +echo Pinning application to task bar +powershell -Command "& import-module %pinappmod%; Set-PinnedApplication -Action PinToTaskbar -FilePath ""%_exename%""" diff --git a/unpinapp.cmd b/unpinapp.cmd new file mode 100644 index 0000000..88c726c --- /dev/null +++ b/unpinapp.cmd @@ -0,0 +1,26 @@ +@echo off + +if not exist "%systemdrive%\Install\system\getvariables.cmd" ( + echo Missing %systemdrive%\Install\system\getvariables.cmd + exit /b 1 +) +call "%systemdrive%\Install\system\getvariables.cmd" +if [%pinappmod%] == [] ( + echo PINAPPMOD not set! + exit /b 1 +) + +if not exist %pinappmod% ( + echo Missing %pinappmod% + exit /b 1 +) +set _lnkname=%1 + +if [%_lnkname%] == [] ( + echo Usage: %0 ^ + exit /b 1 +) +for /r "%appdir%\Microsoft\Internet Explorer\Quick Launch\User Pinned\Taskbar" %%j in ("%_lnkname%*.lnk") do ( + echo Removing %%j + powershell -Command "& import-module %pinappmod%; Set-PinnedApplication -Action UnPinFromTaskbar -FilePath ""%%j""" +)