@echo off
python test.py
echo.
echo ** Please click the "X" button in the upper-right corner to close this window **
:loop
timeout /t 1 /nobreak >nul
tasklist | find "cmd.exe" >nul
if not errorlevel 1 goto loop
the tartget exe file is %windir%\System32\cmd.exe "/K" C:\Users\zhaib\MiniConda3\Scripts\activate.bat C:\Users\zhaib\MiniConda3
,
extract C:\Users\zhaib\MiniConda3\Scripts\activate.bat C:\Users\zhaib\MiniConda3
set into the following code.
@echo off
call C:\Users\zhaib\MiniConda3\Scripts\activate.bat C:\Users\zhaib\MiniConda3
call activate env_pytorch
:: do not use call conda activate env_pytorch or call source activate env_pytorch
python test.py
echo.
echo ** Please click the "X" button in the upper-right corner to close this window **
:loop
timeout /t 1 /nobreak >nul
tasklist | find "cmd.exe" >nul
if not errorlevel 1 goto loop
don’t know how to implement.
echo.
echo ** Please click the "X" button in the upper-right corner to close this window **
:loop
timeout /t 1 /nobreak >nul
tasklist | find "cmd.exe" >nul
if not errorlevel 1 goto loop