windows 10 重新安装 默认软件

Posted bearcarl

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了windows 10 重新安装 默认软件相关的知识,希望对你有一定的参考价值。

1 管理员权限打开powershell

2 输入 Set-ExecutionPolicy Unrestricted 出现选项,输入Y

3 将下列代码粘贴输入:

# Get all the provisioned packages
$Packages = (get-item HKLM:\Software\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Applications) | Get-ChildItem

# Filter the list if provided a filter
$PackageFilter = $args[0]
if ([string]::IsNullOrEmpty($PackageFilter))
{
    echo "No filter specified, attempting to re-register all provisioned apps."
}
else
{
    $Packages = $Packages | where {$_.Name -like $PackageFilter} 

    if ($Packages -eq $null)
    {
        echo "No provisioned apps match the specified filter."
        exit
    }
    else
    {
        echo "Registering the provisioned apps that match $PackageFilter"
    }
}

ForEach($Package in $Packages)
{
    # get package name & path
    $PackageName = $Package | Get-ItemProperty | Select-Object -ExpandProperty PSChildName
    $PackagePath = [System.Environment]::ExpandEnvironmentVariables(($Package | Get-ItemProperty | Select-Object -ExpandProperty Path))

    # register the package    
    echo "Attempting to register package: $PackageName"

    Add-AppxPackage -register $PackagePath -DisableDevelopmentMode
}

 

以上是关于windows 10 重新安装 默认软件的主要内容,如果未能解决你的问题,请参考以下文章

windows 10 wps缺少dll文件

MYSQL重新安装需要修改密码

win10安装软件怎么设置路径

Windows 10瘦身

win10安装软件时怎么更改安装路径

ubuntu+Windows10双系统安装后卸载ubuntu重新安装grub报错修复