on 08-17-2007 2:42 PM
Hi
I have looked but could not find an API call that would completly shutdown MI from within an application like MAM for example.
Thanks
Hi Joe,
I simulated this via telnet, and yes it does kill the MI instance, but MobileEngine.exe still runs.
My whole motivation on this requirement was to make a simple procedure for users to restart MI (finding and rightclicking on tray icon isnt easy on tablet pc).
To start MI back up, user still has to shutdown MobileEngine from tray.
So we are halfway there.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> I simulated this via telnet, and yes it does kill the
> MI instance, but MobileEngine.exe still runs.
MobileEngine.exe is a separate process and is a actually a VB program which
is resposible for the startup/shutdown of the MI client java process and wrapping
of the Web (IE) Component for the MI GUI. There's no API to shut MobileEngine.exe
but rather you have to kill the process.
> My whole motivation on this requirement was to make a
> simple procedure for users to restart MI (finding and
> rightclicking on tray icon isnt easy on tablet pc).
> To start MI back up, user still has to shutdown
> MobileEngine from tray.
I received feedback from some user regarding the accessibility problem from the
task tray. Actually, you can just run MI client by using the startup/shutdown batch
file scripts included at the root folder of the MI client installation and create desktop
shortcuts to these scripts on the users desktop. You can change the shortcut icon
to the actual MI icon for better presentation. However, without using the MobileEngine.exe
you will need to startup a browser. And you can just do this by creating a script.
I actually created a simple solution to this issue and had created an IE6 extension
which I called MI IE Executer (MIEx) and had been using it for awhile. (I was about
to publish it when I got prettry offending email criticizing me and that's the cause
of losing my motivation of writing blogs...) You can find the description of MIEx at
http://jogel.sdn.googlepages.com/ but haven't made the article public. Maybe this
coming days I will... just let me know if you want to try it.
regards
jo
Hi
You could very well do what Jo had mentioned. But the simplest of all ways and the only way to shutdown MI as well to kill the MobileEngine.exe process is to create a file named <i><b>stopfile.txt</b></i> within the MI Installation directory. Refer to this <a href="http://help.sap.com/saphelp_nw04/helpdata/en/44/46697762e24903e10000000a1553f7/frameset.htm">link</a>. You can write a simple java code to create this file in your MAM application code.
Hope this helps.
Best Regards
Sivakumar
Hi Jo
Good to see you back in this forum. With regard to your query, well there is no configuration that will help you set the time to find the file. But within the implementation of MobileEngine.exe, by default the process tries to find the stopfile.txt file within the MI installation directory every 250 milli seconds (4 times in a second) and if the file is found, the exe will shut down itself and also MI. Hope I have answered your query
Best Regards
Sivakumar
hi sivakumar,
thanks for info. just some clarification.
1. will MobileEngine.exe delete the file right after it sees it?
2. or the user has to delete it right after the MobileEngine.exe process was killed?
or MobileEngine.exe will delete the file during its startup?
for both cases, how does ensure that it was able to delete it? file handle
might still be opened by the other process which created it. which in this case,
it will surely fail to delete it.
curious.
jo
Thanks sivakumar,
What a nice solution. !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi eza,
supplementary info:
make sure the stopfile.txt is <b>not readonly</b> and <b>not hidden</b>.
if it is readonly, MobileEngine.exe won't be able to delete it and will surely fail
to startup i.e. it will exit right after it started up coz of the file's presence.
if it is readonly, it doesn't see it. it will not stop.
jo
hi eza,
actually there is but seems not documented. when an MI client runs, it instantiate
an instance of the CommunicationServer. this server listens on a default port 45000
which is customizable also thru the mobileengine.config. you can create a Socket
to connect to this server and send a "shutdown" string i UTF8. this command will
call the System.exit(0) at the end; thus exiting MI client.
regards
jo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi milo,
> what is the parameter name for changing the port number?
i never had tried but you can use one of the following. if the first doesn't work
try the next one.
MobileEngine.CommunicationServer.Port
MI.CommunicationServer.Port
> It has been sometime you never posted in this forum.
Yeah, i couldn't just motivate myself into joining actively. Been asking myself
for what Im doing this anyway???
regards
jo
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.