This commit is contained in:
USER
2023-10-03 18:24:45 +01:00
parent c35a04a807
commit 65cdeb8d5e
3 changed files with 25 additions and 22 deletions

View File

@ -1,3 +1,6 @@
Run InstallSSH.bat in an Administrator command prompt
1) Download zip of repo
2) mkdir C:\Scripts
3) Unpack wPublic to C:\Scripts\wPublic
4) Start command prompt in ADMINISTRATOR mode
5) Run C:\Scripts\wPublic\InstalSSh.bat in the above command prompt

View File

@ -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"
@ -18,27 +19,32 @@ if exist %PSFILE% (
del /f/s/q "C:\Program Files\OpenSSH\*.*"
rmdir /s/q "C:\Program Files\OpenSSH"
del /f/s/q "C:\Packages\openssh-portable-9.2.2.0\*.*"
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%

View File

@ -9,7 +9,6 @@ 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"
@ -19,32 +18,27 @@ if exist %PSFILE% (
del /f/s/q "C:\Program Files\OpenSSH\*.*"
rmdir /s/q "C:\Program Files\OpenSSH"
del /f/s/q "C:\Packages\openssh-portable-9.2.2.0\*.*"
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%
@REM if exist "C:\Program Files\OpenSSH\sshd.exe" (
@REM echo "OPENSSH already installed"
@REM )
@REM else (
if exist "C:\Program Files\OpenSSH\sshd.exe" (
echo "OPENSSH already installed"
)
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%