internal void DeleteOneDrive() { logger.output( ProcessUtil.RunCmd("/c taskkill /f /im OneDrive.exe > NUL 2>&1")); logger.output( ProcessUtil.RunCmd("/c ping 127.0.0.1 -n 5 > NUL 2>&1")); if (File.Exists(Paths.SysDir + @"Windows\System32\OneDriveSetup.exe")) { logger.output( ProcessUtil.StartProcess(Paths.SysDir + @"Windows\System32\OneDriveSetup.exe", "/uninstall")); } if (File.Exists(Paths.SysDir + @"Windows\SysWOW64\OneDriveSetup.exe")) { logger.output( ProcessUtil.StartProcess(Paths.SysDir + @"Windows\SysWOW64\OneDriveSetup.exe", "/uninstall")); } logger.output( ProcessUtil.RunCmd("/c ping 127.0.0.1 -n 5 > NUL 2>&1")); logger.output( ProcessUtil.RunCmd("/c rd \"%USERPROFILE%\\OneDrive\" /Q /S > NUL 2>&1")); logger.output( ProcessUtil.RunCmd("/c rd \"C:\\OneDriveTemp\" /Q /S > NUL 2>&1")); logger.output( ProcessUtil.RunCmd("/c rd \"%LOCALAPPDATA%\\Microsoft\\OneDrive\" /Q /S > NUL 2>&1")); logger.output( ProcessUtil.RunCmd("/c rd \"%PROGRAMDATA%\\Microsoft OneDrive\" /Q /S > NUL 2>&1")); logger.output( ProcessUtil.RunCmd( "/c REG DELETE \"HKEY_CLASSES_ROOT\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" /f > NUL 2>&1")); logger.output( ProcessUtil.RunCmd( "/c REG DELETE \"HKEY_CLASSES_ROOT\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" /f > NUL 2>&1")); }
internal void disableSpyTasks() { string[] disabletaskslist = { @"Microsoft\Office\Office ClickToRun Service Monitor", @"Microsoft\Office\OfficeTelemetryAgentFallBack2016", @"Microsoft\Office\OfficeTelemetryAgentLogOn2016", @"Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask", @"Microsoft\Windows\Customer Experience Improvement Program\UsbCeip", @"Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem", @"Microsoft\Windows\Shell\FamilySafetyMonitor", @"Microsoft\Windows\Shell\FamilySafetyRefresh", @"Microsoft\Windows\Application Experience\AitAgent", @"Microsoft\Windows\Application Experience\ProgramDataUpdater", @"Microsoft\Windows\Application Experience\StartupAppTask", @"Microsoft\Windows\Autochk\Proxy", @"Microsoft\Windows\Customer Experience Improvement Program\BthSQM", @"Microsoft\Windows\Customer Experience Improvement Program\Consolidator", @"Microsoft\Office\OfficeTelemetry\AgentFallBack2016", @"Microsoft\Office\OfficeTelemetry\OfficeTelemetryAgentLogOn2016", @"Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser", @"Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector", @"Microsoft\Windows\Maintenance\WinSAT", @"Microsoft\Windows\Media Center\ActivateWindowsSearch", @"Microsoft\Windows\Media Center\ConfigureInternetTimeService", @"Microsoft\Windows\Media Center\DispatchRecoveryTasks", @"Microsoft\Windows\Media Center\ehDRMInit", @"Microsoft\Windows\Media Center\InstallPlayReady", @"Microsoft\Windows\Media Center\mcupdate", @"Microsoft\Windows\Media Center\MediaCenterRecoveryTask", @"Microsoft\Windows\Media Center\ObjectStoreRecoveryTask", @"Microsoft\Windows\Media Center\OCURActivate", @"Microsoft\Windows\Media Center\OCURDiscovery", @"Microsoft\Windows\Media Center\PBDADiscovery", @"Microsoft\Windows\Media Center\PBDADiscoveryW1", @"Microsoft\Windows\Media Center\PBDADiscoveryW2", @"Microsoft\Windows\Media Center\PvrRecoveryTask", @"Microsoft\Windows\Media Center\PvrScheduleTask", @"Microsoft\Windows\Media Center\RegisterSearch", @"Microsoft\Windows\Media Center\ReindexSearchRoot", @"Microsoft\Windows\Media Center\SqlLiteRecoveryTask", @"Microsoft\Windows\Media Center\UpdateRecordPath" }; for (int i = 0; i < disabletaskslist.Length; i++) { ProcessUtil.StartProcess("SCHTASKS", "/Change /TN \"" + disabletaskslist[i] + "\" /disable"); logger.output("Disabled task: " + disabletaskslist[i]); } }