Share via

Completely erradicate One Drive

Anonymous
2024-07-22T07:13:06+00:00

Hey,

I have a new windows 11 laptop. I did not link OneDrive, however I made sure to UN Link it, then uninstall it, then remove all traces of it. then randomly I go to save something and it defaults to the Documents Folder in One Drive under my user folder - which I have deleted several times.

I check in the start menu and in the add/remove programs and One Drive is not there, how do I stop it from recreating the One Drive folder and creating Documents Folder that it wants to use as a default for saving new stuff?

Cheers, Dave,

Windows for home | Windows 11 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2024-07-23T04:53:59+00:00

    Hello, SeaComms

    Welcome to the Microsoft community.

    Thank you for your feedback. Hello, it is possible. But first you need to make sure you are no longer using OneDrive or it will be generated again.

    You can try the following method:

    1.Registry Edits for Folder Paths

    • Objective: Update registry keys to remove OneDrive from default folder paths.
    • Method:
      1. Open the Registry Editor (type regedit in the Run dialog).
      2. Navigate to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders.
      3. Locate keys such as Desktop, Documents, Pictures, etc.
      4. Change paths from %USERPROFILE%\OneDrive\Documents to %USERPROFILE%\Documents.
      5. Restart your PC.
    1. Prevent OneDrive from Starting at Boot
    • Objective: Stop OneDrive from launching automatically.
    • Method:
      1. Open the Registry Editor.
      2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.
      3. Delete the OneDrive entry.
      4. Use Task Manager to kill the OneDrive process or reboot your PC.
    1. Remove OneDrive from File Explorer Sidebar
    • Objective: Clean up the Explorer sidebar by removing the OneDrive link.
    • Method:
      1. Open the Registry Editor.
      2. Navigate to HKEY_CLASSES_ROOT\CLSID{018D5C66-4533-4307-9B53-224DE2ED1FE6}.
      3. Delete the entire key.
      4. For reference, check this **** Microsoft Answer.

    Disclaimer: Generally, modifying registry subkeys or work group is intended for advanced users, administrators, and IT Professionals. It can help fix some problems, however, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For further protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs.

    Permanently Uninstall OneDrive Using a Script

    Disclaimer: Microsoft provides no assurances and/or warranties, implied or otherwise, and is not responsible for the information you receive from the third-party linked sites or any support related to technology. 

    • Objective: Use a script to remove OneDrive completely.
    • Method:
      1. Open Notepad and paste the following script:
      batchCopy 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 pause

    2.Save the file as RemoveOneDrive.bat.

    3.Run the script as an administrator.

    I look forward to your feedback.

    Best Regards,

    Aaron| Microsoft Community Support Specialist

    22 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2024-07-23T06:57:23+00:00

    OMG!!

    Thank you Aaron. I have searched everywhere for this. Why is it so convoluted just to removed One Drive!

    6 people found this answer helpful.
    0 comments No comments