From 9055ccf63560236f4da908c0fe585bb0baa38af7 Mon Sep 17 00:00:00 2001 From: USER Date: Wed, 27 Sep 2023 21:05:01 +0100 Subject: [PATCH] . --- bin/InstallSSH2.bat | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/bin/InstallSSH2.bat b/bin/InstallSSH2.bat index 01cdde8..8af5a5d 100755 --- a/bin/InstallSSH2.bat +++ b/bin/InstallSSH2.bat @@ -9,6 +9,7 @@ mkdir %PACKAGES% call %WPUBLIC%\bin\SpeedUpPS.bat +echo "------- attempting uninstall first" set PSFILE="C:\Program Files\OpenSSH\uninstall-sshd.ps1" if exist %PSFILE% ( echo "SSH uninstall script" @@ -24,24 +25,26 @@ rmdir /s/q "C:\Packages\openssh-portable-9.2.2.0" del /f/s/q "C:\Packages\OpenSSH-Win64\*.*" rmdir /s/q "C:\Packages\OpenSSH-Win64" -echo "Download and unpack OpenSSH" +echo "------- Download and unpack OpenSSH" set PSFILE="%WPUBLIC%\bin\Download.ps1" Powershell.exe -ExecutionPolicy Bypass -File %PSFILE% -if exist "C:\Program Files\OpenSSH\sshd.exe" ( - echo "OPENSSH already installed" - ) - else ( +@REM if exist "C:\Program Files\OpenSSH\sshd.exe" ( +@REM echo "OPENSSH already installed" +@REM ) +@REM else ( echo "NEW installation" robocopy "%PACKAGES%\OpenSSH-Win64" "C:\Program Files\OpenSSH" /E - ) - +@REM ) + +echo "------- attempting install" set PSFILE="C:\Program Files\OpenSSH\install-sshd.ps1" if exist %PSFILE% ( echo "SSH install script" Powershell.exe -ExecutionPolicy Bypass -File %PSFILE% ) +echo "------- fix firewall" set PSFILE="%WPUBLIC%\bin\Firewall.ps1" if exist %PSFILE% ( Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%