Last active
December 27, 2020 20:46
-
-
Save yonderbread/c322ec079b069574c163adb5f7944378 to your computer and use it in GitHub Desktop.
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
:: !!! THIS SCRIPT WILL REMOVE ONE DRIVE FROM WINDOWS 10 !!! | |
:: !!! PLEASE USE WITH CAUTION !!! | |
:: Screenshot of Explorer with OneDrive removed -> https://prnt.sc/wapuht | |
:: Disabling One Drive | |
cls | |
echo. | |
echo :: Uninstalling OneDrive | |
timeout /t 2 /nobreak > NUL | |
set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe" | |
taskkill /f /im OneDrive.exe > NUL 2>&1 | |
ping 127.0.0.1 -n 5 > NUL 2>&1 | |
if exist %x64% ( | |
%x64% /uninstall | |
) else ( | |
echo "OneDriveSetup.exe installer not found, skipping." | |
) | |
ping 127.0.0.1 -n 8 > NUL 2>&1 | |
rd "%USERPROFILE%\OneDrive" /Q /S > NUL 2>&1 | |
rd "C:\OneDriveTemp" /Q /S > NUL 2>&1 | |
rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S > NUL 2>&1 | |
rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S > NUL 2>&1 | |
echo. | |
echo Removing OneDrive from the Explorer Side Panel. | |
reg delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1 | |
reg delete "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment