cancel
Showing results for 
Search instead for 
Did you mean: 

Starting MI client as system service

Former Member
0 Kudos

Hi MI fans,

I read from NW Help that MI client can be executed in the

background; something like a service by creating an empty

startasservice.txt file in the MI installation directory.

However, I want to get rid of the icon in the system task.

Is there a way that I could start MI client as a service?

Any suggestions are appreciated.

Maverick

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hello maverick,

the MI client specifically the mobileengine.exe is not

created as service-enabled thus it doesn't care about

SERVICE_CONTROL_SHUTDOWN or SERVICE_CONTROL_STOP messages

and the like.

there are some programs like sc.exe or svrany.exe that will

run your programs as service. but running mobileengine.exe

will not hide the system task icon... (i think). another

thing is that the mobileengine.exe and the java process of

MI are not coupled; i.e. they ran in separated processes.

thus when you close your mobileengine.exe process, the MI

java process is left running. thus controlling the mobileengine.exe

as a service alone might not unload the MI java process

during the service shutdown call.

anyway, though not as windows service, you can still run

your MI client windowless. here's how:

1)open your startup.bat script located in the MI installation

directory using any text editor.

2)set your JAVA_EXE variable to use the javaw.exe instead

of java.exe

3)locate the line with "%JAVA_EXE%" %JAVA_OPTIONS%

-> generally among the last lines in the file

4)prepend the <b>start "" /min</b> on this line looking like

start "" /min "%JAVA_EXE%" %JAVA_OPTIONS%

that's it, you will have now your MI client client w/o

window in the background. to let your MI startup automatically

during windows startup, you can add a shortcut to your

startup.bat into the StartUp folder in your Programs.

or add an entry into your Windows RunOnce registry...

regards

jo

Former Member
0 Kudos

Hello Jo,

Thanks for the quick answer.

In debt.

Maverick

Former Member
0 Kudos

hi maverick,

you're welcome. btw, if you were planning of loading some

drivers requiring system level authentication, or has to

load drivers in the kernel level, then i would suggest

that you create your own service. something like running

MI java process upon the call of your service load and

putting it off upon service unload. please refer to the

corresponding messages that i mentioned in my prior post.

here's a very good link on how to create your own.

http://www.gamedev.net/reference/articles/article1899.asp

regards

jo

Answers (0)