iamtheky Posted August 28, 2009 Posted August 28, 2009 I run hotfixes as follows due to security on our boxes that screws with Certificate Services; thusly any hotfix installed on our systems throws a certificate error. The below script works fine on our baselines; however, if that target hotfix is already installed the "Microsoft Certificate Services" dialog does not pop. That scenario hangs the script so I would like to move towards:run exewait 15 secondsIf "Microsoft Certificate Services" displays send {enter}else (keep going)run ("d:\Tier1\Hotfix\KB933854.exe /quiet /norestart")winwaitactive ("Microsoft Certificate Services")send ("{enter}")sleep ("5000")run ("d:\Tier1\Hotfix\KB944653.exe /quiet /norestart")winwaitactive ("Microsoft Certificate Services")send ("{enter}")sleep ("5000")run ("d:\Tier1\Hotfix\KB956572.exe /quiet /norestart")winwaitactive ("Microsoft Certificate Services")send ("{enter}")sleep ("5000")run ("d:\Tier1\Hotfix\KB956803.exe /quiet /norestart")winwaitactive ("Microsoft Certificate Services")send ("{enter}")sleep ("5000")any help reaching a solution would be much obliged
MHz Posted August 29, 2009 Posted August 29, 2009 The same window being checked for makes me consider using AdlibEnable() to constantly check and act as needed if the window is found. Some If conditions are in the function but Else conditions are not needed that you requested.; execute the _adlib_check() function every second to check for the windowadlibenable ("_adlib_check", 1000)run ("d:\Tier1\Hotfix\KB933854.exe /quiet /norestart")sleep (15000)run ("d:\Tier1\Hotfix\KB944653.exe /quiet /norestart")sleep (15000)run ("d:\Tier1\Hotfix\KB956572.exe /quiet /norestart")sleep (15000)run ("d:\Tier1\Hotfix\KB956803.exe /quiet /norestart")sleep (15000)adlibdisable ()exitfunc _adlib_check() local $wintitle = "Microsoft Certificate Services" ; activate the window if it exists if winexists ($wintitle) and not winactive ($wintitle) then winactivate ($wintitle) sleep (500) endif ; send enter if the window is active if winactive ($wintitle) then send ("{enter}") sleep (1000) endifendfuncHopefully no syntax errors as I am unable to check them with au3check atm.
iamtheky Posted August 29, 2009 Author Posted August 29, 2009 ty sir, I will respond with results on Monday.
iamtheky Posted August 31, 2009 Author Posted August 31, 2009 (edited) Looks to be working as advertised. Thank you very much for the assistance.Edit: This one, pulls all those files into the exe, unpacks them to the created dir, and runs them. It displays the icon in the tray bar, and little balloons pop up giving the user a warm fuzzy about what is occuring. *Seems to not honor the timeout on the traytip, so they generally stay up until the next tray tip is called. I kind of prefer it that way.Thanks again for your help.#AutoIt3Wrapper_Icon=app.ico; execute the _adlib_check() function every second to check for the windowadlibenable ("_adlib_check", 1000)TrayTip ("XP 13.01.01 Update" , "Creating Directory and Extracting Files" , 10 , 1)DirCreate ("D:\Tier1\Hotfix\13.01.01\")fileinstall ("Adobe912.msp" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("Adobe913.msp" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("install_flash_player.msi" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("jre6u16.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall (".\sav\Symantec Antivirus.msi" , "d:\Tier1\Hotfix\13.01.01\")fileinstall (".\sav\0x0409.ini" , "d:\Tier1\Hotfix\13.01.01\")fileinstall (".\sav\instmsiw.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall (".\sav\Setup.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall (".\sav\Data1.cab" , "d:\Tier1\Hotfix\13.01.01\")fileinstall (".\sav\LUSETUP.EXE" , "d:\Tier1\Hotfix\13.01.01\")fileinstall (".\sav\Setup.ini" , "d:\Tier1\Hotfix\13.01.01\")fileinstall (".\sav\VDefHub.zip" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB951376.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB956572.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB956744.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB956803.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB957789.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB960859.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB961371.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB961501.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB969559.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB969604.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB969613.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB969618.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB969679.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB969682.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB969693.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB970238.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB970483.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB971557.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB971633.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB971657.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB972260.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB973346.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB973354.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB973507.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB973540.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB973815.exe" , "d:\Tier1\Hotfix\13.01.01\")fileinstall ("KB973869.exe" , "d:\Tier1\Hotfix\13.01.01\")TrayTip ("XP 13.01.01 Update" , "Installing Adobe Reader 9.1.2" , 10 , 1)runwait ("msiexec /p d:\Tier1\Hotfix\13.01.01\Adobe912.msp /qn")sleep (60000)TrayTip ("XP 13.01.01 Update" , "Installing Adobe Reader 9.1.3" , 10 , 1)runwait ("msiexec /p d:\Tier1\Hotfix\13.01.01\Adobe913.msp /qn")sleep (60000)TrayTip ("XP 13.01.01 Update" , "Installing Adobe Flash Player Update" , 10 , 1)runwait ("msiexec /i d:\Tier1\Hotfix\13.01.01\install_flash_player.msi /qn")sleep (60000)TrayTip ("XP 13.01.01 Update" , "Installing JRE 6u16" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\jre6u16.exe /quiet /norestart")sleep (60000)TrayTip ("XP 13.01.01 Update" , "Installing Symantec Update" , 10 , 1)runwait ("msiexec /i ""d:\Tier1\Hotfix\13.01.01\Symantec Antivirus.msi"" /qn RUNLIVEUPDATE=0 REBOOT=ReallySuppress")sleep (60000)TrayTip ("XP 13.01.01 Update" , "Installing KB951376" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB951376.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB956572" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB956572.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB956744" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB956744.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB956803" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB956803.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB957789" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB957789.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB960859" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB960859.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB961371" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB961371.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB961501" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB961501.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB969559" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB969559.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB969604" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB969604.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB969613" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB969613.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB969618" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB969618.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB969679" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB969679.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB969682" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB969682.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB969693" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB969693.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB970238" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB970238.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB970483" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB970483.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB971557" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB971557.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB971633" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB971633.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB971657" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB971657.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB972260" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB972260.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB973346" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB973346.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB973354" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB973354.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB973507" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB973507.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB973540" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB973540.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB973815" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB973815.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update" , "Installing KB973869" , 10 , 1)runwait ("d:\Tier1\Hotfix\13.01.01\KB973869.exe /quiet /norestart")sleep (15000)TrayTip ("XP 13.01.01 Update Complete" , "Your computer is now updated, please reboot the machine." , 20 , 1)sleep (20000)adlibdisable ()exitfunc _adlib_check() local $wintitle = "Microsoft Certificate Services"; activate the window if it exists if winexists ($wintitle) and not winactive ($wintitle) then winactivate ($wintitle) sleep (500) endif; send enter if the window is active if winactive ($wintitle) then send ("{enter}") sleep (1000) endifendfunc Edited September 3, 2009 by iamtheky
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