W4RH4WK/Debloat-Windows-10
在 GitHub 查看cannot run remove onedrive "cannot remove item" "access to path denied"
Open
#222 创建于 2019年12月19日
help wanted
描述
I followed all of the steps correctly and am using admin powershell, yet i get this set of errors everytime.
Remove-Item : Cannot remove item C:\WINDOWS\WinSxS\wow64_microsoft-windows-onedrive-setup_31bf3856ad364e35_10.0.18362.1
_none_01f25b79d7a97c4b\OneDriveSetup.exe: Access to the path 'OneDriveSetup.exe' is denied.
At C:\Users\SU\Downloads\Debloat-Windows-10-master\Debloat-Windows-10-master\scripts\remove-onedrive.ps1:61 char:5
+ Remove-Item -Recurse -Force $item.FullName
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (OneDriveSetup.exe:FileInfo) [Remove-Item], UnauthorizedAccessExceptio
n
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
Remove-Item : Cannot remove item
C:\WINDOWS\WinSxS\wow64_microsoft-windows-onedrive-setup_31bf3856ad364e35_10.0.18362.1_none_01f25b79d7a97c4b: The
directory is not empty.
At C:\Users\SU\Downloads\Debloat-Windows-10-master\Debloat-Windows-10-master\scripts\remove-onedrive.ps1:61 char:5
+ Remove-Item -Recurse -Force $item.FullName
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (C:\WINDOWS\WinS...1f25b79d7a97c4b:DirectoryInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand