RobertK Posted September 11, 2007 Share Posted September 11, 2007 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:expandcollapse popup#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) EndIfAs 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 /iThanks 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 More sharing options...
Danny35d Posted September 11, 2007 Share Posted September 11, 2007 This is what I use to install Adobe Flash ActiveX RunWait('MsiExec.exe /i install_flash_player_plugin.msi /q REBOOT=ReallySuppress', @SystemDir, @SW_SHOW) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
RobertK Posted September 11, 2007 Author Share Posted September 11, 2007 I never knew that life could be made so simple. thnx, it works [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 More sharing options...
Danny35d Posted September 11, 2007 Share Posted September 11, 2007 (edited) 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 September 11, 2007 by Danny35d AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line 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