Jump to content
Sign in to follow this  
didimons

possibility to detect error windows during autoit script execution

Recommended Posts

didimons

Hello,

I created a script to automate installation of Oracle Discoverer 10g R2 and Oracle Objects for OLE 11g. During the execution of the script I regulary receive an error from java.exe concerning PSAPI.DLL. This seems to be a known issue when performing oracle silent installs...

Is there a way to let autoit detect if the window pops up and hit enter when it does?

this error comes up about 4 times during the execution of the autoit script I created

Any help would be greatly appreciated

post-65015-0-81005600-1363170966_thumb.p

Share this post


Link to post
Share on other sites
JLogan3o13

I would say you could do this with WinExists or WinActive (check the help file for examples). However, my first suggestion would be, crazy enough, to fix the issue that is prompting the error message :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
didimons

unfortunately it's not possible to fix the cause of the problem. I tried to fix it with the scritp below

ProgressOn ("Disco 10g R2 and OO4O11g installer version 1.0", "Install Progress")
ProgressSet(5, "Installing Discoverer 10g R2 basic")
RunWait ("X:\p5983622_10123_WINNT\Disk1\setup.exe -responseFile x:\response\install_disco10gr2_win7 -ignoreSysPrereqs -silent")
Sleep (2000)
If WinWait("java.exe - Entry Point Not Found")
WinActivate("java.exe - Entry Point Not Found")
WinWaitActive("java.exe - Entry Point Not Found")
Send ("{ENTER}")
EndIf
Sleep (2000)
If WinWait("java.exe - Entry Point Not Found")
WinActivate("java.exe - Entry Point Not Found")
WinWaitActive("java.exe - Entry Point Not Found")
Send ("{ENTER}")
EndIf
Sleep (10000)
WinWait("Windows Security Alert")
WinActivate("Windows Security Alert")
WinWaitActive("Windows Security Alert")
Send ("{ENTER}")
Sleep (5000)
WinWait("Oracle Universal Installer")
WinActivate("Oracle Universal Installer")
WinWaitActive ("Oracle Universal Installer")
Send ("{ENTER}")
WinWaitClose("Oracle Universal Installer")

but it doesn't seem to work as expected. Originally there was only this part of the code:

ProgressOn ("Disco 10g R2 and OO4O11g installer version 1.0", "Install Progress")
ProgressSet(5, "Installing Discoverer 10g R2 basic")
RunWait ("X:\p5983622_10123_WINNT\Disk1\setup.exe -responseFile x:\response\install_disco10gr2_win7 -ignoreSysPrereqs -silent")
Sleep (2000)
WinWait("Oracle Universal Installer")
WinActivate("Oracle Universal Installer")
WinWaitActive ("Oracle Universal Installer")
Send ("{ENTER}")
WinWaitClose("Oracle Universal Installer")

you still needed to click to get the error messages of java and the one of windows security but that wasn't a problem for me as normally I would do the installations manually. However a client asked to make it fully functional without user interaction

Is it possible to e.g. put a while statement at the beginning of the entire script that will detect if a window pops up and hit enter without interfering with the rest of the code?

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×