Jump to content
Ricky300

ControlClick() not working

Recommended Posts

Ricky300

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

Share this post


Link to post
Share on other sites
Danyfirex

Hello. try this:

 

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

 

Saludos

Share this post


Link to post
Share on other sites
Subz

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

 

Share this post


Link to post
Share on other sites
Ricky300

I tried it and it did not work.

Share this post


Link to post
Share on other sites
Ricky300

Thanks for the script SubZ. I will give it a try.

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

×