This commit is contained in:
USER
2023-01-17 21:21:25 +00:00
parent c60cbcb429
commit f92b74c2d7

View File

@ -9,6 +9,15 @@ mkdir %PACKAGES%
call %WPUBLIC%\bin\SpeedUpPS.bat call %WPUBLIC%\bin\SpeedUpPS.bat
set PSFILE="C:\Program Files\OpenSSH\uninstall-sshd.ps1"
if exist %PSFILE% (
echo "SSH uninstall script"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
)
del /f/s/q "C:\Program Files\OpenSSH\*.*"
rmdir /s/q "C:\Program Files\OpenSSH"
echo "Download and unpack OpenSSH" echo "Download and unpack OpenSSH"
set PSFILE="%WPUBLIC%\bin\Download.ps1" set PSFILE="%WPUBLIC%\bin\Download.ps1"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE% Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
@ -21,10 +30,9 @@ if exist "C:\Program Files\OpenSSH\sshd.exe" (
robocopy "%PACKAGES%\OpenSSH-Win64" "C:\Program Files\OpenSSH" /E robocopy "%PACKAGES%\OpenSSH-Win64" "C:\Program Files\OpenSSH" /E
) )
if exist "C:\Program Files\OpenSSH\install-sshd.ps1" (
echo "SSH install script"
set PSFILE="C:\Program Files\OpenSSH\install-sshd.ps1" set PSFILE="C:\Program Files\OpenSSH\install-sshd.ps1"
if exist %PSFILE% (
echo "SSH install script"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE% Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
) )