stop-digital-human.bat 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. @echo off
  2. REM Stop Digital Human Services Script
  3. REM This script stops all frontend and backend services
  4. echo ========================================
  5. echo Stopping Digital Human Services...
  6. echo ========================================
  7. echo.
  8. REM Stop Node.js processes (frontend)
  9. echo [1/3] Stopping frontend service (Node.js)...
  10. taskkill /F /IM node.exe >nul 2>&1
  11. if errorlevel 1 (
  12. echo No Node.js processes found
  13. ) else (
  14. echo Frontend service stopped
  15. )
  16. echo.
  17. REM Stop Python processes (backend)
  18. echo [2/3] Stopping backend service (Python)...
  19. taskkill /F /IM python.exe >nul 2>&1
  20. taskkill /F /IM pythonw.exe >nul 2>&1
  21. if errorlevel 1 (
  22. echo No Python processes found
  23. ) else (
  24. echo Backend service stopped
  25. )
  26. echo.
  27. REM Restore power settings (allow sleep/hibernate again)
  28. echo [3/5] Restoring power settings...
  29. REM Restore default sleep timeouts (15 minutes for AC, 5 minutes for DC)
  30. powercfg /change standby-timeout-ac 15 >nul 2>&1
  31. powercfg /change standby-timeout-dc 5 >nul 2>&1
  32. powercfg /change hibernate-timeout-ac 0 >nul 2>&1
  33. powercfg /change hibernate-timeout-dc 0 >nul 2>&1
  34. powercfg /change monitor-timeout-ac 10 >nul 2>&1
  35. powercfg /change monitor-timeout-dc 5 >nul 2>&1
  36. echo Power settings restored
  37. echo.
  38. REM Show taskbar (restore)
  39. echo [4/5] Restoring taskbar...
  40. if exist "%~dp0show-taskbar.ps1" (
  41. powershell -ExecutionPolicy Bypass -WindowStyle Hidden -File "%~dp0show-taskbar.ps1" 2>nul
  42. echo Taskbar restored
  43. ) else (
  44. echo Taskbar restore script not found (taskbar may still be hidden)
  45. )
  46. echo.
  47. REM Stop Chrome processes (optional)
  48. echo [5/5] Stopping Chrome (if running)...
  49. taskkill /F /IM chrome.exe >nul 2>&1
  50. if errorlevel 1 (
  51. echo No Chrome processes found
  52. ) else (
  53. echo Chrome stopped
  54. )
  55. echo.
  56. REM Stop Chrome processes (optional, uncomment if needed)
  57. REM echo Stopping Chrome...
  58. REM taskkill /F /IM chrome.exe >nul 2>&1
  59. echo ========================================
  60. echo All services stopped!
  61. echo ========================================
  62. echo.
  63. pause