# -*- coding: utf-8 -*-
from setuphelpers import *
def install():
win_services_to_stop = ['wuauserv', 'bits', 'cryptsvc']
software_distrib_windows = makepath(systemdrive, 'windows', 'softwareDistribution')
for s in win_services_to_stop:
if service_is_running(s):
try:
service_stop(s)
except:
pass
if isdir(software_distrib_windows):
# To handle long path create by windows update...
shutil.rmtree('\\\\?\\' + software_distrib_windows)
for s in win_services_to_stop:
if service_is_stopped(s):
try:
service_start(s)
except:
pass