Jump to content

Recommended Posts

Posted

Hi,

The following issue: I have a software that was nicely running on Windows 2003; we changed to Windows 2008 and the program still works however when starting it pops up an alert telling some driver is missing which is important for the functioning. Stupid thing is that the program only start doing its job after I click away this alert box.

So, I wrote a little auto script to start the program and click away the alert:

Run( "C:Program Files (x86)pathtoprogram.exe /start" )
WinWait( "Error Message", "Failed to Initialize the Driver." )
ControlClick("Error Message", "OK", "Button1")
 
Works like a charm when I start it in my Windows session.
 
Now my problem: I want to run the program as soon as the machine is started, so I created a scheduled task to run on startup and put the SysAdmin account. If I run the task auto script will run the program.exe (I can see it in the taskmanager) but the  the alert is obviously not clicked away because the program doesn't do what it should do.
 
Now of course there is no GUI I suppose if the machine is started but how would you deal with this kind of problem
 
Thanks a lot
 
Posted

I would address the driver problem myself.

Hi JohnOne, 

Well that would be the best solution of course, however I am not really in a position (not so smart) to do that :/

I was hoping that someone had a similar problem and solved it somehow.

Posted

I am in the right context... I use a scheduled task with creds from an admin account. But I guess the alert window will not be rendered thus auto can't click it away.

As for the error message it says: ""Failed to Initialize the Adlib Express PDF Driver." it is an old version of Adlib Express Server that I run on a new OS and I don't want/can afford to upgrade to a newer version.

Posted

The script is execute perfectly and it also spawns the process, but the alert is not clicked away.

Its a script that should run as soon as the machine is booted, this will happen unattended and without anyone logging in so I guess the alert window is not rendered at all.

Posted

Hi John, sorry for the late reply.

To summarize: 

I have an auto script which opens the application executable and waits for an alert to appear to cick away.. if this happens everything works smoothly.

I create a scheduled task to run this auto script at startup of the machine.

I used the same account I tested the auto script.

If I run this scheduled task this popup never shows up, hence is not clicked away and hence the application does never get into working mode.

That is, it does not only not work when the machine is rebooted but also not if I am logged in to that machine with that account and right click the scheduled task and execute it manually.

It seems any UI output is swallowed in that case.

Posted

Problem is as you mentioned, There is no error message displayed if nobody is logged in. Thus, Checking the error in the manner you're doing is pointless. Your whole script relies on the existence of a windows dialog being displayed. Perhaps there is a log being generated somewhere that you could read for such an error? Though you still wouldn't be able to bypass the error message.

Posted

Seems you would want the task to trigger "At log on", and select Security options "Run whether user is logged on or not"

HI jdelaney,

The (still unresolved) issue is that I do not logon to the machine but rather simply start it so I (and obvioulsy autoit) don't "see" the alert box rendered in which case autoit would click it away.

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
×
×
  • Create New...