Open GuillaumeHullin opened 1 month ago
PS C:\WINDOWS\system32> Get-AppxPackage *Print3D* | Remove-AppxPackage -allusers
Remove-AppxPackage : Échec de l’appel de procédure distante.
Échec de l’appel de procédure distante.
Au caractère Ligne:1 : 29
+ Get-AppxPackage *Print3D* | Remove-AppxPackage -allusers
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Remove-AppxPackage], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageManager.Comman
ds.RemoveAppxPackageCommand
Heya,
This looks similar to the issue that people encountered a while ago #74. It seems to stem from some kind of bug in Remove-AppxPackage that doesn't exist in Windows 11. I did implement a work-around specifically for Windows 10 that seemed to do the job, but maybe something changed?
I'll see if I can reproduce this issue myself and report back.
There are two more data I can give you: 1- it only happens with systems which are have been used... I tried on a fresh windows 10, it works. 2- I have an other Windows 10 where the Microsoft store package seems to be broken... and the script work fine there.
I found an Windows 10 22H2 with build 19045.4651
... and there it works.
All the other failing are build 19045.4894
.
So I'm guessing the problem is the latest upgrade... maybe reinstalling some components would help?
Thanks again for the additional info, I have some trouble updating my w10 vm's, once I get them up to date I'll test and look for a solution.
@GuillaumeHullin After updating my VM's I am now on 19045.4957
. Uninstalling apps seems to work as expected. Could you see if updating your machines fixes the issue?
I only have access right now to one Win10 but I don't have update available and I'm still at 19045.4894
, how did you update?
I only have access right now to one Win10 but I don't have update available and I'm still at
19045.4894
, how did you update?
It seems to be a relatively new release, maybe it's a gradual roll-out. https://support.microsoft.com/en-us/topic/september-24-2024-kb5043131-os-build-19045-4957-preview-2d4a5c54-ac58-4bdb-8685-57d578650e5f
Back on that problem, I got some Windows 10 with the build 19045.4894
and which had the same problem before and it still persists avec the update... any idea?
Back on that problem, I got some Windows 10 with the build
19045.4894
and which had the same problem before and it still persists avec the update... any idea?
I have been able to reproduce it now on 19045.4894
aswell. It seems to be related to multiple users. Windows 10 seems to have this issue, while Windows 11 doesn't. There seem to be some other reports about this issue on the internet, but no clear reason or solution.
The only workaround that I have found to work is removing the -AllUsers flag from the command. This does however mean the script only uninstalls app for the current user.
But the weird thing is that I have other Windows 10 updated to the same build, and I have no issue running the script. I was thinking maybe comparing some DLLs or other related files that could indicate a difference between the systems but so far I couldn't find anything.
But the weird thing is that I have other Windows 10 updated to the same build, and I have no issue running the script. I was thinking maybe comparing some DLLs or other related files that could indicate a difference between the systems but so far I couldn't find anything.
Do those machines have multiple users?
All of them. At least 2 admin accounts and one users. None of the admin accounts are linked to a Microsoft account. Some users are. No relations there. Some machines are part of a domain. No relations there either.
All of them. At least 2 admin accounts and one users. None of the admin accounts are linked to a Microsoft account. Some users are. No relations there. Some machines are part of a domain. No relations there either.
Interesting, thanks for sharing these observations. Are all these machines on Windows 10?
Yes, all Windows 10. On Windows 11 machines, it works fine.
Yes, all Windows 10. On Windows 11 machines, it works fine.
Just to confirm: Are all Windows 10 machines affected, or do some Windows 10 machines work ok?
From what I can tell so far it seems to be related to Windows 10.
Some Windows 10 machines works okay. I would say 50/50.
@GuillaumeHullin Very weird indeed. I haven't found any solution for the issue so far, I'll update this thread when I do.
I did find out that app removal only seems bugged when using the -AllUsers switch. So I pushed an update that includes a sort of workaround to ensure the apps are atleast uninstalled for the current user.
Some log from my Windows 10 problems. I tried a few different recently and no issues... until this one.
Attempting to remove Clipchamp.Clipchamp...
Unable to remove *Clipchamp.Clipchamp* for all users
à System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
à Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand.RemovePackageForAllUsers(String packageFullName, Boolean& encounteredErrors)
à Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand.ProcessRecord()
à System.Management.Automation.CommandProcessor.ProcessRecord()
Attempting to remove Microsoft.3DBuilder...
I did find out that app removal only seems bugged when using the -AllUsers switch. So I pushed an update that includes a sort of workaround to ensure the apps are atleast uninstalled for the current user.
Yes, I did see that too. Does your script log when uninstalling without the AllUsers switch?
I did find out that app removal only seems bugged when using the -AllUsers switch. So I pushed an update that includes a sort of workaround to ensure the apps are atleast uninstalled for the current user.
Yes, I did see that too. Does your script log when uninstalling without the AllUsers switch?
It does log an error if the uninstall fails for the current user. Looking at the output you shared the uninstall did work for the current user.
I did find out that app removal only seems bugged when using the -AllUsers switch. So I pushed an update that includes a sort of workaround to ensure the apps are atleast uninstalled for the current user.
Yes, I did see that too. Does your script log when uninstalling without the AllUsers switch?
It does log an error if the uninstall fails for the current user. Looking at the output you shared the uninstall did work for the current user.
Where do you see that it did work for the current user 😅 ?
If removal fails for the current user it would show Unable to remove *Clipchamp.Clipchamp* for current user
Admittedly though the current implementation isn't the clearest.
Oh okay. Good to know.
Most of the Windows 10 (around 5-6 this week) I tried to run the debloat script failed to uninstall apps with the following error:
I tried Microsoft updates, sfc, reset Microsoft Store, etc... no luck. Anybody?