Write-Host "Installing Access Database Engine silently (this may take a minute)..." -ForegroundColor Yellow
catch Write-Host "Download failed: $_" -ForegroundColor Red exit 1 /quiet - no UI, /passive - shows progress (change to /quiet for total silence) $installArgs = "/quiet /norestart" accessdatabaseengine_x64.exe
finally # Cleanup: remove downloaded installer if (Test-Path $tempPath) Remove-Item $tempPath -Force Write-Host "Cleaned up temporary installer." -ForegroundColor Gray accessdatabaseengine_x64.exe
Write-Host "Access Database Engine not found. Starting download..." -ForegroundColor Yellow try $webClient = New-Object System.Net.WebClient $webClient.DownloadFile($downloadUrl, $tempPath) Write-Host "Download completed: $tempPath" -ForegroundColor Green accessdatabaseengine_x64.exe
powershell -ExecutionPolicy Bypass -File "Install-AccessDatabaseEngine.ps1"