OmYcroN Posted May 1, 2010 Posted May 1, 2010 (edited) This is my code for auto installing photoshop : expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=Icon.ico #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; Script for AdobePhotoshop CS5 Extended AutoItSetOption("MouseCoordMode", 2) AutoItSetOption("PixelCoordMode", 2) AutoItSetOption("SendKeyDelay", 250) Run("Set-up.exe") WinWait("Adobe Photoshop CS5") WinActivate("Adobe Photoshop CS5") ; WELCOME While True $PixelGetColor = Hex(PixelGetColor(150, 175), 6) If $PixelGetColor == "243E59" Then ExitLoop WEnd MouseClick("left", 735, 525) ; SERIAL NUMBER While True $PixelGetColor = Hex(PixelGetColor(150, 200), 6) If $PixelGetColor == "243E58" Then ExitLoop WEnd Send("{TAB 7}") Send("{DOWN}") Send("{TAB}") Send("{DOWN}") MouseClick("left", 735, 525) ; OPTIONS While True $PixelGetColor = Hex(PixelGetColor(150, 250), 6) If $PixelGetColor == "243C55" Then ExitLoop WEnd MouseClick("left", 735, 525) ; FINISH While True $PixelGetColor = Hex(PixelGetColor(150, 300), 6) If $PixelGetColor == "243B52" Then ExitLoop Sleep(10000) WEnd MouseClick("left", 735, 525) FileCreateShortcut(@ProgramFilesDir & "\Adobe\Adobe Photoshop CS5\Photoshop.exe", @DesktopCommonDir & "\Adobe Photoshop CS5", @ProgramFilesDir & "\Adobe\Adobe Photoshop CS5") Exit Hope it's good for someone. Edited May 1, 2010 by OmYcroN
wakillon Posted May 24, 2010 Posted May 24, 2010 (edited) Hi omycron ! Why don't you try Silent Install with just a little progressbar or a gui ? It's more secure... Extract Photoshop_12_LS4.7z downloaded to a folder. It give you readme pdf files and a 1Go folder Adobe CS5 . In this folder there are Set-up.exe and 4 folders. In "Deployment" folder choose your language Deployment xml file. But if your system is not on c: you must replace it in xml file. For 32 bit and french : fr_FR_Deployment.xml Web browser must be closed. ( ERROR: Following Conflicting processes were running - block:firefox.exe Exit Code: 19 - Conflicting Processes running ) Install logs are in Program Files\Fichiers communs\Adobe\Installers expandcollapse popup#include <File.au3> #include <Math.au3> Global $_ProgressTimerInit = TimerInit ( ) $_SetupPath = @ScriptDir & '\Adobe CS5\Set-up.exe' $_XmlDeploymentPath = @ScriptDir & '\Adobe CS5\Deployment\fr_FR_Deployment.xml' _ReplaceStringInFile ( $_XmlDeploymentPath, 'C:', @HomeDrive ) $_Run = '"' & $_SetupPath & '" --mode=silent --deploymentFile="' & $_XmlDeploymentPath & '" --skipProcessCheck=1' ConsoleWrite ( "$_Run : " & $_Run & @Crlf ) ; ProcessClose ( 'firefox.exe' ) ; close your web browser $_MsgBox = MsgBox ( 4, 'Warning', "Have you closed your WebBrowser ?" ) If $_MsgBox = 7 Then Exit $_Pid = Run ( $_Run ) ProgressOn ( "Adobe Deployment", "Photoshop CS5", "0 %", -1, -1, 16 ) $_PerCent2=0 While ProcessExists ( $_Pid ) $_DirGetSize = DirGetSize ( @ProgramFilesDir & '\Adobe' ) $_PerCent1 = _Max ( _Min ( Round ( ( 100 * $_DirGetSize ) / 637038592 ), 99 ), 1 ); After install DirSize of @ProgramFilesDir & '\Adobe' = 637 038 592 octets If _EachXseconds ( 20 ) Then $_PerCent2 = _Min ( _Max ( $_PerCent1, $_PerCent2 ) + 1, 99 ) ; for more regular progress, we simulate... $_Percent = _Max ( $_PerCent1, $_PerCent2 ) ProgressSet ( $_Percent, "Progress Install : " & $_Percent & " %" ) Sleep ( 500 ) WEnd ProgressSet ( 100, "Installed succesfully !", "Photoshop CS5" ) Sleep ( 3000 ) ProgressOff ( ) Exit Func _EachXseconds ( $_Interval ) $_TimerDiff = Round ( TimerDiff ( $_ProgressTimerInit )/ 1000 ) If $_TimerDiff >= $_Interval Then $_ProgressTimerInit = TimerInit ( ) Return 1 Else Return 0 EndIf EndFunc ;==> _EachXseconds ( ) Be patient , it take a while ... >Exit code: 0 Time: 1021.101 hope this will help ! Edited May 25, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
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