Arry Posted January 11, 2010 Share Posted January 11, 2010 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 Link to comment Share on other sites More sharing options...
James Posted January 11, 2010 Share Posted January 11, 2010 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?Perhaps if it's a service? I'm not sure.You can however install an application by hiding the window @SW_HIDE and @SW_SHOW, then just use ControlSend() and ControlClick() to move through the window. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Arry Posted January 12, 2010 Author Share Posted January 12, 2010 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? Link to comment Share on other sites More sharing options...
Arry Posted January 12, 2010 Author Share Posted January 12, 2010 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 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 12, 2010 Share Posted January 12, 2010 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. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now