tis-ccleaner

5.71.0.7971-26
CCleaner is a computer utility program used to clean potentially unwanted files (including temporary internet files, where malicious programs and code tend to reside) and invalid Windows Registry entries from a computer, originally supporting Microsoft Windows only.
75087 downloads
Download
default icon

  Description 

  • package : tis-ccleaner
  • version : 5.71.0.7971-26
  • architecture : all
  • categories : Utilities,System and network
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : CCleaner is a computer utility program used to clean potentially unwanted files (including temporary internet files, where malicious programs and code tend to reside) and invalid Windows Registry entries from a computer, originally supporting Microsoft Windows only.
  • locale : all
  • target_os : windows
  • min_wapt_version : 1.7
  • sources : https://www.ccleaner.com/ccleaner/builds
  • installed_size : 53272576
  • impacted_process : CCleaner64,CCleaner,CCUpdate
  • description_fr : CCleaner (abréviation de Crap Cleaner) est un gratuiciel permettant d'optimiser le fonctionnement d'un ordinateur muni du système d'exploitation Windows. Il supprime les fichiers et les enregistrements inutiles, ce qui permet à l'ordinateur de fonctionner plus rapidement et libère de l'espace sur les périphériques de stockage (disques durs ou SSD).
  • description_pl : CCleaner (dawniej Crap Cleaner) – opracowany przez firmę Piriform program narzędziowy na licencji freemium służący między innymi do oczyszczania komputera z niepotrzebnych plików i nieprawidłowych wpisów rejestru systemu Windows.
  • description_de : CCleaner (früherer Name Crap Cleaner) ist ein kostenloses Programm zur Optimierung für die Betriebssysteme Windows, macOS und Android. Windows wird ab Windows XP auf 32- und 64-Bit-Systemen unterstützt.
  • description_es : CCleaner (anteriormente Crap Cleaner)​ es una aplicación gratuita, de código cerrado, que tiene como propósito mejorar el rendimiento de cualquier equipo que ejecute Microsoft Windows mediante la eliminación de los archivos innecesarios y las entradas inválidas del registro de Windows.
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Piriform
  • licence : Freemium
  • signature_date : 2020-09-17T09:17:53.935937
  • Homepage : https://www.ccleaner.com

  Setup.py 

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

uninstallkey = []

# Defining variables
bin_name_string = 'ccsetup_%s_slim.exe'
silent_inst_arg = '/S'
uninstall_key = 'CCleaner'
app_path = makepath(programfiles,'CCleaner')
conf_file_path = makepath(programfiles,'CCleaner','ccleaner.ini')
schtasks_to_disable = [r'\CCleaner Update',r'\CCleanerSkipUAC']
list_recycle_bin_context_menu = ['Exécuter CCleaner','Ouvrir CCleaner...','Run CCleaner','Open CCleaner...']


