diff --git a/MakeInstall.bat b/MakeInstall.bat index d2e6dbf..3786e82 100644 --- a/MakeInstall.bat +++ b/MakeInstall.bat @@ -28,9 +28,20 @@ exit /B setlocal enableDelayedExpansion REM Setup initial vars -set "script_name=MakeInstall.py" +set "script_name=%~n0.py" set "thisDir=%~dp0" +REM Check for our script first +if not exist "!thisDir!\!script_name!" ( + echo Could not find !script_name!. + echo Please make sure to run this script from the same directory + echo as !script_name!. + echo. + echo Press [enter] to quit. + pause > nul + exit /b +) + REM Get python location FOR /F "tokens=* USEBACKQ" %%F IN (`where python 2^> nul`) DO ( SET "python=%%F" @@ -57,4 +68,4 @@ if "%*"=="" ( "!python!" "!thisDir!!script_name!" ) else ( "!python!" "!thisDir!!script_name!" %* -) \ No newline at end of file +)