Jump to content

ControlClick and .msi installer


RobertK
 Share

Recommended Posts

Hello,

I have this script, it is used to install Adobe Flash ActiveX. I had it working local but at the customer his computer it refused.

He said "MSIEXEC" refused to accept my parameters.

So I looked around at this forum, and found that you can also run .MSI files with ShellExecuteWait. (Since RunWait wouldn't run a .MSI) And with that help I created this:

#include <file.au3>

$installerDirectory = ("C:\installs")
$setupFile = ("\\dd10\Softwarelln\flash\installFlash.msi")

if Not FileExists( "C:\installs\flash.kei" ) Then
    
    if NOT FileExists( $installerDirectory ) Then   
        DirCreate( $installerDirectory )
    EndIf
    
    FileInstall("\\192.168.10.10\Softwarelln\REMOTEINSTALLATIE\Archief AutoIt\bin\Background.exe" , "C:\installs\Background.exe", 1)
    
;BlockInput( 1 )
    
;Run( "C:\installs\Background.exe" )
    
    Opt( "WinWaitDelay", 100 )
    Opt( "WinTitleMatchMode", 4 )
    Opt( "WinDetectHiddenText", 1 )
    Opt( "MouseCoordMode", 0 )
    
    ShellExecuteWait( $setupFile )
    
    If Not WinActive("Adobe Flash Player 9 ActiveX - InstallShield Wizard", "Welcome to the InstallShield Wizard for Adobe Flash P") Then
        WinActivate("Adobe Flash Player 9 ActiveX - InstallShield Wizard", "Welcome to the InstallShield Wizard for Adobe Flash P")
    EndIf
    
;Send("{ENTER}");
    ControlClick("Adobe Flash Player 9 ActiveX - InstallShield Wizard", "&Install", "Button1")
    
    WinWait("Adobe Flash Player 9 ActiveX - InstallShield Wizard", "The InstallShield Wizard has successfully i")
    
    ControlClick("Adobe Flash Player 9 ActiveX - InstallShield Wizard", "&Finish", "Button1")
;Send("{ENTER}")
    
    
    _FileCreate($installerDirectory & "\flash.kei")
    
;WinClose( "Background" )
    
    if FileExists( "C:\Program Files\Microsoft Shared Computer Toolkit" ) Then
        RunWait( 'cmd.exe /c C:\Program Files\Microsoft Shared Computer Toolkit\scripts\DiskProtect.wsf" /save /restart', "C:\WINDOWS\System32", @SW_HIDE)
    EndIf
    
;BlockInput(0)
    
EndIf

As you can see, I've tried 2 approaches:

- ControlClick

- Send("{ENTER}")

The problem, neither sends anything to the installer. I've also tried sleeps up to 5 seconds.

Who can tell me why this isn't working.

btw, the arguments that didn't apear to work were:

msiexec /qb /i

Thanks in advance,

Robert

[font="Verdana"]I've gone to find myself. If I get back before I return, please keep me here.[/font]

Link to comment
Share on other sites

Your welcome, before I start doing my autoit script for any application I going to install. I check package knowledge base from AppDeploy. This is how I found out about all the differents switches.

Edited by Danny35d
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...