Files
arrr-erp/app/modules/documents/local_agent_runtime/Open ERP Local Agent Dashboard.vbs
T
2026-08-20 20:01:59 +05:30

27 lines
801 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 = """" & 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