Jump to content

possibility to detect error windows during autoit script execution


Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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 :)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...