From ec74b062829c6d5e832701110a7de77d65e981d0 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 16 Mar 2019 23:02:44 -0600 Subject: [PATCH] Verify Python can be run before launching script * Fixes issue #91 --- .bin/Scripts/Launch.cmd | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.bin/Scripts/Launch.cmd b/.bin/Scripts/Launch.cmd index 18c304f2..a101db7f 100644 --- a/.bin/Scripts/Launch.cmd +++ b/.bin/Scripts/Launch.cmd @@ -263,6 +263,7 @@ call :ExtractOrFindPath || goto ErrorProgramNotFound set "script=%_path%\%L_ITEM%" rem Verify +"%PYTHON%" --version >nul || goto ErrorPythonUnsupported if not exist "%script%" goto ErrorScriptNotFound rem Run @@ -435,6 +436,16 @@ echo ERROR: Office version not supported by this script. start "" "explorer.exe" "%client_dir%\Office" goto Abort +:ErrorPythonUnsupported +rem The Windows installation lacks Windows update KB2999226 needed to run Python +echo. +echo ERROR: Failed to run Python, try installing Windows update KB2999226. +echo NOTE: That update is from October 2015 so this system is SEVERELY outdated +if exist "%bin%\..\Installers\Extras\Windows Updates" ( + start "" "explorer.exe" "%bin%\..\Installers\Extras\Windows Updates" +) +goto Abort + :ErrorQuickBooksSourceNotFound echo. echo ERROR: QuickBooks source "%L_ITEM%" not found.