彻底卸载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 ...
随机推荐
- Dockerfile命令大全
Dockerfile 制作Dockerfile为Docker入门学习的第一步. Dockerfile可以快速的帮助我们去构建镜像, 是在工作中必备的一项技能, 下面整理了一些命令 FROM 功能为指定 ...
- tensorflow中数据批次划分示例教程
1.简介 将数据划分成若干批次的数据,使用的函数主要有: tf.train.slice_input_producer(tensor_list,shuffle=True,seed=None,capaci ...
- Python Flask框架
Python有很多Web框架,可谓是百家争鸣,我这里列出几个比较叼的几个框架 Django 市场占有率最高,官方文档几近完美,但是适合比较大的项目,小项目会显得累赘. Tornado ...
- mysql sql文件批量处理
简单动作复杂化,导致处理文件误入坑, 数据库拷贝,备份还原是每个面向对象的开发人员避免不了的动作,在数据库使用中,习惯性的使用第三方数据库管理软件,最近需要做数据库迁移,导出的批量sql文件不知如何区 ...
- Database Administration Statements
MySQL 5.5 Reference Manual / SQL Statement Syntax / Database Administration Statements / Table ...
- Python语言:下载上证股票数据程序
from urllib.request import urlretrieve f = open('SHA.csv', 'r')for line in f: data = line.split(',') ...
- mysql group_concat(column) 函数替换成 oracle wm_concat(colum)
11gr2和12C上已经摒弃了wm_concat函数,所以只能手动创建该函数 解决办法: 一.解锁sys用户 alter user sys account unlock; 二.创建包.包体和函数 以s ...
- python 文件读写时用open还是codecs.open
当我面有数据需要保存时,第一时间一般会想到写到一个txt文件中,当然,数据量比较大的时候还是写到数据库比较方便管理,需要进行网络传输时要序列化,json化.下面主要整理一下平时用的最多的写入到文件中, ...
- Windows----Github环境搭建
关于Github的那点事: 一.下载安装 下载地址: https://git-for-windows.github.io/ 在官方下载完后,安装到Windows Explorer integra ...
- css样式问题解决
1.关于滚动条 (1)布局后由于写了 overflow-y: scroll; 在内容还没有超出就出现了滚动条. 我的解决方法是直接去掉了滚动条: .class::-webkit-scrollbar { ...