SaintedRogue Posted November 9, 2012 Posted November 9, 2012 I'm trying to get some code working with ShellExecute. I would like the Window to execute hidden, but it does not seem to be working when I set the SW_HIDE flag. Any help is much appreciated. Code below: Local $tmp = "C:\Temp" Local $msi = $tmp & '\AdobeFlash.msi' If Not FileExists($tmp) = 1 Then DirCreate($tmp) InetGet("http://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_11_plugin.msi", $msi, 0, 0) $afEXE = ShellExecute("AdobeFlash.msi", "", $tmp, "open", @SW_HIDE) Do $run = ControlClick("Adobe Flash Player 11 Plugin - InstallShield Wizard", "", 1669) Until $run = 1 Do $finish = ControlClick("Adobe Flash Player 11 Plugin - InstallShield Wizard", "", 1653) Until $finish = 1 DirRemove($tmp) Thoughts?
jdelaney Posted November 9, 2012 Posted November 9, 2012 do you want a silent install, or the prompt to not dispaly which executes the installer? IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
SaintedRogue Posted November 9, 2012 Author Posted November 9, 2012 Silent install. Which with more tinkering, I thought to myself... it's an MSI! Use the no UI switch and execute via MSIEXEC rather than just the MSI. Which seems to be working, but I would like to know if I am doing the code correct for say an EXE installer where this isn't an option.
jdelaney Posted November 9, 2012 Posted November 9, 2012 (edited) does this work? run ( $temp & " /s") if not, someone more familary with silent installs will be around shortly Edited November 9, 2012 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Moderators JLogan3o13 Posted November 9, 2012 Moderators Posted November 9, 2012 Since it is an msi, I would suggest: ShellExecuteWait("msiexec.exe", '/i "AdobeFlash.msi" /qn') "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
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