tis-java7 7.75-1

  • package : tis-java7
  • version : 7.75-1
  • description : Java JRE 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
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20170720-112058
  • min_os_version :
  • min_wapt_version :

setup.py

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

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

version = '7u75'
key_32 = '{26A24AE4-039D-4CA4-87B4-2F0321%sFF}'%version.replace('u','0')
key_64 = '{26A24AE4-039D-4CA4-87B4-2F0641%sFF}'%version.replace('u','0')

def install():
    # if you want to modify the keys depending on environment (win32/win64... params..)
    print("installation de Java (JRE)")
    if not installed_softwares(uninstallkey=key_32) 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(key_32)

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

        if not installed_softwares(uninstallkey=key_64) 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(key_64)

    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

[["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "d140401965341ede69880cd6342c5db7040324b2"], ["jre-7u75-windows-i586.exe", "cd5f2222c6a9db6adfb385eaaeff8f95ea32446f"], ["jre-7u75-windows-x64.exe", "488492de778fc47f67a33c65ea922124279c20d4"], ["setup.py", "bd40f1a56709f6597d0242280b474808f8114dde"], ["WAPT/control", "6c3e6a6d4b8dab39b7426fb4a48a54e408cb6fdb"]]