def install():
    # Initializing variables
    package_version = control.version.split('-')[0]
    bin_name = bin_name_string % package_version
    package_version_split = package_version.split('.')
    short_package_version = '%s.%s' % (package_version_split[0],package_version_split[1])
    app_name = control.name

    # Installing the package
    print('Installing: %s' % bin_name)
    install_exe_if_needed(bin_name,
        silentflags=silent_inst_arg,
        key=uninstall_key,
        min_version=short_package_version)

    # Removing Shortcut
    remove_desktop_shortcut(app_name)

    # Disabling CCleaner Scheduled Tasks
    for task in schtasks_to_disable:
        if task_exists(task):
            try:
                disable_task(task)
            except:
                print('Unable to disable the task: %s' % task)

    # Removing global configuration file
    if isfile(conf_file_path):
        remove_file(conf_file_path)

    # Disable CCleaner Telemetry
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)QuickClean','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)QuickCleanIpm','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)SoftwareUpdater','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)SoftwareUpdaterIpm','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)GetIpmForTrial','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)HealthCheck','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)HealthCheckCommentsConfused','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)HealthCheckCommentsDislike','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)HealthCheckCommentsHate','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)HealthCheckCommentsLike','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)HealthCheckCommentsLove','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)HealthCheckCommentsOkay','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)HealthCheckIpm','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)HealthCheckVersion','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)AlphaIntegration','0')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)TrialOnboarding','0')

    # Remove CCleaner from Recycle Bin context menu
    for menu in list_recycle_bin_context_menu:
        if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\%s' % menu):
            registry_deletekey(HKEY_LOCAL_MACHINE,r'SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\%s\command' % menu, '',force=True)
            registry_deletekey(HKEY_LOCAL_MACHINE,r'SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\%s' % menu, '',force=True)

    """ # Removing CCleaner Spying values in machine registry # Not recommended
    registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)LastUpdate')
    registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)TTL')
    registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)TTL-Spread')
    registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)TTL-Spread')
    registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','GD')
    registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)ABTestingNames')
    registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Piriform\CCleaner','(Cfg)ccst-prev-001') """

    """ # No longer using global parameters since it do not work properly with non-admin users
    inifile_writestring(conf_file_path,'Options','RunICS','0')
    inifile_writestring(conf_file_path,'Options','Monitoring','0')
    inifile_writestring(conf_file_path,'Options','SystemMonitoring','0')
    inifile_writestring(conf_file_path,'Options','CheckTrialOffer','0')
    inifile_writestring(conf_file_path,'Options','SystemMonitoringRunningNotification','0')
    inifile_writestring(conf_file_path,'Options','HelpImproveCCleaner','0')
    inifile_writestring(conf_file_path,'Options','PrefsPrivacyShowOffers1stParty','0')
    inifile_writestring(conf_file_path,'Options','DelayTemp','0')
    inifile_writestring(conf_file_path,'Options','HideWarnings','1')
    inifile_writestring(conf_file_path,'Options','UpdateAuto','0')
    inifile_writestring(conf_file_path,'Options','UpdateNotify','0')
    inifile_writestring(conf_file_path,'Options','UpdateCheck','0')
    inifile_writestring(conf_file_path,'Options','DefaultDetailedView','2')
    inifile_writestring(conf_file_path,'Options','ShowCleanWarning','False')
    inifile_writestring(conf_file_path,'Options','JumplistTasks','1')
    inifile_writestring(conf_file_path,'Options','SkipUAC','1')
    inifile_writestring(conf_file_path,'Options','BackupPrompt','0') """


