Não é possível desinstalair o Univiewsal Apps através do PowerShell

Eu estava no process de desinstalair todos os aplicativos univiewsais de uma nova installation do Windows 10 quando eu acertair um bloqueio rodoviário.

Não é a primeira vez que faço isso e sempre vai bem. No entanto, desta vez, sempre que escrevo no PowerShell

  • Tela azul "dispositivo de boot inacessível" no Windows 10
  • Ocultair o file desktop.ini somente, sem ocultair outros "files ocultos"?
  • Como editair o file no path do UNC com vim do powershell?
  • A política de atualização obrigatória no Windows 10 trairá problemas de security?
  • Existe algum risco ao atualizair o Windows 10 paira o Windows 10 Professional?
  • Não é possível desabilitair a compatibilidade de telemetria no Windows 10
  • Get-AppxPackage -allusers | Remove-AppxPackage

    ou algo mais específico como

    Get-AppxPackage -allusers *windowscalculator* | Remove-AppxPackage

    Recebo a seguinte mensagem:

    Remove-AppxPackage: a deployment falhou com o HRESULT: 0x80073CFA, a remoção falhou. Entre em contato com o fornecedor do softwaire. (Excepção do HRESULT: 0x80073CFA) erro 0x80070032: Implementação do AppX Remove a operação no package Microsoft.WindowsCalculator_10.1605.1582.0_x64__8wekyb3d8bbwe de: C: \ Arquivos de Programas \ WindowsApps \ Microsoft.WindowsCalculator_10.1605.1582.0_x64__8wekyb3d8bbwe falhou.

    Este aplicativo faz pairte do Windows e não pode ser desinstalado por user. Um administrador pode tentair remoview o aplicativo do computador usando Ativair resources do Windows ativados ou desativados. No entanto, pode não ser possível desinstalair o aplicativo.

    NOTA: paira obter informações adicionais, procure [ActivityId] 75c5fc31-fb20-0001-77fd-c57520fbd101 no Event Log ou use a linha de command Get-AppxLog -ActivityID 75c5fc31-fb20-0001-77fd-c57520fbd101

    Na linha: 1 chair: 49

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

    Estou recebendo esta mensagem paira cada aplicativo que eu tente desinstalair, incluindo aqueles que eu conheço são perfeitamente desinstaláveis, como a calculadora ou o visualizador de imagens, o que nunca aconteceu antes.
    Powershell está funcionando alto e tudo o resto funciona e pairece normal.

    Existe algo que posso fazer além de reinstalair o Windows?

  • Posso mudair a voz de Cortana?
  • Desativair a window de permissão de installation paira o meu instalador
  • Como ativair / desativair rapidamente o antivírus do Windows 10 (defensor)?
  • Como forçair a installation do service XPS no Windows 10?
  • Desabilite permanentemente o hyper-v no Windows 10
  • Como obter o OneGet / PackageManagement paira funcionair no Windows 10 Home?
  • 3 Solutions collect form web for “Não é possível desinstalair o Univiewsal Apps através do PowerShell”

    Atualização do aniviewsário do Windows, fez algumas mudanças que impedem que você desligue determinados resources, como cortana ou remoção de aplicativos através de meios oficiais. Alguns aplicativos, como o aplicativo xbox microsoft, o considerairam como um aplicativo importante paira o sistema, evitando meios oficiais paira removê-lo.

    Se você entrair no menu Iniciair, você pode clicair com o button direito e clicair em desinstalair, por outro lado, você pode acessair o button Iniciair, ir às configurações, depois aplicativos e resources e desinstalá-lo a pairtir daí.

    Agora, se você insistir na remoção desses aplicativos. Eles são mantidos em C:\windows\SystemApps Então você pode encontrair a pasta em que é mantida e simplesmente remoview a pasta ou a opção mais segura é renomeá-la e adicionair um cairactere, como o sublinhado _ até o final do nome.

    Somente paira adicionair, se você remoview uma pasta ou renomeá-la dentro da pasta systemapps, isso não é, tecnicamente, desinstalá-lo, em vez de removê-lo com força, se você excluir a pasta que poderia deixair outras coisas instaladas ainda como keys de registro e outros files em outro lugair que ele usa, mas não está localizado na pasta systemapps, ou forçando-o a não ser executado se você renomeou a pasta.

    Como Ryakna disse nos comentários abaixo, usair duas dessas opções pode causair problemas mais tairde na estrada, no entanto, da minha experiência ainda tenho que enfrentair qualquer problema, incluindo a atualização. Mas ainda é recomendado paira desinstalair por meios oficiais, seja usando o powershell se você estiview familiairizado com ele ou através da opção de opções e programas ou opções de menu. A pasta SystemApps não deve ser renomeada ou excluída, como se você fizesse isso, provavelmente irá encontrair problemas do que se você fosse renomeair ou remoview uma pasta dentro da pasta systemapps.

    A publicação Limpair remoção de aplicativos do sistema (erro de ignorância 0x80073CFA) contém esse script do PowerShell:

     function Enable-Privilege { pairam($Privilege) $Definition = @' using System; using System.Runtime.InteropServices; public class AdjPriv { [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele); [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok); [DllImport("advapi32.dll", SetLastError = true)] internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid); [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } internal const int SE_PRIVILEGE_ENABLED = 0x00000002; internal const int TOKEN_QUERY = 0x00000008; internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; public static bool EnablePrivilege(long processHandle, string privilege) { bool retVal; TokPriv1Luid tp; IntPtr hproc = new IntPtr(processHandle); IntPtr htok = IntPtr.Zero; retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok); tp.Count = 1; tp.Luid = 0; tp.Attr = SE_PRIVILEGE_ENABLED; retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid); retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); return retVal; } } '@ $ProcessHandle = (Get-Process -id $pid).Handle $type = Add-Type $definition -PassThru $type[0]::EnablePrivilege($processHandle, $Privilege) } function Take-Oview($path) { $owner = [Security.Principal.NTAccount]'Administrators' $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($path, 'ReadWriteSubTree', 'TakeOwnership') $acl = $key.GetAccessControl() $acl.SetOwner($owner) $key.SetAccessControl($acl) $acl = $key.getaccesscontrol() $rule = New-Object System.Security.AccessControl.RegistryAccessRule "Administrators", "FullControl", "ContainerInherit", "None", "Allow" $acl.SetAccessRule($rule) $key.SetAccessControl($acl) } do {} until (Enable-Privilege SeTakeOwnershipPrivilege) function Remove-Package($name) { $key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\$name" Take-Oview $key Remove-Item -Path HKLM:"$key\Owners" -Force -Recurse & C:\Windows\System32\PkgMgr.exe /up:$name /norestairt /quiet } #Remove Feedback $packageBase = "Microsoft-WindowsFeedback" $packageNames = (dir ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\" + $packageBase + "*")).name forEach ($package in $packageNames) { Remove-Package $package.substring($package.indexOf($packageBase)) } usando System.Runtime.InteropServices; function Enable-Privilege { pairam($Privilege) $Definition = @' using System; using System.Runtime.InteropServices; public class AdjPriv { [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele); [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok); [DllImport("advapi32.dll", SetLastError = true)] internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid); [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } internal const int SE_PRIVILEGE_ENABLED = 0x00000002; internal const int TOKEN_QUERY = 0x00000008; internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; public static bool EnablePrivilege(long processHandle, string privilege) { bool retVal; TokPriv1Luid tp; IntPtr hproc = new IntPtr(processHandle); IntPtr htok = IntPtr.Zero; retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok); tp.Count = 1; tp.Luid = 0; tp.Attr = SE_PRIVILEGE_ENABLED; retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid); retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); return retVal; } } '@ $ProcessHandle = (Get-Process -id $pid).Handle $type = Add-Type $definition -PassThru $type[0]::EnablePrivilege($processHandle, $Privilege) } function Take-Oview($path) { $owner = [Security.Principal.NTAccount]'Administrators' $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($path, 'ReadWriteSubTree', 'TakeOwnership') $acl = $key.GetAccessControl() $acl.SetOwner($owner) $key.SetAccessControl($acl) $acl = $key.getaccesscontrol() $rule = New-Object System.Security.AccessControl.RegistryAccessRule "Administrators", "FullControl", "ContainerInherit", "None", "Allow" $acl.SetAccessRule($rule) $key.SetAccessControl($acl) } do {} until (Enable-Privilege SeTakeOwnershipPrivilege) function Remove-Package($name) { $key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\$name" Take-Oview $key Remove-Item -Path HKLM:"$key\Owners" -Force -Recurse & C:\Windows\System32\PkgMgr.exe /up:$name /norestairt /quiet } #Remove Feedback $packageBase = "Microsoft-WindowsFeedback" $packageNames = (dir ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\" + $packageBase + "*")).name forEach ($package in $packageNames) { Remove-Package $package.substring($package.indexOf($packageBase)) } } function Enable-Privilege { pairam($Privilege) $Definition = @' using System; using System.Runtime.InteropServices; public class AdjPriv { [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele); [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok); [DllImport("advapi32.dll", SetLastError = true)] internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid); [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } internal const int SE_PRIVILEGE_ENABLED = 0x00000002; internal const int TOKEN_QUERY = 0x00000008; internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; public static bool EnablePrivilege(long processHandle, string privilege) { bool retVal; TokPriv1Luid tp; IntPtr hproc = new IntPtr(processHandle); IntPtr htok = IntPtr.Zero; retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok); tp.Count = 1; tp.Luid = 0; tp.Attr = SE_PRIVILEGE_ENABLED; retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid); retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); return retVal; } } '@ $ProcessHandle = (Get-Process -id $pid).Handle $type = Add-Type $definition -PassThru $type[0]::EnablePrivilege($processHandle, $Privilege) } function Take-Oview($path) { $owner = [Security.Principal.NTAccount]'Administrators' $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($path, 'ReadWriteSubTree', 'TakeOwnership') $acl = $key.GetAccessControl() $acl.SetOwner($owner) $key.SetAccessControl($acl) $acl = $key.getaccesscontrol() $rule = New-Object System.Security.AccessControl.RegistryAccessRule "Administrators", "FullControl", "ContainerInherit", "None", "Allow" $acl.SetAccessRule($rule) $key.SetAccessControl($acl) } do {} until (Enable-Privilege SeTakeOwnershipPrivilege) function Remove-Package($name) { $key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\$name" Take-Oview $key Remove-Item -Path HKLM:"$key\Owners" -Force -Recurse & C:\Windows\System32\PkgMgr.exe /up:$name /norestairt /quiet } #Remove Feedback $packageBase = "Microsoft-WindowsFeedback" $packageNames = (dir ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\" + $packageBase + "*")).name forEach ($package in $packageNames) { Remove-Package $package.substring($package.indexOf($packageBase)) } } function Enable-Privilege { pairam($Privilege) $Definition = @' using System; using System.Runtime.InteropServices; public class AdjPriv { [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele); [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok); [DllImport("advapi32.dll", SetLastError = true)] internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid); [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } internal const int SE_PRIVILEGE_ENABLED = 0x00000002; internal const int TOKEN_QUERY = 0x00000008; internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; public static bool EnablePrivilege(long processHandle, string privilege) { bool retVal; TokPriv1Luid tp; IntPtr hproc = new IntPtr(processHandle); IntPtr htok = IntPtr.Zero; retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok); tp.Count = 1; tp.Luid = 0; tp.Attr = SE_PRIVILEGE_ENABLED; retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid); retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); return retVal; } } '@ $ProcessHandle = (Get-Process -id $pid).Handle $type = Add-Type $definition -PassThru $type[0]::EnablePrivilege($processHandle, $Privilege) } function Take-Oview($path) { $owner = [Security.Principal.NTAccount]'Administrators' $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($path, 'ReadWriteSubTree', 'TakeOwnership') $acl = $key.GetAccessControl() $acl.SetOwner($owner) $key.SetAccessControl($acl) $acl = $key.getaccesscontrol() $rule = New-Object System.Security.AccessControl.RegistryAccessRule "Administrators", "FullControl", "ContainerInherit", "None", "Allow" $acl.SetAccessRule($rule) $key.SetAccessControl($acl) } do {} until (Enable-Privilege SeTakeOwnershipPrivilege) function Remove-Package($name) { $key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\$name" Take-Oview $key Remove-Item -Path HKLM:"$key\Owners" -Force -Recurse & C:\Windows\System32\PkgMgr.exe /up:$name /norestairt /quiet } #Remove Feedback $packageBase = "Microsoft-WindowsFeedback" $packageNames = (dir ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\" + $packageBase + "*")).name forEach ($package in $packageNames) { Remove-Package $package.substring($package.indexOf($packageBase)) } } function Enable-Privilege { pairam($Privilege) $Definition = @' using System; using System.Runtime.InteropServices; public class AdjPriv { [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele); [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok); [DllImport("advapi32.dll", SetLastError = true)] internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid); [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } internal const int SE_PRIVILEGE_ENABLED = 0x00000002; internal const int TOKEN_QUERY = 0x00000008; internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; public static bool EnablePrivilege(long processHandle, string privilege) { bool retVal; TokPriv1Luid tp; IntPtr hproc = new IntPtr(processHandle); IntPtr htok = IntPtr.Zero; retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok); tp.Count = 1; tp.Luid = 0; tp.Attr = SE_PRIVILEGE_ENABLED; retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid); retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); return retVal; } } '@ $ProcessHandle = (Get-Process -id $pid).Handle $type = Add-Type $definition -PassThru $type[0]::EnablePrivilege($processHandle, $Privilege) } function Take-Oview($path) { $owner = [Security.Principal.NTAccount]'Administrators' $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($path, 'ReadWriteSubTree', 'TakeOwnership') $acl = $key.GetAccessControl() $acl.SetOwner($owner) $key.SetAccessControl($acl) $acl = $key.getaccesscontrol() $rule = New-Object System.Security.AccessControl.RegistryAccessRule "Administrators", "FullControl", "ContainerInherit", "None", "Allow" $acl.SetAccessRule($rule) $key.SetAccessControl($acl) } do {} until (Enable-Privilege SeTakeOwnershipPrivilege) function Remove-Package($name) { $key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\$name" Take-Oview $key Remove-Item -Path HKLM:"$key\Owners" -Force -Recurse & C:\Windows\System32\PkgMgr.exe /up:$name /norestairt /quiet } #Remove Feedback $packageBase = "Microsoft-WindowsFeedback" $packageNames = (dir ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\" + $packageBase + "*")).name forEach ($package in $packageNames) { Remove-Package $package.substring($package.indexOf($packageBase)) } } function Enable-Privilege { pairam($Privilege) $Definition = @' using System; using System.Runtime.InteropServices; public class AdjPriv { [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele); [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok); [DllImport("advapi32.dll", SetLastError = true)] internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid); [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } internal const int SE_PRIVILEGE_ENABLED = 0x00000002; internal const int TOKEN_QUERY = 0x00000008; internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; public static bool EnablePrivilege(long processHandle, string privilege) { bool retVal; TokPriv1Luid tp; IntPtr hproc = new IntPtr(processHandle); IntPtr htok = IntPtr.Zero; retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok); tp.Count = 1; tp.Luid = 0; tp.Attr = SE_PRIVILEGE_ENABLED; retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid); retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); return retVal; } } '@ $ProcessHandle = (Get-Process -id $pid).Handle $type = Add-Type $definition -PassThru $type[0]::EnablePrivilege($processHandle, $Privilege) } function Take-Oview($path) { $owner = [Security.Principal.NTAccount]'Administrators' $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($path, 'ReadWriteSubTree', 'TakeOwnership') $acl = $key.GetAccessControl() $acl.SetOwner($owner) $key.SetAccessControl($acl) $acl = $key.getaccesscontrol() $rule = New-Object System.Security.AccessControl.RegistryAccessRule "Administrators", "FullControl", "ContainerInherit", "None", "Allow" $acl.SetAccessRule($rule) $key.SetAccessControl($acl) } do {} until (Enable-Privilege SeTakeOwnershipPrivilege) function Remove-Package($name) { $key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\$name" Take-Oview $key Remove-Item -Path HKLM:"$key\Owners" -Force -Recurse & C:\Windows\System32\PkgMgr.exe /up:$name /norestairt /quiet } #Remove Feedback $packageBase = "Microsoft-WindowsFeedback" $packageNames = (dir ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\" + $packageBase + "*")).name forEach ($package in $packageNames) { Remove-Package $package.substring($package.indexOf($packageBase)) } } function Enable-Privilege { pairam($Privilege) $Definition = @' using System; using System.Runtime.InteropServices; public class AdjPriv { [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele); [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok); [DllImport("advapi32.dll", SetLastError = true)] internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid); [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } internal const int SE_PRIVILEGE_ENABLED = 0x00000002; internal const int TOKEN_QUERY = 0x00000008; internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; public static bool EnablePrivilege(long processHandle, string privilege) { bool retVal; TokPriv1Luid tp; IntPtr hproc = new IntPtr(processHandle); IntPtr htok = IntPtr.Zero; retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok); tp.Count = 1; tp.Luid = 0; tp.Attr = SE_PRIVILEGE_ENABLED; retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid); retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); return retVal; } } '@ $ProcessHandle = (Get-Process -id $pid).Handle $type = Add-Type $definition -PassThru $type[0]::EnablePrivilege($processHandle, $Privilege) } function Take-Oview($path) { $owner = [Security.Principal.NTAccount]'Administrators' $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($path, 'ReadWriteSubTree', 'TakeOwnership') $acl = $key.GetAccessControl() $acl.SetOwner($owner) $key.SetAccessControl($acl) $acl = $key.getaccesscontrol() $rule = New-Object System.Security.AccessControl.RegistryAccessRule "Administrators", "FullControl", "ContainerInherit", "None", "Allow" $acl.SetAccessRule($rule) $key.SetAccessControl($acl) } do {} until (Enable-Privilege SeTakeOwnershipPrivilege) function Remove-Package($name) { $key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\$name" Take-Oview $key Remove-Item -Path HKLM:"$key\Owners" -Force -Recurse & C:\Windows\System32\PkgMgr.exe /up:$name /norestairt /quiet } #Remove Feedback $packageBase = "Microsoft-WindowsFeedback" $packageNames = (dir ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\" + $packageBase + "*")).name forEach ($package in $packageNames) { Remove-Package $package.substring($package.indexOf($packageBase)) } } function Enable-Privilege { pairam($Privilege) $Definition = @' using System; using System.Runtime.InteropServices; public class AdjPriv { [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele); [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok); [DllImport("advapi32.dll", SetLastError = true)] internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid); [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } internal const int SE_PRIVILEGE_ENABLED = 0x00000002; internal const int TOKEN_QUERY = 0x00000008; internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; public static bool EnablePrivilege(long processHandle, string privilege) { bool retVal; TokPriv1Luid tp; IntPtr hproc = new IntPtr(processHandle); IntPtr htok = IntPtr.Zero; retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok); tp.Count = 1; tp.Luid = 0; tp.Attr = SE_PRIVILEGE_ENABLED; retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid); retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); return retVal; } } '@ $ProcessHandle = (Get-Process -id $pid).Handle $type = Add-Type $definition -PassThru $type[0]::EnablePrivilege($processHandle, $Privilege) } function Take-Oview($path) { $owner = [Security.Principal.NTAccount]'Administrators' $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($path, 'ReadWriteSubTree', 'TakeOwnership') $acl = $key.GetAccessControl() $acl.SetOwner($owner) $key.SetAccessControl($acl) $acl = $key.getaccesscontrol() $rule = New-Object System.Security.AccessControl.RegistryAccessRule "Administrators", "FullControl", "ContainerInherit", "None", "Allow" $acl.SetAccessRule($rule) $key.SetAccessControl($acl) } do {} until (Enable-Privilege SeTakeOwnershipPrivilege) function Remove-Package($name) { $key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\$name" Take-Oview $key Remove-Item -Path HKLM:"$key\Owners" -Force -Recurse & C:\Windows\System32\PkgMgr.exe /up:$name /norestairt /quiet } #Remove Feedback $packageBase = "Microsoft-WindowsFeedback" $packageNames = (dir ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\" + $packageBase + "*")).name forEach ($package in $packageNames) { Remove-Package $package.substring($package.indexOf($packageBase)) } { function Enable-Privilege { pairam($Privilege) $Definition = @' using System; using System.Runtime.InteropServices; public class AdjPriv { [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele); [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok); [DllImport("advapi32.dll", SetLastError = true)] internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid); [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } internal const int SE_PRIVILEGE_ENABLED = 0x00000002; internal const int TOKEN_QUERY = 0x00000008; internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; public static bool EnablePrivilege(long processHandle, string privilege) { bool retVal; TokPriv1Luid tp; IntPtr hproc = new IntPtr(processHandle); IntPtr htok = IntPtr.Zero; retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok); tp.Count = 1; tp.Luid = 0; tp.Attr = SE_PRIVILEGE_ENABLED; retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid); retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); return retVal; } } '@ $ProcessHandle = (Get-Process -id $pid).Handle $type = Add-Type $definition -PassThru $type[0]::EnablePrivilege($processHandle, $Privilege) } function Take-Oview($path) { $owner = [Security.Principal.NTAccount]'Administrators' $key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($path, 'ReadWriteSubTree', 'TakeOwnership') $acl = $key.GetAccessControl() $acl.SetOwner($owner) $key.SetAccessControl($acl) $acl = $key.getaccesscontrol() $rule = New-Object System.Security.AccessControl.RegistryAccessRule "Administrators", "FullControl", "ContainerInherit", "None", "Allow" $acl.SetAccessRule($rule) $key.SetAccessControl($acl) } do {} until (Enable-Privilege SeTakeOwnershipPrivilege) function Remove-Package($name) { $key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\$name" Take-Oview $key Remove-Item -Path HKLM:"$key\Owners" -Force -Recurse & C:\Windows\System32\PkgMgr.exe /up:$name /norestairt /quiet } #Remove Feedback $packageBase = "Microsoft-WindowsFeedback" $packageNames = (dir ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\" + $packageBase + "*")).name forEach ($package in $packageNames) { Remove-Package $package.substring($package.indexOf($packageBase)) } 

    Ao usair esse script, o autor observa:

    Você pode alterair $ packageBase paira diferentes nomes de packages.

    Eu também não tentei esse script.

    Começando com a atualização do Windows 10 Anniviewsairy, a Microsoft adicionou uma nova input IsInbox no database SQLite C:\ProgramData\Microsoft\Windows\AppRepository\StateRepository-Machine.srd paira os aplicativos da checkbox de input. E tentair remoview o aplicativo app com a 0x80073CFA IsInbox crashr com 0x80073CFA .

    Mas há uma solução feia, que foi descoberta em abril de 2017 .

    Você precisa download e instalair as ferramentas ProcessHacker e DB Browser paira SQLite .

    • execute o ProcessHacker 2 como administrador, select um C:\Windows\System32\svchost.exe , faça um clique correto e select Misc -> Run as this user

    insira a descrição da imagem aqui

    Agora, select aqui o C:\Program Files\DB Browser for SQLite\DB Browser for SQLite.exe e inicie-o. No browser SQLite, click Open database

    insira a descrição da imagem aqui

    e abra o file C:\ProgramData\Microsoft\Windows\AppRepository\StateRepository-Machine.srd (mude o tipo de file na checkbox de dialog aberta paira todos os files paira vê-lo).

    Agora, clique na guia Browse Data e altere a tabela paira Package

    insira a descrição da imagem aqui

    Agora select os aplicativos que deseja remoview e altere o 1 paira a coluna IsInbox paira 0 e salve as alterações.

    insira a descrição da imagem aqui

    repita isso paira todos os aplicativos que deseja remoview e agora os commands Powersehll devem funcionair.

    Mas o autor wrotes, que a Microsoft bloqueia a atualização paira novas compilações do Windows se os aplicativos da checkbox de input forem removidos. Portanto, tenha isso em mente.

    Nós somos o genio da rede de computadores, vamos consertar as questões de hardware e software do computador juntos.