What's New

Batch Script to Remove OneDrive from Windows 10

windows-_10_how_to_wpHeader One of my viewers on my YouTube channel posted a cool script to uninstall OneDrive from Windows 10. This is a great way to customize your Windows 10 image during your deployment run-time. Screen Shot 2015-08-10 at 9.38.44 PM

Here is the code –

@echo off

cls

set x86=”%SYSTEMROOT%\System32\OneDriveSetup.exe”

set x64=”%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe”

echo Closing OneDrive process.

echo.

taskkill /f /im OneDrive.exe > NUL 2>&1

ping 127.0.0.1 -n 5 > NUL 2>&1

echo Uninstalling OneDrive.

echo.

if exist %x64% ( %x64% /uninstall )

else ( %x86% /uninstall )

ping 127.0.0.1 -n 5 > NUL 2>&1

echo Removing OneDrive leftovers.

echo.

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 Removing OneDrive from the Explorer Side Panel.

echo.

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

 

About BjTechNews (1090 Articles)
An IT guy trying to learn everything about technology and sharing it with you all. I'm a blogger and video blogger who highlights daily news in the tech industry, promoting tips and hacks for fellow techies.

2 Comments on Batch Script to Remove OneDrive from Windows 10

  1. Can you add this in your video tutorials on WDS for Win10 ? please.
    thanks.

1 Trackback / Pingback

  1. Windows 10 uninstalling OneDrive - COMPSOL

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from BTNHD

Subscribe now to keep reading and get access to the full archive.

Continue reading