sebus

Uninstall OneDrive completely in Windows 10

Jun 3rd, 2018
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.92 KB | None | 0 0
  1. @echo off
  2. # https://forums.mydigitallife.net/members/melerix.248500/
  3. cls
  4.  
  5. set x86="%SYSTEMROOT%\System32\OneDriveSetup.exe"
  6. set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe"
  7.  
  8. echo Closing OneDrive process.
  9. echo.
  10. taskkill /f /im OneDrive.exe > NUL 2>&1
  11. ping 127.0.0.1 -n 5 > NUL 2>&1
  12.  
  13. echo Uninstalling OneDrive.
  14. echo.
  15. if exist %x64% (
  16. %x64% /uninstall
  17. ) else (
  18. %x86% /uninstall
  19. )
  20. ping 127.0.0.1 -n 5 > NUL 2>&1
  21.  
  22. echo Removing OneDrive leftovers.
  23. echo.
  24. rd "%USERPROFILE%\OneDrive" /Q /S > NUL 2>&1
  25. rd "C:\OneDriveTemp" /Q /S > NUL 2>&1
  26. rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S > NUL 2>&1
  27. rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S > NUL 2>&1
  28.  
  29. echo Removeing OneDrive from the Explorer Side Panel.
  30. echo.
  31. REG DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
  32. REG DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
  33.  
  34. pause
Advertisement
Add Comment
Please, Sign In to add comment