partmgr-win.bat 661 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. @ECHO OFF
  2. SET PYPROG=partmgr-gui
  3. SETLOCAL ENABLEDELAYEDEXPANSION
  4. SET PATH=%PATH%;C:\WINDOWS;C:\WINDOWS\SYSTEM32
  5. FOR /D %%f IN ( C:\PYTHON* ) DO SET PATH=!PATH!;%%f
  6. py -h >NUL 2>&1
  7. if %ERRORLEVEL% EQU 0 GOTO exec_py
  8. python3 -h >NUL 2>&1
  9. if %ERRORLEVEL% EQU 0 GOTO exec_python3
  10. python -h >NUL 2>&1
  11. if %ERRORLEVEL% EQU 0 GOTO exec_python
  12. echo Did not find Python 3.x in the PATH.
  13. echo Please make sure Python 3.x is installed correctly.
  14. pause
  15. goto end
  16. :exec_py
  17. @ECHO ON
  18. py -3 -O %PYPROG%
  19. GOTO end
  20. :exec_python3
  21. @ECHO ON
  22. python3 -O %PYPROG%
  23. GOTO end
  24. :exec_python
  25. @ECHO ON
  26. python -O %PYPROG%
  27. GOTO end
  28. :end