|
<# :
@powershell -ex bypass -c "icm ([scriptblock]::Create((gc '%~f0' -Raw -Encoding UTF8)))"
exit
#>
function 显示($a ) { Write-Host -ForegroundColor White ($a ) }
function 等待毫秒($a) { Start-Sleep -Milliseconds $a }
function 退出($a) { Start-Sleep -Milliseconds $a; exit }
function E取运行目录() {$a =(gi .).FullName; return $a}
$类型 = @('*.appx', '*.EAppx', '*.AppxBundle', '*.msix', '*.Msixbundle', '*.BlockMap')
foreach ($安装类型 in $类型) {
$files = Get-Childitem -Recurse -Include $安装类型
foreach ($file in $files) {
Write-Host -ForegroundColor Red ($file.pspath ) #计算时间差
$ff = Dism -Online /Add-ProvisionedAppxPackage /PackagePath:$file /SkipLicense /Region:"all"
}
}
显示('安装appx完成')
退出(18000)
|
|