hariajay Posted March 19, 2009 Share Posted March 19, 2009 Hi, I am creating an automated installation. But, I am not sure if there will be any errors during this process. When I run it normally it complete without any issues. Is there some method to incorporate some code in my autoit script to identify errors during the install? This can be for any type of install. not limited to just 1 product. Link to comment Share on other sites More sharing options...
jvanegmond Posted March 19, 2009 Share Posted March 19, 2009 The way I see it, you expect a certain pattern to occur during install. The pattern may be: Start installer Wait for window with name X Click next in this window Wait for window with name Y or something else. If at some point that pattern no longer applies, something unusual has happened and it needs user input - error or not. github.com/jvanegmond Link to comment Share on other sites More sharing options...
hariajay Posted March 19, 2009 Author Share Posted March 19, 2009 The way I see it, you expect a certain pattern to occur during install.The pattern may be:Start installerWait for window with name XClick next in this windowWait for window with name Yor something else.If at some point that pattern no longer applies, something unusual has happened and it needs user input - error or not.Thanks for the prompt reply. This is a similar strategy I was thinking of. When I wait for window Y to appear I give it a timeout of a few seconds using WinWait("title", "", seconds). If the window does not appear I generate a error report. But, some older systems might take a longer time to reach window Y. My program would consider this as an error. Do you think there is any other method? Link to comment Share on other sites More sharing options...
jvanegmond Posted March 19, 2009 Share Posted March 19, 2009 (edited) Maybe compare all window activity to what is expected.It could capture events like:- waiting for window with name Y to take focus ( no time out ) | -> window with name H appeared, out of normalEdit: I have thought about it for a while but I think it would be possible for the most part to make a generic installer script creator which checks for errors like this too. Most installations are so common you can just press "Next" button a lot. Edited March 19, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
hariajay Posted March 19, 2009 Author Share Posted March 19, 2009 Maybe compare all window activity to what is expected.It could capture events like:- waiting for window with name Y to take focus ( no time out ) | -> window with name H appeared, out of normalEdit: I have thought about it for a while but I think it would be possible for the most part to make a generic installer script creator which checks for errors like this too. Most installations are so common you can just press "Next" button a lot.Hmmmmmm .... the problem I expect is my window X is still there and stuck. So, my program waits for windows Y and is stuck there forever. That's why I thought a timeout would help. Link to comment Share on other sites More sharing options...
jvanegmond Posted March 19, 2009 Share Posted March 19, 2009 A global time out for the script would be good. Say you give the entire process one hour for automated PC roll out scenarios. That wouldn't hurt and still allow you to dynamically handle windows. github.com/jvanegmond 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