SightUp
Well-known member
- Local time
- 2:29 AM
- Posts
- 120
- OS
- Windows
I created a new .bat file to uninstall OneDrive and all of it's left overs. I dare say this might be one of the more comprehensive ones out there. I need some eyes on it though and tell me if it will work as intended. Hopefully someone here might even be able to test it out for me.
Attached is the .bat. Note, I made it for a 64 bit OS and I don't know if it's complete for a 32 bit OS, not that it should matter.
Here is the code.
Couple of questions about it. I am combining about three different peoples scripts to come up with this.
Is this line needed? I couldn't find much data on what it does specifically. It was added in two of the scripts I found though so I thought it must be semi important.
Here is the cmd prompt output that I got when I ran it.
Clearly I got a few errors because I ran a script on day one already that uninstalled OneDrive.
If I can get some feedback on this, that'd be wonderful!
Attached is the .bat. Note, I made it for a 64 bit OS and I don't know if it's complete for a 32 bit OS, not that it should matter.
Here is the code.
@echo off
cls
echo Closing OneDrive process.
echo.
taskkill /f /im OneDrive.exe
echo Uninstalling OneDrive.
%SystemRoot%\System32\OneDriveSetup.exe /uninstall
%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
echo.
echo Removing OneDrive leftovers.
rd "%UserProfile%\OneDrive" /s /q
rd "%LocalAppData%\Microsoft\OneDrive" /s /q
rd "%ProgramData%\Microsoft OneDrive" /s /q
rd "C:\OneDriveTemp" /s /q
del "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk" /s /f /q
echo.
echo Removeing OneDrive from the Explorer Side Panel and cleaning the Registry.
REG Delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
REG Delete "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
REG Delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f
REG Delete "HKEY_USERS\S-1-5-19\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f
REG Delete "HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f
:REG ADD "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v System.IsPinnedToNameSpaceTree /d "0" /t REG_DWORD /f
reg add HKLM\Software\Policies\Microsoft\Windows\OneDrive /v DisableFileSyncNGSC /t REG_DWORD /d 1 /f
PING -n 2 127.0.0.1>nul
pause
Couple of questions about it. I am combining about three different peoples scripts to come up with this.
:REG ADD "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v System.IsPinnedToNameSpaceTree /d "0" /t REG_DWORD /f
Is this line needed? I couldn't find much data on what it does specifically. It was added in two of the scripts I found though so I thought it must be semi important.
Here is the cmd prompt output that I got when I ran it.
Clearly I got a few errors because I ran a script on day one already that uninstalled OneDrive.
If I can get some feedback on this, that'd be wonderful!
Attachments
My Computer
System One
-
- OS
- Windows
- CPU
- Intel 8086k
- Motherboard
- Asus z370-F
- Graphics Card(s)
- EVGA 3080 Ti FTW3 Ultra
- Sound Card
- ADI-2 DAC fs