mihaijulien Posted June 7, 2017 Share Posted June 7, 2017 Hello, I have the following piece of code: RunWait(@ComSpec & " /c" & $cmd) Sleep(1000) If WinExists("Windows Installer") Then ControlClick("Windows Installer", "","[CLASS:Button; INSTANCE:1]") EndIf It supposed to start an uninstall process, and then when the popup "Are you sure you want to uninstall?" it should click on the Yes button. The problem is that the script stops at this point. Nothing ever happens. Any ideas what it could be? Link to comment Share on other sites More sharing options...
jguinch Posted June 7, 2017 Share Posted June 7, 2017 (edited) RunWait pauses the script until the process finishes. Use Run instead. an example : Local $iPid = Run(@ComSpec & " /c" & $cmd) While ProcessExists($iPid) If WinExists("Windows Installer") Then ControlClick("Windows Installer", "","[CLASS:Button; INSTANCE:1]") Sleep(100) WEnd Edited June 7, 2017 by jguinch Danp2 and mihaijulien 2 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
mihaijulien Posted June 7, 2017 Author Share Posted June 7, 2017 Thank you. That was what I was looking for. Link to comment Share on other sites More sharing options...
Subz Posted June 7, 2017 Share Posted June 7, 2017 Or you could try running msiexec.exe /x {GUID} /qb /norestart or msiexec.exe /x "Filename.msi" /qb /norestart, assuming this is a Windows Installer i.e. an Msi based installer mihaijulien 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now