mirror of
https://github.com/zoicware/RemoveWindowsAI.git
synced 2026-02-27 15:46:50 +01:00
add new store cmdlet to install photos legacy
This commit is contained in:
@@ -2781,22 +2781,30 @@ function install-photoslegacy {
|
|||||||
|
|
||||||
if (!$appx) {
|
if (!$appx) {
|
||||||
|
|
||||||
Remove-Item "$($tempDir)Microsoft.PhotosLegacy_8wekyb3d8bbwe*" -Force -Recurse -ErrorAction SilentlyContinue
|
try {
|
||||||
$downloadedfiles = Download-AppxPackage -PackageFamilyName 'Microsoft.PhotosLegacy_8wekyb3d8bbwe' -outputDir "$tempDir"
|
Get-Command store -ErrorAction Stop
|
||||||
$package = $downloadedfiles | Where-Object { $_ -match '\.appxbundle$' } | Select-Object -First 1
|
#install photos legacy using new store cmdlet
|
||||||
$dependencies = $downloadedfiles | Where-Object { $_ -match '\.appx$' }
|
store install 9NV2L4XVMCXM
|
||||||
if ($package) {
|
}
|
||||||
try {
|
catch {
|
||||||
Add-AppPackage $package -DependencyPath $dependencies -ForceApplicationShutdown
|
Remove-Item "$($tempDir)Microsoft.PhotosLegacy_8wekyb3d8bbwe*" -Force -Recurse -ErrorAction SilentlyContinue
|
||||||
}
|
$downloadedfiles = Download-AppxPackage -PackageFamilyName 'Microsoft.PhotosLegacy_8wekyb3d8bbwe' -outputDir "$tempDir"
|
||||||
catch {
|
$package = $downloadedfiles | Where-Object { $_ -match '\.appxbundle$' } | Select-Object -First 1
|
||||||
Write-status -msg "Can't install PhotosLegacy via appxbundle... make sure you have the appx service enabled" -errorOutput
|
$dependencies = $downloadedfiles | Where-Object { $_ -match '\.appx$' }
|
||||||
}
|
if ($package) {
|
||||||
|
try {
|
||||||
|
Add-AppPackage $package -DependencyPath $dependencies -ForceApplicationShutdown
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-status -msg "Can't install PhotosLegacy via appxbundle... make sure you have the appx service enabled" -errorOutput
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-status -msg "Can't find PhotosLegacy Installer" -errorOutput
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
Write-status -msg "Can't find PhotosLegacy Installer" -errorOutput
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user