Jump to content

SW Hide with ShellExecute?


Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

does this work?

run ( $temp & " /s")

if not, someone more familary with silent installs will be around shortly :)

Edited 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.
Link to comment
Share on other sites

  • Moderators

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!

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

×
×
  • Create New...