tis-disable-onedrive

1.1-5
Remove Microsoft OneDrive
1680 downloads
Download

  Description 

  • package : tis-disable-onedrive
  • version : 1.1-5
  • architecture : all
  • categories : Security
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : Remove Microsoft OneDrive
  • locale :
  • target_os : windows
  • min_wapt_version : 1.7
  • sources :
  • installed_size :
  • impacted_process :
  • description_fr : Supprime Microsoft OneDrive
  • description_pl : Odinstaluj Microsoft OneDrive
  • description_de : Deinstallieren Sie Microsoft OneDrive
  • description_es : Desinstalar Microsoft OneDrive
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor :
  • licence :
  • signature_date : 2020-09-28T10:12:06.702928
  • Conflicts :

  Setup.py 

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

uninstallkey = []

# Defining variables
processes_to_kill = ('OneDrive.exe')


def install():
    # Disabling OneDrive in sys env
    killalltasks(processes_to_kill)

    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive','DisableFileSyncNGSC',1,REG_DWORD)
    onedrive32 = makepath(system32,'OneDriveSetup.exe')
    onedrive64 = makepath(os.getenv('SystemRoot'),'SysWOW64','OneDriveSetup.exe')
    if isfile(onedrive32):
        run_notfatal('"%s" /uninstall' % onedrive32)
    if isfile(onedrive64):
        run_notfatal('"%s" /uninstall' % onedrive64)


def session_setup():
    # Initializing variables
    user_app_dir = makepath(user_local_appdata,'Microsoft','OneDrive')
    user_app_path = makepath(user_app_dir,'OneDrive.exe')

    # Killing app before actions
    killalltasks(processes_to_kill)

    # Uninstalling OneDrive in user env
    #"C:\Users\username\AppData\Local\Microsoft\OneDrive\20.143.0716.0003\OneDriveSetup.exe" /uninstall
    if isdir(user_app_dir):
        for setup_dir in glob.glob(makepath(user_app_dir,'**')):
            user_app_setup_path = makepath(setup_dir,'OneDriveSetup.exe')
            if isfile(user_app_setup_path):
                run_notfatal('"%s" /uninstall' % user_app_setup_path)

    # Disabling OneDrive regkey in user env
    registry_delete(HKEY_CURRENT_USER,r'Software\Microsoft\Windows\CurrentVersion\Run','OneDriveSetup')
    registry_delete(HKEY_CURRENT_USER,r'Software\Microsoft\Windows\CurrentVersion\Run','OneDrive')
    registry_delete(HKEY_CURRENT_USER,r'Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run','OneDriveSetup')
    registry_delete(HKEY_CURRENT_USER,r'Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run','OneDrive')


    # Removing OneDrive remaining files
    remove_file(makepath(user_appdata,'Microsoft','Windows','Start Menu','Programs','OneDrive.lnk'))
    remove_tree(makepath(user_local_appdata,'Microsoft','OneDrive'))


def update_package():
    # Initializing variables
    version = control.get_software_version()

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


										

  Changelog 



No changelog.txt.
									
  manifest.sha256