Jump to content

ControlClick() not working


Recommended Posts

All I want to do is just click on the "Do not close application" as per the attached image. I just have two lines of code in my script. I tried with or without WinActivate and without any success. Any ideal why it is not working?

WinActivate ("7-Zip 16.00 (x64 edition)")

 ControlClick("7-Zip 16.00 (x64 edition)","",1015)

 

 

 

 

 

Window.JPG

Windows Info.JPG

Link to comment
Share on other sites

Hello. try this:

 

ControlCommand("7-Zip 16.00 (x64 edition)","", "Button4", "Check", "")

 

Saludos

Link to comment
Share on other sites

I recently had to package 7-Zip due to vulnerabilities in older versions and used the script below to deploy it to several thousand machines successfully.

;~ Script Compiled as 32-Bit to target both x86/x64 OS
#NoTrayIcon
#RequireAdmin
;~ Select the correct Msi based upon the OS Architecture
Global $s7ZipMsi = @OSArch = "x64" ? @ScriptDir & "\7z1805-x64.msi" : @ScriptDir & "\7z1805.msi"

If @OSArch = "x64" Then
    ;~ Install 64-bit version for 64-bit OS Versions
    DllCall("kernel32.dll", "boolean", "Wow64DisableWow64FsRedirection", "boolean", 1)
        RunWait("MsiExec.exe /i " & $s7ZipMsi & " /QN RESTART=ReallySuppress")
    DllCall("kernel32.dll", "boolean", "Wow64DisableWow64FsRedirection", "boolean", 0)
Else
    ;~ Install 32-bit version for 32-bit OS Versions
    RunWait("MsiExec.exe /i " & $s7ZipMsi & " /QN RESTART=ReallySuppress")
EndIf

 

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...