userspace:etu_javavm
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| userspace:etu_javavm [2015/03/30 23:34] – created Robert Tauber | userspace:etu_javavm [2021/08/23 10:37] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 27: | Line 27: | ||
| CLIENT_DATA\Uninstall_Java.exe\\ | CLIENT_DATA\Uninstall_Java.exe\\ | ||
| CLIENT_DATA\java.png\\ | CLIENT_DATA\java.png\\ | ||
| + | |||
| + | ==== control ==== | ||
| + | < | ||
| + | [Package] | ||
| + | version: 2014.12.08 | ||
| + | depends: | ||
| + | incremental: | ||
| + | |||
| + | [Product] | ||
| + | type: localboot | ||
| + | id: javavm | ||
| + | name: Oracle Java Runtime Environment | ||
| + | description: | ||
| + | advice: | ||
| + | version: 0 | ||
| + | priority: 0 | ||
| + | licenseRequired: | ||
| + | productClasses: | ||
| + | setupScript: | ||
| + | uninstallScript: | ||
| + | updateScript: | ||
| + | alwaysScript: | ||
| + | onceScript: | ||
| + | customScript: | ||
| + | userLoginScript: | ||
| + | |||
| + | [ProductProperty] | ||
| + | type: unicode | ||
| + | name: install_architecture | ||
| + | multivalue: False | ||
| + | editable: False | ||
| + | description: | ||
| + | values: ["32 only", "64 only", " | ||
| + | default: [" | ||
| + | |||
| + | [ProductProperty] | ||
| + | type: unicode | ||
| + | name: javaversion | ||
| + | multivalue: False | ||
| + | editable: False | ||
| + | description: | ||
| + | values: [" | ||
| + | default: [" | ||
| + | </ | ||
| ==== CopyFolder.exe / CopyFolder.au3 ==== | ==== CopyFolder.exe / CopyFolder.au3 ==== | ||
| Line 100: | Line 144: | ||
| ==== javavm.ins ==== | ==== javavm.ins ==== | ||
| + | Ich will das ganze bei Gelegenheit vereinfachen bin aber bisher nicht dazu gekommen | ||
| + | |||
| <code winst> | <code winst> | ||
| - | ; (c) Robert Tauber in anlenung an Paket von uib gmbh | + | ; Robert Tauber in anlenung an Paket von uib gmbh |
| ; Update was ist zu tun? | ; Update was ist zu tun? | ||
| Line 480: | Line 526: | ||
| </ | </ | ||
| - | ==== uninstall.ins ==== | + | ==== deljvm.ins ==== |
| + | erlaubt es die subdeljava. als uninstall aufzurufen | ||
| <code winst> | <code winst> | ||
| - | ; (c) Robert Tauber 2014 | + | ; Copyright |
| + | ; This sourcecode is owned by uib | ||
| + | ; and published under the Terms of the General Public License. | ||
| - | [Actions] | + | [Aktionen] |
| - | requiredWinstVersion >= "4.10.5" | + | requiredWinstVersion >= "4.10.8.3" |
| - | setLogLevel | + | Message=Deinstalling Oracle Java Virtual Machine 1.6 ... |
| - | StayOnTop = on | + | DefVar $UninstallCommand$ |
| - | DefVar $ProductId$ | + | DefVar $DisplayName$ |
| - | DefVar $ProductNameShort$ | + | |
| - | DefVar $ProductNameLong$ | + | |
| - | DefVar $LocalDir$ | + | |
| DefVar $ExitCode$ | DefVar $ExitCode$ | ||
| - | DefVar $Part$ | ||
| - | DefVar $ValidOS$ | ||
| - | Set $ValidOS$ = " | ||
| - | |||
| - | ; | ||
| - | ; Angaben zum Produkt | ||
| - | ; | ||
| - | ; Kurzer Produktname (max. 12 Zeichen) | ||
| - | Set $ProductNameShort$ = "Adobe Reader" | ||
| - | ; Langer Produktname (max. 30 Zeichen) | ||
| - | Set $ProductNameLong$ = "Adobe Reader" | ||
| - | ; | ||
| - | ; Gewünschtes Betriebssystem (alle ungültigen auskommentieren) | ||
| - | ; subCheckForWinXP-32 ; Windows XP 32-bit | ||
| - | ; subCheckForVista-32 ; Windows Vista 32-bit | ||
| - | ; subCheckForVista-64 ; Windows Vista 64-bit | ||
| - | ; subCheckForSeven-32 ; Windows 7 32-bit | ||
| - | | ||
| - | ; | ||
| - | |||
| - | |||
| - | |||
| - | ; | + | if FileExists(" |
| - | ; Muss normalerweise nicht geändert werden | + | comment |
| - | ; | + | sub "%ScriptPath%\subdeljava.ins" |
| - | + | ||
| - | ; Bildchen und Statusmeldung | + | |
| - | ShowBitmap | + | |
| - | Message | + | |
| - | + | ||
| - | ; Lokalen Pfad erzeugen | + | |
| - | Set $ProductId$ | + | |
| - | if $ProductId$ = "" | + | |
| - | Set $ProductId$ | + | |
| endif | endif | ||
| - | Set $LocalDir$ = " | ||
| - | ; Prüfen, ob gültiges Betriebssystem | + | [Winbatch_oracle_uninstall] |
| - | if $ValidOS$ = " | + | $UninstallCommand$ |
| - | LogError " | + | |
| - | isFatalError | + | |
| - | endif | + | |
| - | ; | + | </ |
| - | ; Daten vorbereiten | + | |
| - | ; | + | |
| - | | + | |
| - | | + | |
| - | ; | + | ==== subdeljava ==== |
| - | ; Netzlaufwerk verbinden/ | + | Da das updaten der Reg keys mir zu blöd war lass ich jetzt ein Skript danach suchen. |
| - | ; | + | Wer befürchtet das dies vielleicht mal zu viel erwischt kann auch die Version von uib verwenden. |
| - | ; | + | <code winst> |
| - | ;DosInAnIcon_Copy | + | ; Robert Tauber 2013 |
| + | ; RT: Mögliches Zusatz File | ||
| + | ;if FileExists(" | ||
| + | ; sub " | ||
| + | ;endif | ||
| + | ;RT: Sartmenü Aufreumen | ||
| + | LinkFolder_Webstart_delete | ||
| + | ;RT: JAVA Runterschmeisen | ||
| + | Message " | ||
| + | Winbatch_deinstall | ||
| + | Message " | ||
| + | ;RT: Exit Code Auswerten | ||
| + | Sub_check_exitcode | ||
| - | ; | ||
| - | ; Die DeInstallation | ||
| - | ; | ||
| - | Set $Part$ = " | ||
| - | if FileExists(" | ||
| - | Winbatch_uninstall | ||
| - | subCheckExitCodeVLC | ||
| - | Files_uninstall | ||
| - | endif | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | ; | ||
| - | ;----------------------------------------------------- | + | ;RT: Runter mit Java das AutoIt Skript killt alle Java versionen |
| - | ; Subroutinen | + | [Winbatch_deinstall] |
| - | ; | + | %SCRIPTPATH%\Uninstall_Java.exe |
| - | [FilesCleanDir] | + | |
| - | Delete -s $LocalDir$ | + | |
| - | [DosBatchMakeDir] | + | ;RT: Killt den Shot key im Startmenü konte keinen finden |
| - | @echo off | + | [LinkFolder_Webstart_delete] |
| - | mkdir $LocalDir$ | + | set_basefolder common_programs |
| + | delete_subfolder " | ||
| + | delete_subfolder "Java Web Start" | ||
| - | [Winbatch_uninstall] | + | ;RT: Exit cod Checken |
| - | "%ProgramFiles32Dir%\Notepad++\uninstall.exe" /S | + | [Sub_check_exitcode] |
| + | comment "Test for installation success via exit code" | ||
| + | set $ExitCode$ = getLastExitCode | ||
| + | ; informations to exit codes see | ||
| + | ; http:// | ||
| + | ; http:// | ||
| + | if ($ExitCode$ = " | ||
| + | comment "Looks good: setup program gives exitcode zero" | ||
| + | else | ||
| + | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
| + | if ($ExitCode$ = " | ||
| + | comment "A fatal error occurred during installation. 1603" | ||
| + | comment "Quite normal while uninstalling java autoupdater" | ||
| + | comment "for other uninstalls might be a problem" | ||
| + | else | ||
| + | |||
| + | if ($ExitCode$ = " | ||
| + | comment " | ||
| + | comment " | ||
| + | else | ||
| + | if ($ExitCode$ = " | ||
| + | comment "looks good: setup program gives exitcode 1641" | ||
| + | comment " | ||
| + | else | ||
| + | if ($ExitCode$ = " | ||
| + | comment "looks good: setup program gives exitcode 3010" | ||
| + | comment " | ||
| + | else | ||
| + | logError " | ||
| + | isFatalError | ||
| + | endif | ||
| + | endif | ||
| + | endif | ||
| + | endif | ||
| + | endif | ||
| + | </code> | ||
| - | [Files_uninstall] | + | ==== Uninstall_Java.exe / Uninstall_Java.au3 ==== |
| - | delete -sf " | + | SAD (search and destroy) Skript<\\ |
| + | <code autoit> | ||
| + | #cs ---------------------------------------------------------------------------- | ||
| + | | ||
| + | | ||
| - | ; | + | |
| - | ; Netzlaufwerk verbinden/ | + | Deinstalirt alle Java Versionen |
| - | ; | + | |
| - | [DosInAnIcon_Q] | + | |
| - | "p:\!drivemap\map_Q.exe" | + | |
| - | [DosInAnIcon_Copy] | + | |
| - | " | + | |
| - | [FilesCleanTemp] | + | |
| - | Delete -s " | + | |
| + | #ce ---------------------------------------------------------------------------- | ||
| - | ;----------------------------------------------------- | + | ; Script Start - Add your code below here |
| - | ; Subroutinen zur Überprüfung der ExitCodes | + | |
| - | ; Je nach Installer verschieden | + | |
| - | ; | + | |
| - | ; | + | |
| - | ; Windows Installer: subCheckExitCodeMSI | + | |
| - | ; 0 = Erfolgreich | + | |
| - | ; 3010 = Bitte Neustart | + | |
| - | ; Diverse EXE-Dateien: subCheckExitCodeEXE | + | DirCreate(" |
| - | ; 0 = Erfolgreich | + | Opt(" |
| + | ;Reg Key auslesen | ||
| + | Run(@ComSpec & " /c " & 'start /wait "" | ||
| + | Run(@ComSpec & " /c " & 'start /wait "" | ||
| + | ;winwait (" | ||
| - | ; | + | WinWaitClose (" |
| - | [subCheckExitCodeMSI] | + | ;Filter die keys mit {} |
| - | Set $ExitCode$ = getLastExitCode | + | Run(@ComSpec & " |
| - | ; Abbruch bei Fehler | + | Run(@ComSpec & " |
| - | if not (($ExitCode$ = "0") or ($ExitCode$ = "3010")) | + | |
| - | LogError | + | |
| - | isFatalError | + | |
| - | endif | + | |
| - | comment | + | |
| - | ; Neustart, falls gewünscht | + | |
| - | if $ExitCode$ = "3010" | + | |
| - | set $Reboot$ = " | + | |
| - | endif | + | |
| - | [subCheckExitCodeEXE] | ||
| - | Set $ExitCode$ = getLastExitCode | ||
| - | ; Abbruch bei Fehler | ||
| - | if not ($ExitCode$ = " | ||
| - | LogError " | ||
| - | isFatalError | ||
| - | endif | ||
| - | comment " | ||
| - | [subReboot] | + | ;winwait ("cmd.exe") |
| - | if $Reboot$ = "true" | + | WinWaitClose (" |
| - | ExitWindows /Reboot | + | |
| - | endif | + | |
| + | $file = FileOpen(" | ||
| + | $Java = FileOpen(" | ||
| + | ;RT: Könte effektiver sein wenn man das ursprüngliche file con key zu key durchsucht | ||
| + | While 1 | ||
| + | Local $line = FileReadLine($file) | ||
| + | If @error = -1 Then ExitLoop | ||
| + | $KEY = StringReplace($line, | ||
| + | $KEY = StringReplace($KEY , " | ||
| + | ;RT: den inhalt aller {} KEYs Temporär als Text file sichern | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | While 1 | ||
| + | ;RT: Das gerade erstellte textfile nach JER Durchsuchen (JAVA) | ||
| + | Local $line_KEY = FileReadLine($file_KEY) | ||
| + | | ||
| + | if StringInStr ($line_KEY, " | ||
| + | ;RT: wurde in dem Key eine jre gefunden (JAVA) | ||
| + | Local $Split = StringSplit($KEY, | ||
| + | $KEY = " | ||
| + | | ||
| + | FileWrite ( $Java , $KEY & @CRLF) | ||
| + | ExitLoop | ||
| + | | ||
| + | WEnd | ||
| + | | ||
| + | ;RT: File schlisen da sonst fehler | ||
| + | Wend | ||
| + | FileClose ( $file ) | ||
| + | FileClose ( $Java ) | ||
| - | ; | ||
| - | ; Subroutinen zur Überprüfung der Windows-Version | ||
| - | ; | ||
| - | [subCheckForWinXP-32] | ||
| - | if GetMsVersionInfo = " | ||
| - | Set $ValidOS$ = " | ||
| - | endif | ||
| - | |||
| - | [subCheckForVista-32] | ||
| - | if GetMsVersionInfo = " | ||
| - | Set $ValidOS$ = " | ||
| - | endif | ||
| - | |||
| - | [subCheckForVista-64] | ||
| - | if GetMsVersionInfo = " | ||
| - | Set $ValidOS$ = " | ||
| - | endif | ||
| - | |||
| - | [subCheckForSeven-32] | ||
| - | if GetMsVersionInfo = " | ||
| - | Set $ValidOS$ = " | ||
| - | endif | ||
| - | |||
| - | [subCheckForSeven-64] | ||
| - | if GetMsVersionInfo = " | ||
| - | Set $ValidOS$ = " | ||
| - | endif | ||
| + | ;RT: Alle gefundenen Deinstaliren | ||
| + | $Java = FileOpen(" | ||
| + | While 1 | ||
| + | Local $line = FileReadLine($Java ) | ||
| + | If @error = -1 Then ExitLoop | ||
| + | | ||
| + | WEnd | ||
| + | ;winwait (" | ||
| + | WinWaitClose (" | ||
| + | Sleep(5000) | ||
| + | Winkill (" | ||
| + | ;MsgBox ( 0, " | ||
| </ | </ | ||
| - | |||
userspace/etu_javavm.1427751258.txt.gz · Last modified: (external edit)
