彻底卸载Windows 10中OneDrive
批处理来源网上。
@rem OneDrive Complete uninstaller batch process for Windows 10.
@rem Run as administrator to completely delete all OneDrive components and files.
@rem Written by TERRA Operative - 2016/08/31. V1.2
@rem Feel free to distribute freely as long as you leave this entire file unchanged and intact,
@rem and if you do make changes and adaptions, don't be a dick about attributing where due.
@rem And most importantly, peace out and keep it real. @echo OFF @REM Set variables for coloured text
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set "DEL=%%a"
) echo ------Windows 10 OneDrive Uninstaller V1.2------
echo. @rem This code block detects if the script is being running with admin privileges. If it isn't it pauses and then quits.
NET SESSION >nul 2>&1
IF %ERRORLEVEL% EQU 0 ( echo Administrator Privileges Detected!
echo.
) ELSE ( echo.
call :colorEcho 0C "########### ERROR - ADMINISTRATOR PRIVILEGES REQUIRED #############"
echo.
call :colorEcho 0C "# #"
echo.
call :colorEcho 0C "#"
call :colorEcho 07 " This script must be run as administrator to work properly."
call :colorEcho 0C " #"
echo.
call :colorEcho 0C "#"
call :colorEcho 07 " If you're seeing this after clicking on a start menu icon,"
call :colorEcho 0C " #"
echo.
call :colorEcho 0C "#"
call :colorEcho 07 " then right click on the file and select 'Run As Administrator'"
call :colorEcho 0C " #"
echo.
call :colorEcho 0C "# #"
echo.
call :colorEcho 0C "###################################################################"
echo.
echo. PAUSE
EXIT /B 1
) echo -----------------------------------------------
call :colorEcho 0C " WARNING"
echo.
call :colorEcho 0C " This script will completely and permanently"
echo.
call :colorEcho 0C " remove OneDrive from your computer."
echo.
call :colorEcho 0C " Make sure all OneDrive documents"
echo.
call :colorEcho 0C " that are stored locally are fully"
echo.
call :colorEcho 0C " backed up before proceeding."
echo.
echo -----------------------------------------------
echo. SET /P M= Press 'Y' to continue or any other key to exit.
if %M% ==Y goto PROCESSKILL
if %M% ==y goto PROCESSKILL EXIT /B 1 @rem The following is based on info from here written by 'LK':
@rem https://techjourney.net/disable-or-uninstall-onedrive-completely-in-windows-10/ @rem Terminate any OneDrive process
:PROCESSKILL
echo.
echo Terminating OneDrive process. taskkill /f /im OneDrive.exe @rem Detect if OS is 32 or 64 bit
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT if %OS%==32BIT GOTO 32BIT
if %OS%==64BIT GOTO 64BIT @rem Uninstall OneDrive app
:32BIT
echo.
echo This is a 32-bit operating system.
echo Removing OneDrive setup files. %SystemRoot%\System32\OneDriveSetup.exe /uninstall
GOTO CLEAN :64BIT
echo.
echo This is a 64-bit operating system.
echo Removing OneDrive setup files. %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
GOTO CLEAN @rem Clean and remove OneDrive remnants
:CLEAN
echo.
echo Removing remaining OneDrive folders. rd "%UserProfile%\OneDrive" /Q /S
rd "%LocalAppData%\Microsoft\OneDrive" /Q /S
rd "%ProgramData%\Microsoft OneDrive" /Q /S
rd "C:\OneDriveTemp" /Q /S echo.
call :colorEcho 0C "If you see 'access denied' errors here, reboot and run this batch file again."
echo. @rem Delete and remove OneDrive in file explorer folder tree registry key
echo.
echo Removing OneDrive registry keys. IF EXIST "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" REG Delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
IF EXIST "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" REG Delete "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
REG ADD "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v System.IsPinnedToNameSpaceTree /d "0" /t REG_DWORD /f echo.
echo OneDrive Uninstall and cleaning completed.
echo. PAUSE
echo So long and thanks for all the fish...
PING -n 2 127.0.0.1>nul
EXIT /B 1 @rem Settings for text colour :colorEcho
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1i
彻底卸载Windows 10中OneDrive的更多相关文章
- 如何完全禁用或卸载Windows 10中的OneDrive - 51CTO.COM
OneDrive 是微软的个人云存储平台,提供了对个人用户的文件托管.存储和同步等服务,OneDrive 默认被内置在 Windows 10 操作系统当中,而且当用户使用 微软账户 登录时,OneDr ...
- 如何完全禁用或卸载Windows 10中的OneDrive
该功能占用很大的内存与CPU 详见http://os.51cto.com/art/201508/489371.htm
- [转载]在 Windows 10 中, 如何卸载和重新安装 OneNote App
在 Windows 10 中, 如何卸载和重新安装 OneNote App 15/8/2015 使用 PowerShell 命令卸载 OneNote App 开始菜单 -> 输入 "P ...
- 【翻译】Windows 10 中为不同设备加载不同页面的3种方法
在以前,为PC和手机做App是两个工程,PC和手机各一个.在Windows 10中会发现只有一个了,对于简单的页面变化可以使用VisualState来解决,但是比如网易云音乐这种PC版和手机版差异巨大 ...
- 在Windows 10中截取截图的6种方式 简介
在Windows 10中截取截图的6种方式 简介 截图对于不同的目的很重要.它可以用于捕获笔记本电脑上的任何内容的截图.所以,如果你使用Windows 10,你可能不知道如何截图,因为它是比较新的.因 ...
- 重装助手教你如何在Windows 10中更改您的帐户名称
当您设置新的Win10免费下载 PC时,您选择用户名的部分可能会让您措手不及.如果是这种情况,您可以选择弹出头部的第一件事或者您打算稍后更改的随机和临时事物.但令人惊讶的是,在Windows 10中更 ...
- 如何在 Windows 10 中搭建 Node.js 环境?
[编者按]本文作者为 Szabolcs Kurdi,主要通过生动的实例介绍如何在 Windows 10 中搭建 Node.js 环境.文章系国内 ITOM 管理平台 OneAPM 编译呈现. 在本文中 ...
- Windows 10 中的存储空间
存储空间有助于保护你的数据免受驱动器故障的影响,并随着你向电脑添加驱动器而扩展存储.你可以使用存储空间将两个或多个驱动器一起分组到一个存储池中,然后使用该池的容量来创建称为存储空间的虚拟驱动器.这些存 ...
- [转]如何在Windows 10中更改文件夹背景颜色
ini文件.我们甚至可以使用相同的技术将图片设置为文件夹背景. 已有工具可以更改Windows 7中Windows资源管理器背景的颜色,并将图像设置为Windows 7中的文件夹背景,但这些工具与Wi ...
随机推荐
- VSCode汉化
1.打开VSCode 点击箭头指示地方 在搜索框中输入chinese 然后安装中文简体 2.按住 Ctrl+shift+p 选择配置显示语言 然后会看见下面的样子 添加 "locale&q ...
- 7.8 GRASP原则八: 间接 Indirection
GRASP原则八: 间接 Indirection 若两个对象直接连接,导致耦合太紧,如何解决?3.1 GRASP rule8: Indirection 间接 Name: Indirection ...
- 高级FTP服务器开发
要求: 1. 用户加密认证 2. 多用户同时登陆 3. 每个用户有自己的家目录且只能访问自己的家目录 4. 对用户进行磁盘配额.不同用户配额可不同 5. 用户可以登陆server后,可切换目录 6. ...
- python二进制读写文件
#coding=gbk ''' Created on 2014-5-7 ''' import os.path inputPath = './input.txt' outPath = './out.tx ...
- Android 音视频深入 十二 FFmpeg视频替换声音(附源码下载)
项目地址,求starhttps://github.com/979451341/AudioVideoStudyCodeTwo/tree/master/FFmpeg%E7%BB%99%E8%A7%86%E ...
- UVa Live 4794 - Sharing Chocolate 枚举子集substa = (s - 1) & substa,记忆化搜索 难度: 2
题目 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_pr ...
- 四:(之八_Linux压力测试工具stress)Dockerfile语法梳理和实践
8.1 安装stress stress目前是在该目录下的可执行文件 --vm 创建几个进程 --vm-bytes 为每个进程分配多少内存 8.2 debug输出stress创建进程的过程 一直在创建有 ...
- Visual Basic 2017 操作Excel和word【1】持续更新……
我坚持在VB的路上走到黑………… 清单1.1 从应用程序对象导航到Excel中的工作表 Dim myWorkbooks As Excel.Workbooks = app.Workbooks ) ...
- 输入、输出与Mad Libs游戏
name1 = input('请输入一个名字:') name2 = input('再输入一个名字:') article = input('请输入一种物品:') print('{}掉进了{},{}去救她 ...
- 第一周例行报告psp
此作业要求参见 https://edu.cnblogs.com/campus/nenu/2018fall/homework/2100 (1)psp表