Files
arrr-erp/app/modules/documents/local_agent_runtime/Open ERP Local Agent Dashboard.vbs
T
2026-08-22 19:36:51 +05:30

27 lines
842 B
Plaintext

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 = Chr(34) & pyw & Chr(34) & " " & Chr(34) & launcher & Chr(34)
ElseIf fso.FileExists(py) Then
cmd = Chr(34) & py & Chr(34) & " " & Chr(34) & launcher & Chr(34)
Else
MsgBox "ERP Local Agent Python environment was not found.", 16, "ERP Local Agent"
WScript.Quit
End If
shell.Run cmd, 0, False