pwman.cmd 849 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. @echo off
  2. setlocal ENABLEDELAYEDEXPANSION
  3. set PYPROG=pwman
  4. set PATH=%PATH%;C:\WINDOWS;C:\WINDOWS\SYSTEM32
  5. for /D %%f in ( "C:\PYTHON*" ) do set PATH=!PATH!;%%f
  6. for /D %%f in ( "%USERPROFILE%\AppData\Local\Programs\Python\Python*" ) do set PATH=!PATH!;%%f;%%f\Scripts
  7. py -h >NUL 2>&1
  8. if %ERRORLEVEL% EQU 0 goto exec_py
  9. python3 -h >NUL 2>&1
  10. if %ERRORLEVEL% EQU 0 goto exec_python3
  11. python -h >NUL 2>&1
  12. if %ERRORLEVEL% EQU 0 goto exec_python
  13. echo Did not find Python 3.x in the PATH.
  14. echo Please make sure Python 3.x is installed correctly.
  15. pause
  16. goto end
  17. :exec_py
  18. @echo on
  19. py -3 -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
  20. @goto end
  21. :exec_python3
  22. @echo on
  23. python3 -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
  24. @goto end
  25. :exec_python
  26. @echo on
  27. python -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
  28. @goto end
  29. :end