Home › Forums › Software Development › Starting Tobii.EyeX.Engine
Tagged: developer
- This topic has 1 reply, 2 voices, and was last updated 6 years ago by Grant [Tobii].
- AuthorPosts
- 16/11/2018 at 23:44 #9029TWParticipant
Hello!
Before I can use EyeXHost…
_EyeXHost = New EyeXFramework.EyeXHost
_EyeXHost.Start()… I need to make sure that EyeX (process name: “Tobii.EyeX.Engine”) is running.
How can I start it if it’s not running?
I could hard code the path as
\Program Files (x86)\Tobii\Tobii EyeX\Tobii.EyeX.Engine.exe
and start this process.
However, I wonder if it’s safe to hard code it and if not, what should I do instead to run EyeX?
Thank you.
26/11/2018 at 09:43 #9046Grant [Tobii]KeymasterHi @tw2018, thanks for your patience whilst I tried to find the best solution for your needs. I am afraid that I can now confirm that there is no process within the Core SDK directly to check to see if Tobii.EyeX.Engine is running.
However, it should be simple enough for you to create a batch file (or change to whichever language you prefer) that will check to see if the Tobii Service of which Tobii.EyeX.Engine executes is running, and if not will attempt to launch.
@ECHO OFF SET SvcName=tobii service SC QUERYEX "%SvcName%" | FIND "STATE" | FIND /v "RUNNING" > NUL && ( ECHO %SvcName% is not running ECHO START %SvcName% NET START "%SvcName%" > NUL || ( ECHO "%SvcName%" wont start EXIT /B 1 ) ECHO "%SvcName%" is started EXIT /B 0 ) || ( ECHO "%SvcName%" is running EXIT /B 0 )
Please bear in mind that the command to start the service may require administrator rights depending on the setup on your system.
Hopefully this provides you with the workaround you need, but please let us know if we can be of any further assistance.
- AuthorPosts
- You must be logged in to reply to this topic.