Jump to content

autoit runs as a service


Recommended Posts

Hej,

I worte a script to open an application and to press a button. <-- no problem, it works fine.

When I run my compiled autoit script as a service, it runs the application, but only in the background, the window of the application pops not up like before running manuelly(why???). Normally no problem but it doesnt press the button. I tried it with the controlclick command and with controlsend (in addition with Opt(WinDetectHiddenText, 1) ), I dont know what I could do.

It will be great if somebody knows the solution(probably it is very easy)! Thank you.

Link to comment
Share on other sites

go to the service properties(the one you created), choose the Log On flap (?)...... logon as Local System account, check the 'Allow service to interact with desktop' checkbox.

> there are 10 types of people in the world, those who understand binary and those who don't.

Link to comment
Share on other sites

thanks jinxter! it works!

but now I have/had another prob: the application needs that I'm logon as a special user . I tried this with RunAsSet("username", @computername, "password") but I get an error message (from autoit) that the application could not execute. then I tried to execute notepad in this way and even notepad didn't work.

It seems as the autoit script not really reconized the runasset when I run it as an service, because the next thing I tried was to run the autoit script manuelly with a user who didn't exist and and yes, I get an error message that something with my user is wrong but the same script as a service again told me only the first error message(unable to execute) and this is strange...

We solved this special prob, because we found parameters from the application to press the button, but I'm generally interessted in my problem and would prefere to find a solution with autoit (the next script will come)

Edited by sabrina000
Link to comment
Share on other sites

It seems as the autoit script not really reconized the runasset when I run it as an service, because the next thing I tried was to run the autoit script manuelly with a user who didn't exist and and yes, I get an error message that something with my user is wrong but the same script as a service again told me only the first error message(unable to execute) and this is strange...

hmmm... could it be that you choose to run the service as a service account. try running as another user (if possible)

> there are 10 types of people in the world, those who understand binary and those who don't.

Link to comment
Share on other sites

what program are you using to make the autoit application run as a serviec ? maybe it's not quite built to run in a w2k enviroment ?

> there are 10 types of people in the world, those who understand binary and those who don't.

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...