Spacetech Posted July 7, 2008 Posted July 7, 2008 I'm trying to create a service so if the selected program crashes it will be auto restarted The code creates the service but it does not start it. When I try to start it from Services it gives me Error 1053: The service did not respond to the start or control request in a timely fashion.Heres the code If(Not _Service_Exists(ServiceName())) Then _Service_Create(ServiceName(), ServiceName(), $FileLocation & " " & $CommandLine) EndIf Sleep(1000) MsgBox(16, "", _Service_Start(ServiceName())) ;This returns 1oÝ÷ Øw«zËay'«¾' ·µâ7ök¬xºÚ"µÍ[ÈÔÙXÙWÐÜX]J ÌÍÜÔÙXÙS[YK ÌÍÜÑÜ^S[YK ÌÍÜÐ[T] ÌÍÜÑØÜ[ÛHY][ ÌÍÛÙXÙUHHY][ ÌÍÛÜHHY][ ÌÍÛÝHHY][ ÌÍÜÑÚÝÜ[XÝHY][ ÌÍÜÔÙXÙUÙHY][ ÌÍÜÔÜÝÛÜHY][ ÌÍÜÓØYÜÜÝHY][ ÌÍÜÓØYÜÜÝ[[ÚYÈHY][ ÌÍÜÑ[[ÚYÈHY][ ÌÍÐÛÛ]HÛÛ][YH BØØ[ ÌÍÔÙXÙHHØÙ] ][ÝÝÚ[YÛ]Î][ÝÈ [È ][ÝÞÒ[ÛÛ][Û][Z[ÛÛ]_IÌÌÎÉÌLÉÌLÉ][ÝÈ [È ÌÍÐÛÛ] [È ][ÝÉÌLÜÛÝ ÌLØÚ[]][ÝÊBØØ[ ÌÍÛØÙXÙHH ÌÍÔÙXÙKÙ] ][ÝÕÚ[ÌÔÙXÙI][ÝÊBØØ[ ÌÍÙÜH ÌÍÛØÙXÙKÜX]J ÌÍÜÔÙXÙS[YK ÌÍÜÑÜ^S[YK ÌÍÜÐ[T] ÌÍÛÙXÙUK ÌÍÛÜK ÌÍÛÝK ÌÍÜÑÚÝÜ[XÝ ÌÍÜÔÙXÙUÙ ÌÍÜÔÜÝÛÜ ÌÍÜÓØYÜÜÝ ÌÍÜÓØYÜÜÝ[[ÚYË ÌÍÜÑ[[ÚYÈ BY ÌÍÙÜH[Y ÌÍÜÑØÜ[Û ÉÝÈY][[YÕÜ]J ][ÝÉÌLÉÌLÉ][ÝÈ [È ÌÍÐÛÛ] [È ][ÝÉÌLÒÓIÌLÔÖTÕSIÌLÐÝ[ÛÛÛÙ] ÌLÔÙXÙÉÌLÉ][ÝÈ [È ÌÍÜÔÙXÙS[YK ][ÝÑØÜ[Û][ÝË ][ÝÔQ×ÔÖ][ÝË ÌÍÜÑØÜ[ÛB[Y]B[Y]Ù]Ü ÌÍÙÜ B[[ÈÉÏOIÝÈÔÙXÙWÐÜX]J Any Ideas about this?
Kitsune Posted July 7, 2008 Posted July 7, 2008 From what I understand AutoIt EXEs cannot be run as services due to their structure. This is because the compiled code also includes a compressed version of the source code which results in a wrapper for your program that is not compatible with the Services Manager. Try converting your AutoIt code into C++ or an equivalent language to resolve this issue.
Spacetech Posted July 7, 2008 Author Posted July 7, 2008 Well $FileLocation & " " & $CommandLine is not an autoit program.
Kitsune Posted July 7, 2008 Posted July 7, 2008 Well $FileLocation & " " & $CommandLine is not an autoit program.What language was it written in?
Spacetech Posted July 7, 2008 Author Posted July 7, 2008 What language was it written in?I'm not sure.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now