mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 12:56:30 +00:00
rework autoupdate to script only
zoom fix
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
@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
|
||||
Reference in New Issue
Block a user