Sadly, that is not broken. You see Microsoft does not want you removing One Drive, so there is no longer an official uninstaller and there likely never will be. However, thanks for publishing this. I'm sure it will be helpful for others.
For MSFT that's not called an issue, it will be intentionally made so by their design You've posted this in the pre-release era of win 10, at build 9926, is it still actual?
My solution precisely; just don't let it bother me. That "let sleeping dogs lay" sort of thing. And since I never logon with a Microsoft ID, I never think about until I read about it somewhere. Our primary computers are Macs and they have iCloud to contend with. Personally I find OneDrive less "intrusive" than iCloud. At least once OneDrive is silenced, it seems to stay that way. But, as is the usual case ... YMMV.
Code: @echo off cd /d "%~dp0" echo Uninstalling Contact Support... CLS<br> install_wim_tweak.exe /o /l install_wim_tweak.exe /o /c Microsoft-Windows-OneDrive /r install_wim_tweak.exe /h /o /l echo OneDrive should be uninstalled. Please reboot Windows 10. pause This is a proper way to get rid of it. You may need to run the last two lines from the OP post code, to get rid of the shell item on old users.
One good helping hand deserves another. Hope this helps. PHP: :: Automatically check & get admin rights:::::::::::::::::::::::::::::::::::::::::@echo offCLSECHO.ECHO =============================ECHO Running Admin shellECHO =============================:checkPrivilegesNET FILE 1>NUL 2>NULif '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ):getPrivilegesif '%1'=='ELEV' (shift & goto gotPrivileges)ECHO.ECHO **************************************ECHO Invoking UAC for Privilege EscalationECHO **************************************setlocal DisableDelayedExpansionset "batchPath=%~0"setlocal EnableDelayedExpansionECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs""%temp%\OEgetPrivileges.vbs"exit /B:gotPrivileges::::::::::::::::::::::::::::::START::::::::::::::::::::::::::::setlocal & pushd .clsset x86="%SYSTEMROOT%\System32\OneDriveSetup.exe"set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe"echo Closing OneDrive process.echo.taskkill /f /im OneDrive.exe > NUL 2>&1ping 127.0.0.1 -n 5 > NUL 2>&1echo Uninstalling OneDrive.echo.if exist %x64% (%x64% /uninstall) else (%x86% /uninstall)ping 127.0.0.1 -n 5 > NUL 2>&1echo Removing OneDrive leftovers.echo.rd "%USERPROFILE%\OneDrive" /Q /S > NUL 2>&1rd "C:\OneDriveTemp" /Q /S > NUL 2>&1rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S > NUL 2>&1rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S > NUL 2>&1echo Removing OneDrive Link from Navigation Pane in File Explorer...echo.IF NOT EXIST %WINDIR%\SysWOW64\regedit.exe GOTO PLATX86:PLATX64%WINDIR%\Sysnative\Reg.exe DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1%WINDIR%\Sysnative\Reg.exe DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1%WINDIR%\Sysnative\Reg.exe DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A52BBA46-E9E1-435f-B3D9-28DAA648C0F6}" /f > NUL 2>&1%WINDIR%\Sysnative\Reg.exe DELETE "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A52BBA46-E9E1-435f-B3D9-28DAA648C0F6}" /f > NUL 2>&1%WINDIR%\Sysnative\Reg.exe DELETE "HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1%WINDIR%\Sysnative\Reg.exe DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1GOTO PLATDONE:PLATX86REG DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1REG DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A52BBA46-E9E1-435f-B3D9-28DAA648C0F6}" /f > NUL 2>&1REG DELETE "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A52BBA46-E9E1-435f-B3D9-28DAA648C0F6}" /f > NUL 2>&1REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1GOTO PLATDONE:PLATDONEclsecho Done. OneDrive has been uninstalled. Please reboot Windows 10.pause > nul