Sign in to follow this  
Followers 0
Hasher

ServiceControl

8 posts in this topic

Hi I am using ServiceControl.au3 to register my script as a service and that works fine but after a restart the app runs for a minute or so and then exits for no reason

Just used the exmple in the service control test file

Any tips on this one guys?????

$nRet = _CreateService("", _
                          @ScriptName, _
                          "MyService", _
                          @ScriptDir & "\" & $sScriptName & ".exe" & " -service", _
                          "LocalSystem", _
                          "", _
                          BitOR($SERVICE_WIN32_OWN_PROCESS, $SERVICE_INTERACTIVE_PROCESS))

Thank you in advance!!


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites



Well.. need your script to test it with.. Have you tried to create a script with a While 1 sleep(100) WEnd... put than as an service restart and see if that quits


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Sheville that was a good idea but didnt do the trick.. Also tried right clicking the properties of my service and in the 'recovery' tab setting the restart fields up but this doesnt seem to work either :-(


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

So if you make a script with a simple loop, it closes too ???


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Thanks Shevile

Yeah I tried a simple loop and it still exited , like this one:

while 1
sleep(100)
wend

I removed a heap of apps off startup and only have nod32 and the the warning bubble from windows update (the little red shield) . I tried also with #notrayicon but that made no difference. I have a feeling its got to do with the warning tray bubble.


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Updating Windows is mostly a good thing for system stability and security... Though occasions are known where Windows updates screw stuff up, even then you have good chance of being able to system-restore it back to life. That said, I have helped LOTS of customers by simply updating Windows and watch the trouble vanish... :whistle:

What I would try to make sure no other running apps are interfering is simply running this same script in the Windows Safe Mode, which GREATLY diminishes the chance of other running programs being the cause of this evil. If it still quits in safe mode, then you might want to try things like memtest86 (www.memtest86.com) .

BTW have you tried compiling it to an executable and trying that instead of running the code? Wonder if that would make a difference.

/edit: typos

Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

Thanks Sadbunny

It wasnt the windows update that was complaining it was the fact that my antivirus wasnt updated . I updated it and but the script still exited.....

If I start in safe mode it wont start my service so I cant test it that way.I have been using as a compiled exe

About to try on another computer now.


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

Nope the second computer failed also...back to the drawing board


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0