Jump to content

Wait for it.....


Recommended Posts

I am trying to write a script that will launch a setup.exe and then 'click' the appropriate buttons when it needs to. So far I have a very simple script that is working, using the Sleep command.

The problem I have is if the user is on the end of a slow link, the time would not be long enough. How do i go about looking for the Title or information contained in the installation screens?

This is what I have so far...

CODE
Run ('\\fs_zdm\VOL1\Applications\Install Apps\zesClient\setup.exe /V"STUNINSTALL=1 STUIP=\"zesuninstall\" STRBR=ReallySupress /L*v c:\zeslog.txt' , "")

Sleep(5000)

Send("{ENTER}")

Sleep(5000)

Send("{ENTER}")

Thanks

Simon.

Link to comment
Share on other sites

WinGetTitle

WinGetHandle

WinWait

WinActive

WinActivate

WinExists

All in the helpfile. You can view many other window management functions in the help file as well. If you can manage a bit more code we can help you alot alot more.

Link to comment
Share on other sites

Thanks for the pointers, I did manage to find a AutoIT recorder and that managed to give me the commands I needed.

This is what I ended up with, seems to do what I need it to:

Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Run('\\fs_zdm\VOL1\Applications\Install Apps\zesClient\setup.exe /V"STUNINSTALL=1 STUIP=\"zesuninstall\" STRBR=ReallySupress"')
WinWait("Choose Setup Language","")
If Not WinActive("Choose Setup Language","") Then WinActivate("Choose Setup Language","")
WinWaitActive("Choose Setup Language","")
Send("{ENTER}")
WinWait("ZENworks Security Client - InstallShield Wizard","")
If Not WinActive("ZENworks Security Client - InstallShield Wizard","") Then WinActivate("ZENworks Security Client - InstallShield Wizard","")
WinWaitActive("ZENworks Security Client - InstallShield Wizard","")
Send("{ENTER}")
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...