Jump to content
Sign in to follow this  
Ivanman

script ist not running as service

Recommended Posts

Ivanman

Hi @ all!

I've got a AutoIt-Script, which i installed as a Service with winserv. This new serice is running, but it doesn't do its work. :-( Any ideas? Do i have to edit my script anyway?

Thanks!

Share this post


Link to post
Share on other sites
Ivanman

i even tried it with very small scripts like a simple msgbox. but every script i installed as a service, doesn't do its work. it is installed - i checked it in the services.msc!

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, Ivanman, welcome to the forum. Have you looked into the service udf? This should have everything you need to run your application as a service.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Ivanman

Hi!

First - thanks for help! Now i looked at the service udf, but i have still a problem. when i compile my script, there is this error:

C:Program FilesAutoIt3IncludeServices.au3(2215,7) : ERROR: main(): undefined function.

#include <File.au3>
#include <Services.au3>
do
    _FileCreate("file"&@hour&@min&@sec&".txt")
sleep(2000)
until 1 = 0
Edited by Ivanman

Share this post


Link to post
Share on other sites
czardas

I've not encountered errors like that when compiling, since everything that runs without errors seems to compile without errors. I normally put the included files in the same folder as my script. Some people like to add UDFs to the includes folder in program files, but I don't do that. However I'm not convinced that the included file 'servicers.au3' is the problem, since I couldn't find a function called main() in the UDF. It could be a number of different things causing this error.

Share this post


Link to post
Share on other sites
spudw2k

most scripts will not show interactive GUI elements unless the service is configured to do so...and often not unless it's run as the logged in user.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.