uninstall.bat 953 Bytes
@echo off
rem Stop and remove the StoreEdge Windows service of THIS folder (files, config and logs are kept).
rem With several instances on one computer (StoreEdge, StoreEdge-dev ...) run the uninstall.bat inside the instance folder;
rem only that instance's service is removed.
setlocal
net session >nul 2>&1
if errorlevel 1 (
  echo [ERROR] Please right-click uninstall.bat and choose "Run as administrator".
  pause
  exit /b 1
)
cd /d "%~dp0"
if not exist config.ini if exist "C:\autoRestore\StoreEdge\StoreEdge.exe" cd /d "C:\autoRestore\StoreEdge"
set "SVC=StoreEdge"
set PYTHONNOUSERSITE=1
if exist python38\python.exe for /f "usebackq delims=" %%s in (`python38\python.exe main.py service-name 2^>nul`) do set "SVC=%%s"
if not exist %SVC%.exe (
  echo %SVC%.exe not found in %CD% - nothing to uninstall.
  pause
  exit /b 0
)
%SVC%.exe stop
%SVC%.exe uninstall
echo Service %SVC% removed. The cloud console will show this edge as offline.
pause