mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:46:30 +00:00
6229ca8a03
zoom fix
39 lines
948 B
Batchfile
39 lines
948 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
REM Verify that all four arguments were provided
|
|
if "%~4"=="" (
|
|
echo Error: Missing arguments.
|
|
echo Usage: %0 ^<parent_pid^> ^<installer_path^> ^<app_path^> ^<encrypted_creds^>
|
|
exit /b 1
|
|
)
|
|
|
|
set "PARENT_PID=%1"
|
|
set "INSTALLER_PATH=%2"
|
|
set "MAIN_APP_PATH=%3"
|
|
set "CREDS=%~4"
|
|
|
|
:WAIT_FOR_PARENT_EXIT
|
|
echo Waiting for parent process (PID: %PARENT_PID%) to close...
|
|
tasklist /fi "pid eq %PARENT_PID%" | find "%PARENT_PID%" >nul
|
|
if %errorlevel% == 0 (
|
|
timeout /t 1 /nobreak >nul
|
|
goto WAIT_FOR_PARENT_EXIT
|
|
)
|
|
|
|
start "" /wait "%INSTALLER_PATH%" /VERYSILENT
|
|
|
|
del "%INSTALLER_PATH%"
|
|
echo Installed new version %INSTALLER_PATH%
|
|
|
|
start "" "%MAIN_APP_PATH%" -c "%CREDS%"
|
|
|
|
echo Loading...
|
|
:WAIT_FOR_APP_START
|
|
timeout /t 1 /nobreak >nul
|
|
tasklist /fi "imagename eq azaion-inference.exe" | find "azaion-inference.exe" >nul
|
|
if %errorlevel% neq 0 goto WAIT_FOR_APP_START
|
|
|
|
timeout /t 5 /nobreak >nul
|
|
echo Process started.
|
|
endlocal |