salungh

Control Click works for the first time and doesn't work after that at all

2 posts in this topic

Hi,

I am trying to automate the installation of desktop application but I am unable to do so at the very first step as I am unable to click the "Next" button. Please help. Below is the code I am using:

RunWait('msiexec /i "C:\Users\s\Desktop\Auto IT\Scripts\Installer.msi"')

WinWait('Setup')
WinActivate('Setup')

Do
    $Start = ControlGetHandle('Setup','Next','[CLASS:Button; INSTANCE:1]')
    Sleep(1000)
Until $Start
ControlClick('Setup','', $Start)

Share this post


Link to post
Share on other sites



@salungh if it is an MSI, why not install it silently, rather than the messier route of automating the GUI? Something like:

RunWait('msiexec /i "C:\Users\s\Desktop\Auto IT\Scripts\Installer.msi" /qn')

 


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

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