@echo off & (if not "%cmd_shelled%" == "" goto shell2) & call :shell1 %~f0 %* 2>&1 <nul & goto return
:shell1
c:\windows\system32\cmd.exe /c set cmd_shelled=1^& %* & (if ERRORLEVEL 1 echo ERROR) & goto return
:shell2
set cmd_shelled=
cd %~dp0

call :ecc copy /y sshd-shell-select.exe c:\windows\
call :ecc reg add HKLM\SOFTWARE\OpenSSH /f
call :ecc reg add HKLM\SOFTWARE\OpenSSH /f /v DefaultShell /d c:\windows\sshd-shell-select.exe
goto return

:ecc
echo %*
%*
if errorlevel 1 exit
goto return

:return
