@setlocal enableextensions @setlocal enabledelayedexpansion @set PYTHONPATH=C:\Python27 @if NOT EXIST "%PYTHONPATH%" @( @echo. @echo. @echo.NOTE: %~nx0 incorrectly assumes you installed Python at %PYTHONPATH% @echo. @echo. There is no directory there so you, the user, need to tell the BirdStrike @echo. program where your Python program ^(version 2.7.*^) is installed. @echo. We are not ready yet to use Python 3.0 or greater.... just the latest 2.7 @echo. @echo. In notepad, please open file: @echo. @echo. %~dpnx0 @echo. @echo. and change the 3rd line to tell us where Python is REALLY located @echo. @echo. Right now, you will see the following line. You need to modify the right side @echo. of the assignment to point to the directory path holding 'python.exe' @echo. @echo. @set PYTHONPATH=C:\Python27 @echo. @echo. C:\Python27 is just where the Python 2.7 installer defaults. @echo. You might know the location because you had to change it when you @echo. installed Python 2.7 @echo. @echo. NOTE: After you hit a key, this window will disappear @echo. @echo. @pause @exit /b 1 ) @for %%I in ( %1 ) do @set arg1=%%~I @for %%I in ( %2 ) do @set arg2=%%~I @for %%I in ( %3 ) do @set arg3=%%~I @for %%I in ( %4 ) do @set arg4=%%~I @for %%I in ( %5 ) do @set arg5=%%~I @set outfl=%HOMEDRIVE%%HOMEPATH%\BirdStrikeRunLog.txt @set PATH=%PYTHONPATH%;%PATH% @echo.OUTPUTFILENAME=%outfl%> %outfl% @echo.PYTHONPATH=%PYTHONPATH%>> %outfl% @echo.ARG1=%arg1%>> %outfl% 2>&1 @echo.ARG2=%arg2%>> %outfl% 2>&1 @echo.ARG3=%arg3%>> %outfl% 2>&1 @echo.ARG4=%arg4%>> %outfl% 2>&1 @echo.ARG5=%arg5%>> %outfl% 2>&1 @"%PYTHONPATH%\python.exe" --version>> %outfl% 2>&1 @"%PYTHONPATH%\python.exe" %arg1% %arg2% %arg3% %arg4% %arg5%>> %outfl% 2>&1 @set EXITVAL=%ERRORLEVEL% type %outfl% @pause @exit /b %EXITVAL% @endlocal @endlocal