Jump to content

Recommended Posts

Posted

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?

Posted

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.

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
×
×
  • Create New...