W4RH4WK / Debloat-Windows-10

A Collection of Scripts Which Disable / Remove Windows 10 Features and Apps
Other
6.08k stars 845 forks source link

"remove-default-apps.ps1" does not account for dependenices #188

Open Zamiell opened 5 years ago

Zamiell commented 5 years ago

When running "remove-default-apps.ps1" on a fresh Windows 10 Pro, it fails upon doing a:

Get-AppxPackage Microsoft.Advertising.Xaml | Remove-AppxPackage

This is because several packages depend on this, such as Microsoft.People, microsoft.windowscommunicationsapps, as so forth. So it should be moved to the bottom of the list, or the logic should be expanded to check for dependencies first and uninstall those before uninstall.

W4RH4WK commented 5 years ago

Thanks for the heads up.

When I wrote the scripts initially I did not think about apps depending on each other. I guess it just wasn't a problem at that time. For the time being, I moved Microsoft.Advertising.Xaml to the bottom of the list, maybe this helps with the error.

I'll leave this issue open, marked with help wanted. If anyone wants to add dependency resolving to remove-default-apps.ps1, be my guest :)

4oo4 commented 5 years ago

This would be fun to take a stab at, I wonder if the best way to do it is to use Get-AppxPackageManifest, and then parse that for dependencies?

https://docs.microsoft.com/en-us/powershell/module/appx/get-appxpackagemanifest?view=win10-ps

mmikeww commented 4 years ago

i've just made a note for myself that i might need to run this "remove-default-apps" script multiple times, in case of errors and dependencies