REM update script

cd /d "${INSTALL_PATH}"

call servicestop.cmd
call servicedelete.cmd

REM pkill has been implement in PowerShell script "beforepacks.ps1" to check the commandLine fullPath, to be sure it is the right AdxAdmin or Runtime
pwsh -NoProfile -NonInteractive -Executionpolicy remotesigned -File  "${BEFORE_UPDATE_SCRIPT_PS_PATH}" -InstallPath  "${INSTALL_PATH}"
if errorlevel 1 (
    echo Error during beforepacks.ps1 execution
)
if exist vcredist_x64.exe  del /F /Q vcredist_x64.exe
if exist "SAGE ERP"*.txt   del /F /Q "SAGE ERP"*.txt
if exist "SAGE ERP"*.htm   del /F /Q "SAGE ERP"*.htm

exit 0