@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%"""