📜 ⬆️ ⬇️

Removing embedded Windows 10 applications after a failed Get-AppXPackage command

#include "standard_disclamer.h"

Once, the start menu (or whatever it was instead in Windows 10) stopped opening for me. On the Internet, it is recommended to execute the command in the powershell console opened with administrator rights:

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}

However, as it turned out later, after one of the updates (November -?), By executing such a command, you can open the menu back, but here’s a nuisance - all these applications take the following form:
')
image

“Well, all right, they are not needed anyway, I will delete” - I think. It was not there.

Perform, for example:

Get-AppxPackage *messaging* | Remove-AppxPackage

And we get footcloth:

Remove-AppxPackage : HRESULT: 0x80073CF6, . 0x80070003: AppxManifest.xml. : .

. , [ActivityId] 24a44cdb-6261-0001-eabb-a4246162d101 Get-AppxLog -ActivityID 24a44cdb-6261-0001-eabb-a4246162d101.

1 31:

+ Get-AppxPackage *messaging* | Remove-AppxPackage
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Messa...__8wekyb3d8bbwe:String) [Remove-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand


What to do? Rubbish in the start menu, you must remove it! Reinstall the system - barbarism, everything can be fixed by hand. We look at the log, as recommended in footwoman (copy the command, which is listed in the "NOTE" in the same console):

Get-AppxLog -ActivityID 24a44cdb-6261-0001-eabb-a4246162d101

Among other things, the response will be a line of this type:

0x80070002: C:\ProgramData\Microsoft\Windows\AppRepository\Microsoft.Messaging_1.10.22012.0_neutral_split.language-ru_8wekyb3d8bbwe.xml. : .

Here it is what interests us. The file specified here is called "file 1".

Go to the folder C: \ ProgramData \ Microsoft \ Windows \ (I will not tell you how to configure the display of hidden folders)

But in the folder AppRepository will not let. But this is not a problem, go to the right mouse button above this folder - Properties - Security - Advanced. There, we will most likely be told that it was not possible to determine the owner - in any case, click on change owner - Advanced - Search (this is the one between Columns and Stop) - choose our user - OK - OK - OK.

If after that it does not allow, then where we pressed for “change”, there is a table “Elements of permissions” - there you need to add your user in the same way, with Full Access rights. It is not necessary to change the rights to all investments.

Now back to the "file 1". It will not be in this folder. If it is - this manual does not suit you. No file - let's do it! I say this quite seriously - we create the file that Windows is looking for, because it also searches for it to be deleted. To do this, open any other file from this folder (does not give - we change the owner and / or access rights to it), whose name ends with neutral_split.language-ru_kakietobuvvy.xml, take all the contents, create a new file, paste it there and change a couple of places . In my case, the Microsoft.WindowsCamera_2016.128.10.0_neutral_split.language-ru_8wekyb3d8bbwe.xml file has turned up with the contents:

 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap"><Identity Name="Microsoft.WindowsCamera" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="2016.128.10.0" ResourceId="split.language-ru"/><Properties><ResourcePackage>true</ResourcePackage><DisplayName>ms-resource:///Resources/AppStoreName</DisplayName><PublisherDisplayName>Microsoft Corporation</PublisherDisplayName><Logo>Assets\WindowsIcons\StoreLogo.png</Logo></Properties><Resources><Resource Language="ru-ru"/></Resources><Dependencies><TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.10240.0" MaxVersionTested="10.0.10240.0"/></Dependencies></Package> 

See Name = "Microsoft.WindowsCamera"? Here it should be replaced with Name = "Microsoft.Messaging", or whatever you delete there. See Version = "2016.128.10.0"? Change the value to 1.10.22012.0 (it is in the name of the "file 1").

We save with the name "file 1" in this very folder. I generally pressed with the right button to create a text file and renamed it along with the txt extension, and then inserted the code.

OK! Now we execute the delete command again. Again we get footcloth:

Remove-AppxPackage : HRESULT: 0x80073CF6, .
0x80070003: AppxManifest.xml. : .
.
. , [ActivityId] 24a44cdb-6261-0001-1ec1-a4246162d101 Get-AppxLog -ActivityID 24a44cdb-6261-0001-1ec1-a4246162d101.
:1 :31
+ Get-AppxPackage *messaging* | Remove-AppxPackage
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Messa...__8wekyb3d8bbwe:String) [Remove-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand


And we ask: “Author, why did you force us to do so much, doesn’t anything work?”

I, too, first upset. But the logs came up with very smart people. Therefore, open the logs (again, the line from the notes).

0x80070002: C:\ProgramData\Microsoft\Windows\AppRepository\Microsoft.Messaging_1.10.22012.0_neutral_split.scale-150_8wekyb3d8bbwe.xml. : .

File another! Microsoft.Messaging_1.10.22012.0_neutral_split.scale-150_8wekyb3d8bbwe.xml. Do you know what to do? That's right, let's go to the ill-fated folder and create! We are looking for a similar existing one, in my case it was Microsoft.WindowsStore_2015.7.1.0_neutral_split.scale-125_8wekyb3d8bbwe.xml.

Copy content:

 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap"><Identity Name="Microsoft.WindowsStore" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="2015.7.1.0" ResourceId="split.scale-125"/><Properties><ResourcePackage>true</ResourcePackage><DisplayName>ms-resource:StoreTitle</DisplayName><PublisherDisplayName>Microsoft Corporation</PublisherDisplayName><Logo>Assets\Logo.png</Logo></Properties><Resources><Resource uap:Scale="125"/></Resources><Dependencies><TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10161.0" MaxVersionTested="10.0.10161.0"/></Dependencies></Package> 

Here we are already changing not only the name and version, but also the digit of scale. Although I am not sure that it is necessary, but I changed 125 to 150. And, for the umpteenth time, PS C: \ WINDOWS \ system32> Get-AppxPackage * messaging * | Remove-AppxPackage. And the answer is: PS C: \ WINDOWS \ system32>

Everything, there are no mistakes! And in the start menu now:

image

Do you see? No Messaging, People first line.

In conclusion, I want to say that such manipulations will have to be done with the ALL list of garbage from the “Other” section. But it will not. It will not be so that, perhaps, even return will not work.

PS disclaimer content provided in first comment

Source: https://habr.com/ru/post/276885/


All Articles