os.execute("cmd /c start /MIN "..path.."/bmail.cmd")
This exactly code doing fine on 0.4.1.1 GUI version but not on service version.
Tested on two hubs with same config.
It seems that service version can't do os.execute at all.
System is: Microsoft(R) Windows(R) Server 2003, Enterprise Edition 5.2.3790 Service Pack 2 build 3790
How could it be solved?
Damn these slashes! Move slash to path variable and it works.
BTW, another bug - OnError always returns C:\ptokax\scripts path, no matter where are real files.
I mean OnError=function always returns
Error C:\ptokax\scripts\*scriptname*.lua
But my hub is on E:\
I see I'm bad explainer...
1) os.execute issue was solved by moving slash (but strange why this not needed in GUI version)
So this code not works in service (but works in GUI):
path=Core.GetPtokaXPath().."scripts"
os.execute("cmd /c start /MIN "..path.."/bmail.cmd")
and this works in both:
path=Core.GetPtokaXPath().."scripts/"
os.execute("cmd /c start /MIN "..path.."bmail.cmd")
2) And then I reported another issue:
OnError=function(msg)
local admin = "sphinx"
if admin then Core.SendPmToUser(admin,BOTNAME,msg) end
end
My hub is on E:\Bla1\Bla2\ so on... no matter where is it located, errors (if any) are ALWAYS reported like this: Syntax C:\ptokax\scripts\myscript.lua:777:bla-bla-bla. But again, this issue isn't occur in GUI version.