I uninstalled the recent update KB5066835 and the preview pane now works.
Hope this helps
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Essentially, opening files takes a long time and the preview page allowed to me to check files without opening them, for moving files to/from an appraisal workfile etc. Windows update just broke this. The error message I get is "The file you are attempting to preview could harm your computer. If you trust the file and the source you received it from, open it to view its contents". This pattern is common, Windows update routinely introduces user devastating bugs and efficiency downgrades, and I wish I could permanently remove Windows update functionality from my computer. Is there a fix for this windows preview bug on the horizon?
I uninstalled the recent update KB5066835 and the preview pane now works.
Hope this helps
This fix only works on a per folder basis. If you are working with multiple folders on a given drive is there a way to input a global fix for all folders?
:
Unblock-File -Path "C:\Users\admin\Downloads*.pdf"
then how to preview word file
Write-Host "=====================================================" -ForegroundColor Cyan
Write-Host " Windows 11 PDF Preview Fix Script" -ForegroundColor Cyan
Write-Host "=====================================================" -ForegroundColor Cyan
Write-Host ""
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
Write-Host "ERROR: This script must be run as Administrator!" -ForegroundColor Red
Write-Host "Right-click on PowerShell and select 'Run as Administrator'" -ForegroundColor Yellow
Write-Host ""
Read-Host "Press Enter to exit"
exit
}
Write-Host "Running as Administrator - OK" -ForegroundColor Green
Write-Host ""
Write-Host "[STEP 1] Configuring registry to prevent future file blocking..." -ForegroundColor Yellow
try {
# Create the registry key if it doesn't exist
$regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments"
if (-not (Test-Path $regPath)) {
New-Item -Path $regPath -Force | Out-Null
Write-Host " - Created registry key" -ForegroundColor Green
}
# Set the SaveZoneInformation value
New-ItemProperty -Path $regPath -Name "SaveZoneInformation" -PropertyType DWord -Value 1 -Force | Out-Null
Write-Host " - Set SaveZoneInformation = 1" -ForegroundColor Green
Write-Host " - Future downloads will no longer be blocked!" -ForegroundColor Green
} catch {
Write-Host " - ERROR: Failed to modify registry" -ForegroundColor Red
Write-Host " - $($_.Exception.Message)" -ForegroundColor Red
}
Write-Host ""
Write-Host "[STEP 2] Choose which files to unblock:" -ForegroundColor Yellow
Write-Host ""
Write-Host " 1. Downloads folder only (Quick - Recommended)" -ForegroundColor White
Write-Host " 2. Documents folder only" -ForegroundColor White
Write-Host " 3. Desktop folder only" -ForegroundColor White
Write-Host " 4. All three folders (Downloads, Documents, Desktop)" -ForegroundColor White
Write-Host " 5. Entire C: drive (Slow - may take several minutes)" -ForegroundColor White
Write-Host " 6. Entire D: drive (Slow - may take several minutes)" -ForegroundColor White
Write-Host " 7. Both C: and D: drives (Very slow - may take 10+ minutes)" -ForegroundColor White
Write-Host " 8. Custom folder path" -ForegroundColor White
Write-Host " 9. Skip this step" -ForegroundColor White
Write-Host ""
$choice = Read-Host "Enter your choice (1-9)"
$foldersToUnblock = @()
switch ($choice) {
"1" {
$foldersToUnblock += "$env:USERPROFILE\Downloads"
}
"2" {
$foldersToUnblock += "$env:USERPROFILE\Documents"
}
"3" {
$foldersToUnblock += "$env:USERPROFILE\Desktop"
}
"4" {
$foldersToUnblock += "$env:USERPROFILE\Downloads"
$foldersToUnblock += "$env:USERPROFILE\Documents"
$foldersToUnblock += "$env:USERPROFILE\Desktop"
}
"5" {
$foldersToUnblock += "C:\"
}
"6" {
if (Test-Path "D:\") {
$foldersToUnblock += "D:\"
} else {
Write-Host " - ERROR: D: drive not found" -ForegroundColor Red
}
}
"7" {
$foldersToUnblock += "C:\"
if (Test-Path "D:\") {
$foldersToUnblock += "D:\"
} else {
Write-Host " - WARNING: D: drive not found, will only scan C:" -ForegroundColor Yellow
}
}
"8" {
$customPath = Read-Host "Enter the full path to the folder (e.g., D:\MyFolder)"
if (Test-Path $customPath) {
$foldersToUnblock += $customPath
} else {
Write-Host " - ERROR: Path not found: $customPath" -ForegroundColor Red
}
}
"9" {
Write-Host " - Skipping file unblocking" -ForegroundColor Yellow
}
default {
Write-Host " - Invalid choice. Skipping file unblocking." -ForegroundColor Red
}
}
Write-Host ""
foreach ($folder in $foldersToUnblock) {
Write-Host " - Unblocking files in: $folder" -ForegroundColor Cyan
try {
$files = Get-ChildItem -Path $folder -Recurse -ErrorAction SilentlyContinue
$totalFiles = $files.Count
$unblocked = 0
Write-Host " Found $totalFiles files to check..." -ForegroundColor White
foreach ($file in $files) {
try {
Unblock-File -Path $file.FullName -ErrorAction SilentlyContinue
$unblocked++
} catch {
# Silently continue on errors (files in use, permission issues, etc.)
}
}
Write-Host " Processed $unblocked files successfully!" -ForegroundColor Green
} catch {
Write-Host " ERROR: $($_.Exception.Message)" -ForegroundColor Red
}
}
Write-Host ""
Write-Host "[STEP 3] Restart Windows Explorer to apply changes?" -ForegroundColor Yellow
$restart = Read-Host "Restart Explorer now? (Y/N)"
if ($restart -eq "Y" -or $restart -eq "y") {
Write-Host " - Restarting Windows Explorer..." -ForegroundColor Cyan
Stop-Process -Name explorer -Force
Start-Sleep -Seconds 2
Start-Process explorer
Write-Host " - Windows Explorer restarted!" -ForegroundColor Green
} else {
Write-Host " - Skipped. Please restart Explorer manually or reboot your PC." -ForegroundColor Yellow
}
Write-Host ""
Write-Host "=====================================================" -ForegroundColor Cyan
Write-Host " Script completed!" -ForegroundColor Green
Write-Host "=====================================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "What was done:" -ForegroundColor White
Write-Host " ✓ Registry updated to prevent future file blocking" -ForegroundColor Green
Write-Host " ✓ Existing files unblocked (if selected)" -ForegroundColor Green
Write-Host ""
Write-Host "If you still see the preview warning:" -ForegroundColor Yellow
Write-Host " 1. Restart your computer" -ForegroundColor White
Write-Host " 2. Or consider uninstalling update KB5066835:" -ForegroundColor White
Write-Host " Settings > Windows Update > Update History > Uninstall Updates" -ForegroundColor White
Write-Host ""
Read-Host "Press Enter to exit"