' 代码分析器静默守护进程
' 完全后台运行，不弹出任何CMD窗口

Set WshShell = CreateObject("WScript.Shell")
strWorkingDir = "F:\水利智学系统\可运行版（解压即用，双击start.bat）"
strPythonW = "D:\Python311\pythonw.exe"
strScript = "system_brain_analyzer_v2.py"

' 切换到工作目录
WshShell.CurrentDirectory = strWorkingDir

' 构建命令行
strCmd = strPythonW & " " & strScript

' 循环守护
Do While True
    ' 静默启动Python分析器（无窗口，0=隐藏）
    WshShell.Run strCmd, 0, True
    
    ' 主脚本退出，等待3秒后重启
    WScript.Sleep 3000
Loop
