Dear All,
I've discussed this issue in other AutoIT group and still got no
solution. Here is summery of my problem. I've a script that runs as
windoes service. that means it has no GUI but it has some MsgBox() to
display on error. Actually, it has GUI but that does not appear when it
runs as service. GUI appears only when it is started with /GUI
parameter from command line. My program runs fine in both mode (service
& stand alone in GUI mode). On error the MsgBox() are also displayed in
both modes. But my exit function only works in GUI mode. I've created a
'exit' menu in this way:
;Code starts----
$mnu_Exit = GUICtrlCreateMenuitem ("Exit",$mnu_file)
GUICtrlSetOnEvent(-1, "ExitPing")
GUISetOnEvent($GUI_EVENT_CLOSE, "ExitPing")
;Code ends----
I've the ExitPing() function and there i've a message box and a code to
write a log in a text file. When I run it from SciTE (i mean from
development environment) the ExitPing() function works. But when it is
running as a windows service the ExitPing() function is not working (or
may be never invoked) on stopping the service. By the way, the 'allow
service to interece with desktop ' option is checked/enabled. Other
message boxes are displayed fine when it is running as service except
this ExitPing() function.
Do I need to write another function to trace whether service is going
to be closed or not? Please help.
Shiblee