Add persistent desktop supervisor for ERP Local Agent

This commit is contained in:
A R R R Associates
2026-08-20 20:01:59 +05:30
parent f7ebd32597
commit de8b32b06d
14 changed files with 707 additions and 72 deletions
@@ -0,0 +1,26 @@
Option Explicit
Dim fso, shell, baseDir, launcher, pyw, py, cmd
Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")
baseDir = fso.GetParentFolderName(WScript.ScriptFullName)
launcher = baseDir & "\ERPAgentDashboard.pyw"
pyw = baseDir & "\.venv\Scripts\pythonw.exe"
py = baseDir & "\.venv\Scripts\python.exe"
If Not fso.FileExists(launcher) Then
MsgBox "ERPAgentDashboard.pyw was not found in " & baseDir, 16, "ERP Local Agent"
WScript.Quit
End If
If fso.FileExists(pyw) Then
cmd = """" & pyw & """ """ & launcher & """"
ElseIf fso.FileExists(py) Then
cmd = """" & py & """ """ & launcher & """"
Else
MsgBox "ERP Local Agent Python environment was not found.", 16, "ERP Local Agent"
WScript.Quit
End If
shell.Run cmd, 0, False