====== yEd Graph Editor ====== By --- //[[ME_AS]] 2013/09/09 // Nachfolgend meine Skripte zum automatischen Installieren von yEd Bei den ganzen AutoIT Skripten kann man natürlich die Sleep Zeiten am Ende der Skripte auf seine Umgebung anpassen. Ich hab sie hier bewusst höher eingestellt, da der ein oder andere vielleicht noch ältere Rechner einsetzt PS: Dies ist mein erstes AutoIT Skripte und eines meiner ersten OPSI Skripte - also falls es was zu verbessern gibt, tut euch keinen Zwang an :) ====== yEd ====== Tested with opsi 4.0.3.1\\ Tested with WinstVersion >= 4.11.3.6\\ Tested with Win7 Pro SP1 32/64bit ==== Download here ==== http://www.yworks.com/de/downloads.html#yEd OPSI_Workbench:\\ AutoIt3.exe setup.ins uninstall.ins delsub32.ins yed.png yEd-3.11_without-JRE_32-bit_setup.exe yEd-3.11_without-JRE_64-bit_setup.exe yed32.au3 yed64.au3 yed_uninstall32.au3 yed_uninstall64.au3 ==== setup.ins ==== [Actions] requiredWinstVersion >= "4.10.8.6" ;Variable Logverzeichnis DefVar $LogDir$ Set $LogDir$ = "%SystemDrive%\tmp" ;Variable Produktname DefVar $ProductId$ Set $ProductId$ = "yEd" ;Variable Freier Speicherplatz DefVar $MinimumSpace$ Set $MinimumSpace$ = "100 MB" ;Variable Installationsverzeichnis DefVar $InstallDir$ Set $InstallDir$ = "%ProgramFiles32Dir%\yEd" ;Variable ExitCodes DefVar $ExitCode$ ;Variable für die Ermittlung der Betriebssystem Unterversion DefVar $NTVersion$ set $NTVersion$ = GetNTVersion ;Variable zur Ermittlung der Systemarchitektur DefVar $SystemType$ Set $SystemType$ = GetSystemType ; ---------------------------------------------------------------- if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ isFatalError ; Stop process and set installation status to failed else comment "Show product picture" ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ if FileExists("%ScriptPath%\delsub32.ins") comment "Start uninstall sub section" Sub "%ScriptPath%\delsub32.ins" endif endif ;OS-Version ermitteln if ( $NTVersion$ = "Win2K" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" ) if $SystemType$ = "x86 System" Sub_Uninstall Winbatch_Install_32 Sub_Check_Exitcode endif if $SystemType$ = "64 Bit System" Sub_Uninstall Winbatch_Install_64 Sub_Check_Exitcode endif else LogError "Kein kompatibles Betriebssystem installiert" isFatalError endif [Sub_Uninstall] sub "%scriptpath%\delsub32.ins" [Winbatch_install_32] %scriptpath%\AutoIt3.exe %scriptpath%\yEd32.au3 [Winbatch_install_64] %scriptpath%\AutoIt3.exe %scriptpath%\yEd64.au3 [Sub_check_exitcode] Sub "%ScriptDrive%\check_exitcode\check_exitcode.ins" ==== uninstall.ins ==== [Initial] ;Standard Text, shown during installation Message = Bitte warten, das Produkt wird Deinstalliert ;Set Loglevel setLogLevel = 6 ;Stop when errors ExitOnError = false ;Syntax Fehler are shown in a seperate window ScriptErrorMessages = on ;Do not use Single-Step Mode TraceMode = off ;No winst-window in foreground while batchmode StayOnTop = false [Actions] ;Variable for the OS DefVar $OS$ Set $OS$ = GetOS ;Variable for the OS-subversion DefVar $NTVersion$ Set $NTVersion$ = GetNTVersion ;Name of product (max. 12 columns) DefVar $ProductName$ Set $ProductName$ = "yEd" ;filename of productpicture with extension DefVar $ProductPicture$ Set $ProductPicture$ = "yEd.png" ;the variable for the ExitCode DefVar $ExitCode$ ;show $ProductPicture$ and $ProductName$ ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$ sub "%ScriptPath%\delsub32.ins" ==== delsub32.ins ==== Message "Uninstalling " + $ProductId$ + " ..." if FileExists("%ProgramFiles32Dir%\yWorks\yEd\uninstall.exe") comment "Uninstall program found, starting uninstall" Winbatch_uninstall_32 sub_check_exitcode else if FileExists("%ProgramFiles64Dir%\yWorks\yEd\uninstall.exe") comment "Uninstall program found, starting uninstall" Winbatch_uninstall_64 sub_check_exitcode endif endif [Winbatch_uninstall_32] %scriptpath%\AutoIt3.exe %scriptpath%\yEd_uninstall32.au3 [Winbatch_uninstall_64] %scriptpath%\AutoIt3.exe %scriptpath%\yEd_uninstall64.au3 [Sub_check_exitcode] Sub "%ScriptDrive%\check_exitcode\check_exitcode.ins" ==== yed32.au3 ==== ;Starte yEd Installation Run ("yEd-3.11_without-JRE_32-bit_setup.exe") WinWaitActive("Setup - yEd Graph Editor 3.11","") Sleep(1000) ;Klicke Button Next Send("{SPACE}") Sleep(500) Send("{TAB}{TAB}{SPACE}{TAB}{TAB}{TAB}{SPACE}") Sleep(500) Send("{TAB}{TAB}{TAB}{SPACE}") Sleep(500) Send("{TAB}{TAB}{TAB}{TAB}{SPACE}") Sleep(500) Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{SPACE}") Sleep(500) Send("{TAB}{TAB}{TAB}{TAB}{SPACE}") ;Warten bis Installation fertig ist Sleep(20000) Send("{TAB}{SPACE}") Exit ==== yed64.au3 ==== ;Starte yEd Installation Run ("yEd-3.11_without-JRE_64-bit_setup.exe") WinWaitActive("Setup - yEd Graph Editor 3.11","") Sleep(1000) ;Klicke Button Next Send("{SPACE}") Sleep(500) Send("{TAB}{TAB}{SPACE}{TAB}{TAB}{TAB}{SPACE}") Sleep(500) Send("{TAB}{TAB}{TAB}{SPACE}") Sleep(500) Send("{TAB}{TAB}{TAB}{TAB}{SPACE}") Sleep(500) Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{SPACE}") Sleep(500) Send("{TAB}{TAB}{TAB}{TAB}{SPACE}") ;Warten bis Installation fertig ist Sleep(20000) Send("{TAB}{SPACE}") Exit ==== yeduninstall32.au3 ==== ;Starte yEd Deinstallation Run ("C:\Program Files (x86)\yWorks\yEd\uninstall.exe") WinWaitActive("yEd Graph Editor 3.11 Uninstall","") Sleep(1000) ;Klicke Button Next Send("{SPACE}") ;Warten bis Deinstallation fertig ist Sleep(10000) Send("{TAB}{SPACE}") Sleep(10000) Exit ==== yeduninstall64.au3 ==== ;Starte yEd Deinstallation Run ("C:\Program Files\yWorks\yEd\uninstall.exe") WinWaitActive("yEd Graph Editor 3.11 Uninstall","") Sleep(1000) ;Klicke Button Next Send("{SPACE}") ;Warten bis Deinstallation fertig ist Sleep(10000) Send("{TAB}{SPACE}") Sleep(10000) Exit