tis-java6 6.30-0

  • package : tis-java6
  • version : 6.30-0
  • description : Java JRE 6 32 et 64 bits, ferme IE, FF, TB avant install, Désactive mises à jour auto
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2017-07-20 11:20:58

setup.py

# -*- coding: utf-8 -*-
from setuphelpers import *

# registry key(s) where WAPT will find how to remove the application(s)
uninstallkey = []

# command(s) to launch to remove the application(s)
uninstallstring = []

# list of required parameters names (string) which canb be used during install
required_params = []

version = '6u30'

def install():
    # if you want to modify the keys depending on environment (win32/win64... params..)
    print("installation de Java (JRE)")
    if not installed_softwares('{26A24AE4-039D-4CA4-87B4-2F8321%sFF}'%version.replace('u','0')) or WAPT.options.force:

        print ("closing firefox")
        if isrunning('firefox.exe'):
            killalltasks('firefox.exe')

        print("closing internet explorer")
        if isrunning('iexplore.exe'):
            killalltasks('iexplore.exe')

        print ("closing java updater service")
        if isrunning('jushed.exe'):
            killalltasks('jushed.exe')

        print "Installation JRE 32bits"
        run('jre-%s-windows-i586.exe /s'%version)
    else:
        print "Skipping already installed JRE 32bit"
    uninstallkey.append('{26A24AE4-039D-4CA4-87B4-2F8321%sFF}'%version.replace('u','0'))

    if iswin64():
        print("closing internet explorer")
        if isrunning('iexplore.exe'):
            killalltasks('iexplore.exe')

        if not installed_softwares('{26A24AE4-039D-4CA4-87B4-2F8641%sFF}'%version.replace('u','0')) or WAPT.options.force:
            print "Installation JRE 64bits"
            run('jre-%s-windows-x64.exe /s'%version)
        else:
            print "Skipping already installed JRE 32bit"
        uninstallkey.append('{26A24AE4-039D-4CA4-87B4-2F8641%sFF}'%version.replace('u','0'))

    print("desactivation des mises a jour automatiques")
    if iswin64():
        key=reg_openkey_noredir(HKEY_LOCAL_MACHINE,r'SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy',sam=KEY_WRITE,create_if_missing=True)
        reg_setvalue(key,'EnableJavaUpdate',0,REG_DWORD)
    else:
        key=reg_openkey_noredir(HKEY_LOCAL_MACHINE,r'SOFTWARE\JavaSoft\Java Update\Policy',sam=KEY_WRITE,create_if_missing=True)
        reg_setvalue(key,'EnableJavaUpdate',0,REG_DWORD)
    

manifest.sha1

[["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "d140401965341ede69880cd6342c5db7040324b2"], ["jre-6u30-windows-x64.exe", "163712ee60ff5c100497267c6bb3de89f1bc301e"], ["jre-6u30-windows-i586.exe", "9b3bfa9fb8c29e482b9d352ca22067cec79967e6"], ["setup.py", "533df0591602f43e23c599628bc7c3566c37d8ce"], ["WAPT/control", "c6b6074dbeebe21abd8a315cd4e28c3499e36acb"]]