Snipping tool not saving

Snipping tool not saving?

Run the following in Windows Powershell (ISE) as admin. Simply copy and paste the code below and press Enter on your keyboard

$urls = @(
    "http://tlu.dl.delivery.mp.microsoft.com",
    "http://tlu.dl.delivery.mp.microsoft.com",
    "http://tlu.dl.delivery.mp.microsoft.com",
    "http://tlu.dl.delivery.mp.microsoft.com"
)

$tempDir = "$env:TEMP\MSStoreUpdates"
if (!(Test-Path $tempDir)) { New-Item -ItemType Directory -Path $tempDir | Out-Null }

$dependencyFiles = @()
$screenSketchFile = $null

foreach ($url in $urls) {
    $fileName = $url.Split('/')[-1] + ".appxbundle"
    $filePath = Join-Path $tempDir $fileName
    
    Write-Host "Downloading: $fileName..." -ForegroundColor Cyan
    Invoke-WebRequest -Uri $url -OutFile $filePath

    $packageInfo = Get-AppxPackageManifest -PackagePath $filePath
    if ($packageInfo.Package.Identity.Name -like "*ScreenSketch*") {
        $screenSketchFile = $filePath
    } else {
        $dependencyFiles += $filePath
    }
}

foreach ($file in $dependencyFiles) {
    Write-Host "Installing Dependency: $(Split-Path $file -Leaf)..." -ForegroundColor Green
    Add-AppxPackage -Path $file -ErrorAction Continue
}

if ($screenSketchFile) {
    Write-Host "Installing Final Package: $(Split-Path $screenSketchFile -Leaf)..." -ForegroundColor Magenta
    Add-AppxPackage -Path $screenSketchFile
} else {
    Write-Warning "Microsoft.ScreenSketch package was not found among the provided URLs."
}

Write-Host "Installation sequence complete." -ForegroundColor Yellow

Last updated