Sign in to follow this  
Followers 0
soulhealer

services created by _CreateService from ServiceControl.au3

5 posts in this topic

Hi,

my scripts always fail to run whenever i want to run it as service... it appears because of Windows requires feedback from programs that run as service, to tell Windows, that the service is running well now, so windows won't shut it back(becuase any service that fails to run, will be shutted down by the system)... so, what function on script to tell windows that the service is now running?

Share this post


Link to post
Share on other sites



Hi,

Like you said, services in WinNT and above require communication with the Service Control Manager (SCM). While I don't know how to do this, if possible, from within AutoIt, you can use a Microsoft tool called SrvAny.exe. It is included with the Resource Kit.

Regards.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi,

my scripts always fail to run whenever i want to run it as service... it appears because of Windows requires feedback from programs that run as service, to tell Windows, that the service is running well now, so windows won't shut it back(becuase any service that fails to run, will be shutted down by the system)... so, what function on script to tell windows that the service is now running?

Did you read the post i pointed you to ? this is also covert there ... Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Did you read the post i pointed you to ? this is also covert there ...

i get it... so srvany.exe who runs the scripts, and srvany is the service executable...

but i got a problem, i want the service to be able interact with desktop,..

i ticked "Allow service to interact with desktop"

and yes, the script does able to interact, GUI appears, but

srvany.exe also appears on the screen... so how to hide this srvany.exe window?

Edited by soulhealer

Share this post


Link to post
Share on other sites

nvm... i added winsetstate("c:\srvany.exe",@SW_HIDE) it worx

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