daily pastebin goal
71%
SHARE
TWEET

save as .bat

a guest Jul 29th, 2015 617 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. cls
  3.  
  4. set x86="%SYSTEMROOT%\System32\OneDriveSetup.exe"
  5. set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe"
  6.  
  7. echo Closing OneDrive process.
  8. echo.
  9. taskkill /f /im OneDrive.exe > NUL 2>&1
  10. ping 127.0.0.1 -n 5 > NUL 2>&1
  11.  
  12. echo Uninstalling OneDrive.
  13. echo.
  14. if exist %x64% (
  15. %x64% /uninstall
  16. ) else (
  17. %x86% /uninstall
  18. )
  19. ping 127.0.0.1 -n 5 > NUL 2>&1
  20.  
  21. echo Removing OneDrive leftovers.
  22. echo.
  23. rd "%USERPROFILE%\OneDrive" /Q /S > NUL 2>&1
  24. rd "C:\OneDriveTemp" /Q /S > NUL 2>&1
  25. rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S > NUL 2>&1
  26. rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S > NUL 2>&1
  27.  
  28. echo Removing OneDrive from the Explorer Side Panel.
  29. echo.
  30. REG ADD "HKCR\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /V Attributes /T REG_DWORD /D 4035969101 /F
  31.  
  32. taskkill /f /im explorer.exe
  33. start explorer.exe
  34.  
  35. pause
RAW Paste Data
Top