Win11Debloat icon indicating copy to clipboard operation
Win11Debloat copied to clipboard

OneDrive is not uninstalled 25H2

Open BigxxRed opened this issue 2 months ago • 3 comments

Checklist

  • [x] I have searched for existing issues/discussions and didn't find any similar ones.
  • [x] I haven't used any other scripts, tools or programs that might have caused this issue.

Windows version

Windows 11 25H2 26200.6584

Script mode/options

Power shell while in Audit Mode

Describe the issue

Thank you for your great tool. I noticed while Running Debloat within Audit Mode the script seems to run fine but have noticed that OneDrive is not removed. Even after a restart OneDrive has to manually be uninstalled with separate script. Quick Access disabling also requires manual steps. When opening file explorer OneDrive is in the Quick Access top portion of file explorer. Is there a way to include disabling of Quick Access??

Steps to reproduce

I have included custom apps list and settings files. New install from untouched Microsoft 25H2 iso. Entered Audit mode installed Microsoft Office ODT without internet connection. ODT configuration file included as well.

configuration.xml

CustomAppsList.txt

SavedSettings.txt

Error output

No response

Additional context

No response

BigxxRed avatar Oct 24 '25 22:10 BigxxRed

Heya,

Thanks for the detailed report. It seems like Windows will actually install OneDrive after the user logs in, even if it's uninstalled in Audit Mode. I'll see if I can find a good way around this.

Edit: I'll also look into disabling the OneDrive entry in Explorer

Raphire avatar Oct 25 '25 15:10 Raphire

Thank you for your time. You are greatly appreciated.

BigxxRed avatar Oct 25 '25 16:10 BigxxRed

script Remove-OneDrive-n-Quick-Access-Folders.txt

I have included what is currently working for me after running your script. perhaps something can help.

BigxxRed avatar Oct 25 '25 16:10 BigxxRed

@BigxxRed As of e66103f. The script will now create a scheduled task the next/first time the user logs in that will uninstall OneDrive. In my testing this seems to work quite consistently.

Are you in the position to test this? If so, make sure to manually download the latest version from the master branch and run that directly.

Raphire avatar Nov 14 '25 23:11 Raphire

I will test today or tomorrow at the very latest. I'll get back to you. Thanks.

BigxxRed avatar Nov 15 '25 14:11 BigxxRed

I will test today or tomorrow at the very latest. I'll get back to you. Thanks.

Thank you, that would be greatly appreciated!

Raphire avatar Nov 15 '25 18:11 Raphire

works well for the links on navigation pane but one drive still lingers at taskbar system tray icons at far right. So it would seem OneDrive is not entirely uninstalled. and persists even after reboot.

On Sat, Nov 15, 2025 at 12:00 PM Jeffrey @.***> wrote:

Raphire left a comment (Raphire/Win11Debloat#366) https://github.com/Raphire/Win11Debloat/issues/366#issuecomment-3536726957

I will test today or tomorrow at the very latest. I'll get back to you. Thanks.

Thank you, that would be greatly appreciated!

— Reply to this email directly, view it on GitHub https://github.com/Raphire/Win11Debloat/issues/366#issuecomment-3536726957, or unsubscribe https://github.com/notifications/unsubscribe-auth/BYSYMVAJVNRNB367UVJW2XT345S5JAVCNFSM6AAAAACKFAPH4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKMZWG4ZDMOJVG4 . You are receiving this because you were mentioned.Message ID: @.***>

BigxxRed avatar Nov 16 '25 02:11 BigxxRed

works well for the links on navigation pane but one drive still lingers at taskbar system tray icons at far right. So it would seem OneDrive is not entirely uninstalled. and persists even after reboot.

Interesting, I'll do some more testing on my end to see if I can reproduce this.

Raphire avatar Nov 16 '25 15:11 Raphire

I have not been able to reproduce this behaviour. Could you check if the OneDrive process is still running in Task Manager? Do you know if file syncing was enabled?

Raphire avatar Nov 20 '25 19:11 Raphire

It seems like Windows will actually install OneDrive after the user logs in

It does. You could disable this behavior instead of creating a scheduled task.

The registry entry for this auto installation on new user is inside the default profile ("C:\Users\Default\NTUSER.DAT").

Path  : "HKEY_USERS\DEFAULT_NTUSER_DAT\Software\Microsoft\Windows\CurrentVersion\Run"
Entry : "OneDriveSetup"
Value : "$env:SystemRoot\System32\OneDriveSetup.exe /thfirstsetup"
Type  : 'String'

I have not been able to reproduce this behaviour.

Maybe the scheduled task is triggered before the OneDriveSetup.exe. I'm not sure but that would explain why it doesn't work for OP.

agadiffe avatar Nov 24 '25 16:11 agadiffe

It seems like Windows will actually install OneDrive after the user logs in

It does. You could disable this behavior instead of creating a scheduled task.

The registry entry for this auto installation on new user is inside the default profile ("C:\Users\Default\NTUSER.DAT").

Path  : "HKEY_USERS\DEFAULT_NTUSER_DAT\Software\Microsoft\Windows\CurrentVersion\Run"
Entry : "OneDriveSetup"
Value : "$env:SystemRoot\System32\OneDriveSetup.exe /thfirstsetup"
Type  : 'String'

I have not been able to reproduce this behaviour.

Maybe the scheduled task is triggered before the OneDriveSetup.exe. I'm not sure but that would explain why it doesn't work for OP.

Thanks for the detailed info, I'll do some testing to see if deleting the key you mentioned is enough to prevent OneDrive from being installed at all.

EDIT: After trying this out, removing the key mentioned above does indeed seem to do the job :D

Raphire avatar Nov 28 '25 11:11 Raphire

This has now been fixed as of release 2025.11.30! The script will now remove the task that installs OneDrive in the first place, and creates a task to remove it via winget for good measure.

Raphire avatar Nov 30 '25 00:11 Raphire