Jump to content

Recommended Posts

Posted

Hi

I am very new to AutoIT and am wondering if something can be done.

Usually I script with simple batch files and I try my hardest to find silent install switches for most applications.

I have one application that was poorly written so I used AUTOIT to script it and it works fine if someone is logged onto the PC.

Most of our rollouts we do when the PC is on but logged off.

I guess software cannot be installed using AUTOIT when the PC is logged off as it cannot simulate the mouse clicks etc is this correct?

Thanks

Posted

Thanks James

Do you mean that you can make an application hide its own window?

ie as it;s window will not close you can force it to close?

Posted

Also, my code is:

Run("Appinstall.EXE /s", "" , @SW_HIDE)

WinWaitActive("Install Complete")

ControlClick("Install Complete", "Cancel", 2)

The /s does a silent install but the software developer then made it stop at this point:

File attached.

How can I get this window to close if the PC is on but logged off?

Regards

post-55322-12632806343394_thumb.jpg

Posted

From the stickied FAQ:

Q21. Why my script doesn't work on locked station?

A21. On locked station any window will never be active (active is only dialog with text "Press Ctrl+Alt+Del")

In Windows locked state applications runs hidden (behind that visible dialog) and haven't focus and active status.

So generally don't use Send() MouseClick() WinActivate() WinWaitActive() WinActive() etc.

Instead use ControlSend() ControlSetText() ControlClick() WinWait() WinExists() WinMenuSelectItem() etc.

This way you may have your script resistive against another active windows.

and it's possibe to run such script from scheduler on locked Windows station.

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