This shows you the differences between two versions of the page.
userspace:etu_javavm [2015/03/30 21:38] Robert Tauber [javavm.ins] |
userspace:etu_javavm [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ETU JavaVM ====== | ||
- | |||
- | **Versions**\\ | ||
- | Versions | ||
- | By // | ||
- | |||
- | |||
- | Tested with opsi xxxxx\\ | ||
- | requiredWinstVersion >= 4.11.4.12 // | ||
- | |||
- | Die Setup-Daten werden unter Q: | ||
- | (den Speicher Ort des Netzlaufwerks Q: bestimmt die **map_Q.exe** // | ||
- | |||
- | Tree (..\opt_pcbin\install\!drivemap): | ||
- | [[map_Q.exe]]\\ | ||
- | |||
- | Tree (Q: | ||
- | CopyFolder.exe\\ | ||
- | jre_# | ||
- | jre_# | ||
- | |||
- | Tree (..\Java): | ||
- | OPSI\control\\ | ||
- | CLIENT_DATA\javavm.ins\\ | ||
- | CLIENT_DATA\deljvm.ins\\ | ||
- | CLIENT_DATA\subdeljava.ins\\ | ||
- | CLIENT_DATA\Uninstall_Java.exe\\ | ||
- | CLIENT_DATA\java.png\\ | ||
- | |||
- | ==== CopyFolder.exe / CopyFolder.au3 ==== | ||
- | Kopieren und Umbenennen \\ | ||
- | //Später ermitteln der Version Nummer// | ||
- | |||
- | <code autoit> | ||
- | #cs ---------------------------------------------------------------------------- | ||
- | |||
- | | ||
- | | ||
- | |||
- | | ||
- | Template AutoIt script. | ||
- | |||
- | #ce ---------------------------------------------------------------------------- | ||
- | |||
- | ; Script Start - Add your code below here | ||
- | #include < | ||
- | |||
- | #include < | ||
- | |||
- | Local $sPath = @ScriptDir | ||
- | Local $aPath = StringSplit( @ScriptDir, " | ||
- | Local $sPathTo = " | ||
- | local $extention = " | ||
- | |||
- | ; | ||
- | |||
- | ;MsgBox ( 1, "Zeil Pfad", $sPathTo | ||
- | DirRemove ( $sPathTo , 1 ) | ||
- | |||
- | Local $sFolderList = _FileListToArray($sPath , " | ||
- | local $i = 0 | ||
- | For $i = 1 to $sFolderList[0] | ||
- | |||
- | Local $sFileList = _FileListToArray($sPath & " | ||
- | if $sFileList <> 0 Then | ||
- | if $sFileList[0] = 1 Then | ||
- | ; | ||
- | $sFrom = $sPath & " | ||
- | $sTo = $sPathTo & " | ||
- | DirCopy ( $sFrom, $sTo, 9 ) | ||
- | ;DirRemove ( $sFrom ,1 ) | ||
- | ;MsgBox ( 1, " | ||
- | Else | ||
- | MsgBox ( 1, " | ||
- | _ArrayDisplay($sFileList, | ||
- | EndIf | ||
- | Else | ||
- | ;MsgBox ( 1, "No Subfolders in: ", $sPath & " | ||
- | endif | ||
- | |||
- | Local $sFileList = _FileListToArray($sPathTo & " | ||
- | if $sFileList <> 0 Then | ||
- | if $sFileList[0] = 1 Then | ||
- | ; | ||
- | $sFrom = $sPathTo & " | ||
- | $sTo = $sPathTo & " | ||
- | FileMove ( $sFrom, $sTo) | ||
- | ;MsgBox ( 1, " | ||
- | Else | ||
- | MsgBox ( 1, " | ||
- | _ArrayDisplay($sFileList, | ||
- | EndIf | ||
- | Else | ||
- | ;MsgBox ( 1, "No *.MSI Files in: ", $sPath & " | ||
- | endif | ||
- | Next | ||
- | |||
- | Exit | ||
- | </ | ||
- | |||
- | ==== javavm.ins ==== | ||
- | <code winst> | ||
- | ; Robert Tauber in anlenung an Paket von uib gmbh | ||
- | |||
- | ; Update was ist zu tun? | ||
- | |||
- | ; 1. Hol dir die Aktuelle version 32 und 64 bit | ||
- | ; http:// | ||
- | ; | ||
- | ; 3. Öfnet den Pfaht | ||
- | ; | ||
- | ; 4. Kopirt dort die ortner | ||
- | ; | ||
- | ; | ||
- | ; oder so änlich | ||
- | ; 5. Fügt sie unter | ||
- | ; | ||
- | ; ein | ||
- | ; | ||
- | ; set $AktMsi32$ = " | ||
- | ; set $AktMsi64$ = $AktMsi32$ | ||
- | ; Set $msi32path$ = " | ||
- | ; Set $msi64path$ = " | ||
- | ; 7. Teste es :-P | ||
- | ; | ||
- | |||
- | ; Kompatibel für Win 7 | ||
- | ; Vemutlich nicht Kompatibel mit Win 2000 | ||
- | |||
- | ; Header der Ursprünglichen pakets | ||
- | ; | ||
- | ; Copyright (c) uib gmbh (www.uib.de) | ||
- | ; This sourcecode is owned by uib | ||
- | ; and published under the Terms of the General Public License. | ||
- | |||
- | ;see | ||
- | ; | ||
- | ; | ||
- | ; | ||
- | |||
- | [Aktionen] | ||
- | requiredWinstVersion >= " | ||
- | setLogLevel = 5 | ||
- | Message " | ||
- | DefVar $ExitCode$ | ||
- | DefVar $INST_MsVersion$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | DefVar $JAVAVERSION$ | ||
- | DefVar $JAVA32_VER$ | ||
- | DefVar $JAVA64_VER$ | ||
- | DefVar $InstallPlugins$ | ||
- | DefVar $MySystemRoot$ | ||
- | DefVar $success$ | ||
- | DefVar $AktMsi32$ | ||
- | DefVar $AktMsi64$ | ||
- | DefVar $msi32path$ | ||
- | DefVar $msi64path$ | ||
- | DefVar $msiinstall$ | ||
- | DefVar $InstalledJavaExe$ | ||
- | DefVar $Temp$ | ||
- | |||
- | DefVar $WinstRegKey$ | ||
- | DefVar $Flag$ | ||
- | |||
- | Set $WinstRegKey$ = " | ||
- | Set $Flag$ = GetRegistryStringValue32(" | ||
- | |||
- | DefStringlist $INST_MsVersionMap$ | ||
- | |||
- | set $Temp$ = EnvVar(" | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_MsVersion$ = GetMsVersionInfo | ||
- | set $INST_MsVersionMap$ = GetMSVersionMap | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | ; " | ||
- | set $MySystemRoot$ = " | ||
- | set $success$ = " | ||
- | |||
- | ;set $JAVA32_EXE$=" | ||
- | ;set $JAVA64_EXE$=" | ||
- | |||
- | set $AktMsi32$ = " | ||
- | set $AktMsi64$ = " | ||
- | Set $msi32path$ = " | ||
- | Set $msi64path$ = " | ||
- | |||
- | ;set $AktMsi32$ = " | ||
- | ;set $AktMsi64$ = $AktMsi32$ | ||
- | ;Set $msi32path$ = " | ||
- | ;Set $msi64path$ = " | ||
- | ;Set $msi32path$ = " | ||
- | ;Set $msi64path$ = " | ||
- | |||
- | set $JAVAVERSION$ = GetProductProperty(" | ||
- | |||
- | set $msiinstall$ = " | ||
- | |||
- | set $InstallPlugins$ = " | ||
- | |||
- | ;RT: Speicher platz Überprüfen | ||
- | if not(HasMinimumSpace (" | ||
- | LogError "Not enough space on %SystemDrive%, | ||
- | isFatalError | ||
- | ; Stop process and set installation status to failed | ||
- | endif | ||
- | |||
- | ;RT: Betribssystem ok | ||
- | if $INST_MsVersion$ < " | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | |||
- | ;RT Bild herzeigen | ||
- | ShowBitmap " | ||
- | |||
- | if not ($Flag$ = " | ||
- | Message " | ||
- | ;RT unterprog aufrufen | ||
- | ; | ||
- | if FileExists(" | ||
- | comment "start uninstall" | ||
- | sub " | ||
- | endif | ||
- | Set $Flag$ = " | ||
- | Registry_SaveRebootFlag | ||
- | ExitWindows / | ||
- | endif | ||
- | |||
- | if ($Flag$ = " | ||
- | comment " | ||
- | Set $Flag$ = " | ||
- | Registry_SaveRebootFlag | ||
- | DosInAnIcon_Q | ||
- | DosInAnIcon_Copy | ||
- | |||
- | |||
- | |||
- | ;RT: Instaliert Java 32 | ||
- | ; + Beschreibung der daten beschafung | ||
- | if (($INST_SystemType$ = "x86 System" | ||
- | ;RT: da vorher uninstall macht doch nut Firefox sin | ||
- | comment "kill a running firefox" | ||
- | Message " | ||
- | |||
- | killtask " | ||
- | killtask " | ||
- | killtask " | ||
- | killtask " | ||
- | |||
- | ;RT: Scheint notwendig zu sein habs noch net ohne getestet | ||
- | if $INST_SystemType$ = "64 Bit System" | ||
- | comment " | ||
- | ; see http:// | ||
- | Registry_redirect_64_profile_image_to_32 /64bit | ||
- | endif | ||
- | |||
- | if $msiinstall$ = " | ||
- | Execwith_autoit_close_proxy " | ||
- | Execwith_autoit_zertifikat | ||
- | ; | ||
- | Winbatch_oracle_msi_install_32 | ||
- | Sub_check_exitcode | ||
- | endif | ||
- | Message "Check Java Virtual Machine 32 bit ..." | ||
- | ;RT: weis net was das macht | ||
- | if CompareDotSeparatedNumbers(" | ||
- | includelog " | ||
- | endif | ||
- | |||
- | Killtask " | ||
- | ;RT: Scheinbar der Zweite teil des " | ||
- | if $INST_SystemType$ = "64 Bit System" | ||
- | comment " | ||
- | Registry_redirect_64_profile_image_to_64 /64bit | ||
- | endif | ||
- | |||
- | ;RT: Überprüfen was instalirt wurde | ||
- | Set $InstalledJavaExe$ = " | ||
- | DOSInAnIcon_java_version | ||
- | |||
- | comment " | ||
- | ; see http:// | ||
- | Winbatch_oracle_silent_disable_update | ||
- | ; | ||
- | Registry_disable_update | ||
- | ; | ||
- | endif ; 32 Bit | ||
- | |||
- | |||
- | |||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | comment "kill a running firefox" | ||
- | Message " | ||
- | |||
- | killtask " | ||
- | killtask " | ||
- | killtask " | ||
- | killtask " | ||
- | |||
- | if ($INST_MsVersion$ = " | ||
- | ; | ||
- | ; | ||
- | comment "on 2008x64 we working with msi" | ||
- | Set $msiinstall$ = " | ||
- | endif | ||
- | |||
- | ;killtask " | ||
- | ;killtask " | ||
- | ;killtask " | ||
- | ;killtask " | ||
- | |||
- | if $msiinstall$ = " | ||
- | Execwith_autoit_close_proxy " | ||
- | Execwith_autoit_Wrapper " | ||
- | Winbatch_oracle_msi_install_64 | ||
- | Sub_check_exitcode | ||
- | endif | ||
- | |||
- | if CompareDotSeparatedNumbers(" | ||
- | includelog " | ||
- | endif | ||
- | |||
- | Killtask " | ||
- | comment " | ||
- | ; see http:// | ||
- | Registry_disable_update /64Bit | ||
- | Set $InstalledJavaExe$ = " | ||
- | DOSInAnIcon_java_version | ||
- | ; | ||
- | endif ; 64 Bit | ||
- | |||
- | if not ($success$ = " | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | |||
- | endif | ||
- | ; zusätzliches File möglich | ||
- | ;if FileExists(" | ||
- | ; sub " | ||
- | ;endif | ||
- | |||
- | ExitWindows /Reboot | ||
- | |||
- | |||
- | |||
- | ; | ||
- | |||
- | [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 " | ||
- | 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 " | ||
- | ; | ||
- | set $success$ = " | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | |||
- | [DosInAnIcon_Q] | ||
- | " | ||
- | [DosInAnIcon_Copy] | ||
- | " | ||
- | |||
- | |||
- | |||
- | ;RT: Autoit Killt nerfige abfragen | ||
- | [Execwith_autoit_close_proxy] | ||
- | WinWait(" | ||
- | Sleep(500) | ||
- | ; activating | ||
- | WinActivate(" | ||
- | send (" | ||
- | exit | ||
- | |||
- | [Execwith_autoit_zertifikat] | ||
- | WinWait(" | ||
- | Sleep(500) | ||
- | ; activating | ||
- | WinActivate(" | ||
- | send (" | ||
- | exit | ||
- | |||
- | ; wird im 64 bit teil verwendet | ||
- | [Execwith_autoit_Wrapper] | ||
- | WinWait(" | ||
- | Sleep(500) | ||
- | ; activating | ||
- | WinActivate(" | ||
- | send (" | ||
- | exit | ||
- | |||
- | ;RT: setup mit MSI | ||
- | [Winbatch_oracle_msi_install_32] | ||
- | msiexec /i " | ||
- | ; | ||
- | [Winbatch_oracle_msi_install_64] | ||
- | msiexec /i " | ||
- | ; | ||
- | ;RT: vieleicht geht das | ||
- | [Winbatch_oracle_silent_install_32] | ||
- | c: | ||
- | |||
- | |||
- | ;RT Regestry Hack | ||
- | [Registry_redirect_64_profile_image_to_32] | ||
- | openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-18] | ||
- | set " | ||
- | |||
- | [Registry_redirect_64_profile_image_to_64] | ||
- | openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-18] | ||
- | set " | ||
- | |||
- | ;RT: Welches Java ist drauf? | ||
- | [DOSInAnIcon_java_version] | ||
- | " | ||
- | |||
- | [DOSInAnIcon_instalation_abgeschlossen] | ||
- | @echo off | ||
- | tasklist |find /i " | ||
- | :while1 | ||
- | if %errorlevel% == 0 ( | ||
- | tasklist |find /i " | ||
- | goto :while1 | ||
- | ) | ||
- | |||
- | echo 1 | ||
- | |||
- | [Winbatch_oracle_silent_disable_update] | ||
- | ;RT: Scheint vorhanden zu sein und zu funktioniren | ||
- | msiexec /x {4A03706F-666A-4037-7777-5F2748764D10} /qb-! | ||
- | |||
- | [Registry_disable_update] | ||
- | ;RT: und nochmal updates off | ||
- | openkey [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy] | ||
- | set " | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ;RT: wird nicht aufgerufen | ||
- | [winbatch_start_taskmgr] | ||
- | taskmgr.exe | ||
- | |||
- | [Files_del] | ||
- | delete -sf " | ||
- | ;delete -f " | ||
- | ;delete -f " | ||
- | ;delete -f " | ||
- | |||
- | |||
- | [Registry_SaveRebootFlag] | ||
- | openKey [$WinstRegKey$] | ||
- | set " | ||
- | |||
- | </ | ||
- | |||
- | ==== deljvm.ins ==== | ||
- | <code winst> | ||
- | ; Copyright (c) uib gmbh (www.uib.de) | ||
- | ; This sourcecode is owned by uib | ||
- | ; and published under the Terms of the General Public License. | ||
- | |||
- | [Aktionen] | ||
- | requiredWinstVersion >= " | ||
- | Message=Deinstalling Oracle Java Virtual Machine 1.6 ... | ||
- | DefVar $UninstallCommand$ | ||
- | DefVar $DisplayName$ | ||
- | DefVar $ExitCode$ | ||
- | |||
- | if FileExists(" | ||
- | comment "start uninstall" | ||
- | sub " | ||
- | endif | ||
- | |||
- | [Winbatch_oracle_uninstall] | ||
- | $UninstallCommand$ | ||
- | |||
- | </ | ||
- | |||