crayzeesheep Posted August 28, 2014 Posted August 28, 2014 This question is kind of vague, but please bear with me... First, some background: My department utilizes Altiris Deployment Console to deliver packaged applications to workstations. We basically use AutoIT as a last resort when it comes to wrapping up nuanced "one-off" software installs that don't answer to silent switches, etc. When Altiris deploys a package/launches an executable, it does so from the SYSTEM account in the background. My AutoIT packages handled this scenario favorably for several months. I have followed suggestions on the wiki for running AutoIT scripts on workstations in a locked state, using exclusively ControlSend(), ControlClick(), WinWait(), etc. with success. Here's a sample installation script I used rather recently: InstallCapIQ() Func InstallCapIQ() Run("C:\Windows\Temp\CapitalIQ_OfficeBootstrap.exe") ; Run the installer Opt('WinWaitDelay', 800) WinWait("[CLASS:#32770]") ControlClick("[CLASS:#32770]", "", "[CLASS:Button; INSTANCE:1]") ; Welcome Screen - Click NEXT WinWait("[CLASS:#32770]") ; Wait for the application to reappear ControlClick("[CLASS:#32770]", "", "[CLASS:Button; INSTANCE:4]") ; 2nd Screen - Accept the license agreement Sleep(800) ControlClick("[CLASS:#32770]", "", "[CLASS:Button; INSTANCE:1]") ; 2nd Screen - Click NEXT WinWait("[CLASS:#32770]") ; Wait for the application to reappear ControlClick("[CLASS:#32770]", "", "[CLASS:Button; INSTANCE:1]") ; 3rd Screen - Click NEXT WinWait("[CLASS:#32770]") ; Wait for the application to reappear ; This is where the installation actually occurs - Files being copied, Reg being updated, etc. This process terminates with the window closing and then displaying the FINISH screen, so... WinWaitClose(WinGetHandle("[CLASS:#32770]")) ; I wait for the Progress Box to close... WinWait("[CLASS:#32770]") ; And then I wait for the application to reappear ControlClick("[CLASS:#32770]", "", "[CLASS:Button; INSTANCE:1]") ; FINISH SCREEN - Click FINISH EndFunc Now, the problem... Suddenly (as of last night), our managed workstations have ceased identifying windows that are targeted by CLASS. I don't know how or why this is occurring. AutoIT scripts that were in production for months suddenly no longer function on our managed workstations, yet miraculously execute without fail on our unmanaged workstations. The issue is apparent in that our Altiris deployment jobs that utilize AutoIT scripts hang indefinitely. Running the AutoIT script from an administrator account locally results in the installer launching and remaining idle, never receiving commands. If I replace the CLASS with the title of the window, the script works fine as a signed in administrator. Unfortunately, it will not work as the SYSTEM account running in the background, so it remains useless for deployment via Altiris. My question would be, what could possibly inhibit a workstation from targeting windows by CLASS? Any troubleshooting tips I can attempt to see where/why the script just idles on these workstations? Thanks in advance for any help.
Developers Jos Posted August 28, 2014 Developers Posted August 28, 2014 Do you know which WinWait() it is hanging on? Maybe you could add some logging or add: Opt("TrayIconDebug", 1) ;0=no info, 1=debug line info Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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