def session_setup():
    print("Configuring: minimum intrusion and base parameters")

    # Language part
    lang_code_string = '%s' % get_language_code()
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','Language',lang_code_string)

    # Telemetry part
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','AutoICS','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','CheckTrialOffer','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','Monitoring','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','HelpImproveCCleaner','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','SystemMonitoring','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','UpdateAuto','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','UpdateCheck','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','UpdateNotify','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','RunICS','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','SystemMonitoring','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','PrefsPrivacyShowOffers1stParty','0')
    if reg_value_exists(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','Brandover'):
        registry_delete(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','Brandover')
    if reg_value_exists(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','CookiesToSave'):
        cookies_saved = registry_readstring(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','CookiesToSave')
        if '*.avast.com|*.ccleaner.com|*.ccleanercloud.com' in cookies_saved:
            cookies_saved = cookies_saved.replace('*.avast.com|*.ccleaner.com|*.ccleanercloud.com','')
            if cookies_saved.startswith('|'):
                cookies_saved = cookies_saved[1:]
            registry_setstring(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','CookiesToSave',cookies_saved)

    # CCleaner part
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','BackupPrompt','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','DefaultDetailedView','2')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','ShowCleanWarning','False')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','ShowCookiesCleanWarning','False')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','ShowGoogleChromeCleanWarning','False')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','ShowSpotifyCleanSuspendedWarning','False')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','DelayTemp','0')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','HideWarnings','1')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','SkipUAC','1')
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','HideWarnings','1')
    #registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','JumplistTasks','1')

    # Applications part, you may add what you need here
    registry_set(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','(App)Game Explorer','True')

    """ # Removing CCleaner Spying values in user registry # Not recommended
    registry_delete(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','UpdateKey')
    registry_delete(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','NewVersion')
    registry_delete(HKEY_CURRENT_USER,r'SOFTWARE\Piriform\CCleaner','LatestICS') """


def update_package():
    print('Downloading/Updating package content from upstream binary sources')

    # Initializing variables
    proxies = get_proxies()
    app_name = control.name
    bin_name_temp = 'ccsetup_slim.exe'
    url_dl = bs_find('https://www.ccleaner.com/ccleaner/download/slim', 'a', 'class', 'text-semibold', headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0'}, proxies=proxies)['href']
    latest_bin = bin_name_temp
    version = '0'

    #print("Latest %s version is: %s" % (app_name, version))
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print('Downloading: ' + latest_bin)
        wget(url_dl,latest_bin,proxies=proxies)

        # Checking version from file
        version_from_file = get_version_from_binary(latest_bin)
        if version != version_from_file:
            os.rename(latest_bin, bin_name_string % version_from_file)
            version = version_from_file

        # Changing version of the package
        control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
        control.save_control_to_wapt()
        print('Changing version to: %s in WAPT\\control' % control.version)

    # Deleting outdated binaries
    remove_outdated_binaries(version)




def get_proxies():
    import platform
    if platform.python_version_tuple()[0] == '3':
        from urllib.request import getproxies
    else:
        from urllib import getproxies
    return getproxies()


def bs_find(url, element, attribute=None, value=None, headers=None, proxies=None, features='html.parser', **kwargs):
    """"You may need to use a header for some websites. For example: headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0'}
    """
    import requests
    page = requests.get(url, proxies=proxies, headers=headers, **kwargs).text
    try:
        import bs4 as BeautifulSoup
        soup = BeautifulSoup.BeautifulSoup(page, features=features)
    except:
        import BeautifulSoup
        soup = BeautifulSoup.BeautifulSoup(page)
    if value:
        return soup.find(element,{attribute:value})
    else:
        return soup.find(element)


def bs_find_all(url, element, attribute=None, value=None, headers=None, proxies=None, features='html.parser', **kwargs):
    """"You may need to use a header for some websites. For example: headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0'}
    """
    import requests
    page = requests.get(url, proxies=proxies, headers=headers, **kwargs).text
    try:
        import bs4 as BeautifulSoup
        soup = BeautifulSoup.BeautifulSoup(page, features=features)
    except:
        import BeautifulSoup
        soup = BeautifulSoup.BeautifulSoup(page)
    if value:
        return soup.findAll(element,{attribute:value})
    else:
        return soup.findAll(element)


def remove_outdated_binaries(version, list_extensions=['exe','msi','deb','rpm','dmg','pkg'], list_filename_contain=None):
    if type(list_extensions) != list:
        list_extensions = [list_extensions]
    if list_filename_contain:
        if type(list_filename_contain) != list:
            list_filename_contain = [list_filename_contain]
    list_extensions = ['.' + ext for ext in list_extensions if ext[0] != '.']
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*%s' % file_ext):
            if not version in bin_in_dir:
                remove_file(bin_in_dir)
            if list_filename_contain:
                for filename_contain in list_filename_contain:
                    if not filename_contain in bin_in_dir:
                        remove_file(bin_in_dir)


def get_version_from_binary(filename):
    if filename.endswith('.msi'):
        return get_msi_properties(filename)['ProductVersion']
    else:
        return get_file_properties(filename)['ProductVersion']


def get_language_code():
    import ctypes
    windll = ctypes.windll.kernel32
    return windll.GetUserDefaultUILanguage()


										

  Changelog 



Changelog software url : https://www.ccleaner.com/ccleaner/version-history



No changelog.txt.
									
  manifest.sha256