Home Forums Software Development Starting Tobii.EyeX.Engine

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9029
    TW
    Participant

    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.

    #9046
    Grant [Tobii]
    Keymaster

    Hi @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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.