Created
August 30, 2017 10:36
-
-
Save amercier/0a437c9c2f235f1eb872f84c63481e4a to your computer and use it in GitHub Desktop.
Uninstall OneDrive from Windows 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo OFF | |
net session >nul 2>&1 | |
if %ERRORLEVEL% equ 0 ( | |
echo [OK] Administrator PRIVILEGES Detected! | |
echo. | |
) else ( | |
echo ######## ######## ######## ####### ######## | |
echo ## ## ## ## ## ## ## ## ## | |
echo ## ## ## ## ## ## ## ## ## | |
echo ###### ######## ######## ## ## ######## | |
echo ## ## ## ## ## ## ## ## ## | |
echo ## ## ## ## ## ## ## ## ## | |
echo ######## ## ## ## ## ####### ## ## | |
echo. | |
echo. | |
echo ####### ERROR: ADMINISTRATOR PRIVILEGES REQUIRED ######### | |
echo This script must be run as administrator to work properly! | |
echo ########################################################## | |
echo. | |
pause | |
exit /B 1 | |
) | |
taskkill /f /im OneDrive.exe | |
echo [OK] OneDrive task killed | |
echo. | |
%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall | |
echo [OK] OneDrive uninstalled | |
echo. | |
reg add HKCR\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6} /f /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 0 | |
echo [OK] OneDrive shortcut removed from explorer | |
echo. | |
echo ########################################################## | |
echo OneDrive uninstalled successfully! | |
echo ########################################################## | |
echo . | |
pause | |
@echo ON |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment