Sign in to follow this  
Followers 0
DCSS

Running as a service - clarification

2 posts in this topic

I have been reading the forum entries and FAQs about running a script as a service. I've tried RunAsSvc, as suggested in the FAQs, and it seems to work but I am confused about using ServiceControl.au3 and _CreateService as an option that seems to provide more control. I can't seem to find a clarification to the following or I may just be a bit thick.

I don't completely understand how to use _CreateService to identify the script I want to run as a service. In the samples I found I assumed the BinaryPath to be where this is identified but they refer to srvany.exe. I understand the explanation and need for srvany.exe but I don't see where I indicate my script.

Also, is the RegWrite needed?

If there is something that explains this better, please point me there.

I hope this makes sense. Any advise will be much appreciated. :unsure:

Share this post


Link to post
Share on other sites



Try

RegWrite ( 'HKLM\SYSTEM\CurrentControlSet\Services\' & $_Servicename & '\Parameters', 'Application', 'REG_SZ', @ScriptFullPath )

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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