From cbaadb6fc91b237612d7c31f4700dca7cc970114 Mon Sep 17 00:00:00 2001 From: Pax1601 Date: Thu, 21 Dec 2023 15:33:28 +0100 Subject: [PATCH] Added fallback if powershell not installed --- install.bat | 9 ++++++++- scripts/install.bat | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/install.bat b/install.bat index f9faab85..8aee2935 100644 --- a/install.bat +++ b/install.bat @@ -1,2 +1,9 @@ @echo OFF -powershell ".\scripts\install.bat | tee output.log" \ No newline at end of file + +WHERE /q powershell +if %ERRORLEVEL% NEQ 0 ( + .\scripts\install.bat +) else ( + powershell ".\scripts\install.bat | tee output.log" +) + diff --git a/scripts/install.bat b/scripts/install.bat index 5862d51a..47572e3f 100644 --- a/scripts/install.bat +++ b/scripts/install.bat @@ -11,7 +11,15 @@ echo "* |___/ |_| * echo "*********************************************************************" echo Welcome to the DCS Olympus v{{OLYMPUS_VERSION_NUMBER}} installation script. Please wait while the necessary dependencies are installed! echo: -echo The output of this script is also available in the file %CD%\output.log. If you encounter any error, make sure to attach that file to your help request! + + +WHERE /q powershell +if %ERRORLEVEL% NEQ 0 ( + echo Powershell not installed in the system, no output log available. +) else ( + echo The output of this script is also available in the file %CD%\output.log. If you encounter any error, make sure to attach that file to your help request! +) + timeout /t 5 echo Checking if node.js framework is installed...