Win11Debloat icon indicating copy to clipboard operation
Win11Debloat copied to clipboard

Possible Issues with Powershell if installed from MS Store

Open bdwakefield opened this issue 1 year ago • 1 comments

Describe the bug There are two things that I noticed while removing/uninstalling apps with this tool when PowerShell was installed from the MS Store.

  1. Getting the list of installed apps from win-get takes a little longer than the 10s timeout (or some other issues occurs causing it to not return correctly thus getting the error message "unable to load list of installed apps".

  2. Get-AppxProvisionedPackage -Online results in this error: Get-AppxProvisionedPackage: Class not registered from line 371

To Reproduce Execute the script and try to remove some apps using the dialog.

Additional context I don't think there is anything to "fix" on this one -- except maybe provide some info in the documentation? I don't think the script itself can fix this as it is most likely due to the way MS Store apps are sandboxed -- this behavior is seen elsewhere and is not specific to this script.

When I removed PowerShell and installed via WinGet directly; everything worked as expected.

winget install --id Microsoft.Powershell --source winget

bdwakefield avatar Jul 08 '24 14:07 bdwakefield

Heya!

This is an interesting one. I think your hypothesis that this is probably due to MS store sandboxing may be correct,

I'll do some playing around with this myself, perhaps the script can detect this somehow and display a warning to gracefully handle this situation.

Raphire avatar Jul 08 '24 19:07 Raphire

As we suspected it is indeed something related to the MS Store version of Powershell being sandboxed: https://github.com/PowerShell/PowerShell/issues/17232

I haven't been able to find a way to detect this issue. And I frankly don't think it's worth the time to continue looking, so I'm closing the issue.

Raphire avatar Aug 15 '24 23:08 Raphire