You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
832 B
24 lines
832 B
@echo off
|
|
chcp 65001
|
|
echo Формат использования PythonWinInit.cmd [console,script] [имя запускаемого процесса.exe] [имя убиваемого процесса.exe]
|
|
echo Пример использования PythonWinInit.cmd script orpa-rbt.exe orpa-rbt.exe
|
|
|
|
if [%2]==[] goto :python-env
|
|
goto create-exe
|
|
:create-exe
|
|
copy /Y "%~dp0..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe" "%~dp0..\Resources\WPy64-3720\python-3.7.2.amd64\%2"
|
|
if [%3]==[] goto :python-env
|
|
goto taskkill
|
|
:taskkill
|
|
taskkill /im "%3" /F /fi "username eq %username%"
|
|
goto :python-env
|
|
:python-env
|
|
call "%~dp0PythonWinConfigure.cmd"
|
|
echo Инициализация Python окружения прошла успешно!
|
|
if [%1]==[] goto :console
|
|
if [%1]==[console] goto :console
|
|
goto :eof
|
|
:console
|
|
cmd
|
|
:eof
|
|
@echo on |