Jump to content

ServiceControl


Hasher
 Share

Recommended Posts

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!

Link to comment
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!

Link to comment
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!

Link to comment
Share on other sites

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.

Link to comment
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!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...