Tranquil IT recrute Tranquil IT recrute

tis-fix-disable-windows-update

Version : 4

Download
  • package : tis-fix-disable-windows-update
  • editor :
  • version : 4
  • licence :
  • architecture : all
  • locale :
  • description : Package for tis-fix-disable-windows-update
  • description_fr :
  • min_os_version :
  • max_os_version :
  • min_wapt_version :
  • installed_size :
  • impacted_process :
  • signature_date : 2019-11-19T18:36:58.092000
  • maintainer : Simon FONTENEAU

setup.py

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

uninstallkey = []

def install():
    print('installing %s' % control.asrequirement())
    # put here what to do when package is installed on host
    # implicit context variables are WAPT, basedir, control, user, params, run

    for service in ('dosvc','waasmedicsvc','unosvc'):
        print("Checking  %s " % service)
        if reg_key_exists(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Services\%s' % service):
            if int(registry_readstring(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Services\%s' % service,'start')) !=4:
                print('Disabling Windows Remediation Service (%s)'% service)
                registry_set(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Services\%s' % service,'start',4)
                try:
                    service_stop(service)
                except:
                    pass
                run_notfatal('taskkill /FI "SERVICES eq %s"  /F' % service)
        else:
            print('no service %s found ' % service)
    # osrss (Windows 10 Update Facilitation) cannot be shut down with standard way
    registry_set(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Services\osrss','start',4)
    run_notfatal(r"icacls c:\windows\system32\osrss.dll /deny *S-1-1-0:(oi)(ci)(DE,dc)")
    run_notfatal('taskkill /FI "SERVICES eq osrss"  /F')

    # wuauserv is still need for waptwua
    registry_set(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Services\wuauserv','start',4)

def audit():
    install()
			

Changelog

"""{% trans %}No changelog.{% endtrans %}"""
			

manifest.sha256

[["setup.py","54f846e873504629c2bcd2fd1897d5dcdfba0b5d93422bd2a45fa5806487631b"],["WAPT/certificate.crt","79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"],["WAPT/wapt.psproj","510d3af6fcf8f2eae5db684bb830ea9845576e76872b9b10854efaea6e4a4cd8"],["WAPT/control","7c26a17ff6af4551eb047eddf07d081e83f83a65f923fc36b18d3da78df179f9"]]