Jump to content

Hi,

 

a few months back I deactivated OneDrive with the following code as a batch file. Now I want to reactivate onedrive as I have come across syncing docs between my pc and tablet. 

 

The code I used, it worked great as a batchfile:

@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 Removeing 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

pause

 

Looking forward to your help

 

Tobias

AMD FX-6100 @4.2GHz / Sapphire Radeon RX 480 Nitro+ 8GB / Gigabyte GA-970A-DS3 / Corsair XMS3 1333Mhz 8GB / Adata S510 128GB / Seagate Barracuda 7200.14 1TB / Alpenföhn Brocken ECO /  EVGA GQ 650 / Fractal Design Core 2500 / Fractal Design Venturi HF Fans / 

"It's like a fish with no internet" -Linus Sebastian, 2016

 

 

 

 

 

Link to comment
https://linustechtips.com/topic/588654-re-activate-onedrive/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×