-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrust-qz-certificate.ps1
More file actions
51 lines (44 loc) · 1.91 KB
/
trust-qz-certificate.ps1
File metadata and controls
51 lines (44 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Quick QZ Tray Certificate Trust - Run this NOW
# This will permanently trust your certificate in QZ Tray
$ErrorActionPreference = "Stop"
Write-Host ""
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "QZ Tray Certificate Trust Setup" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""
# Create .qz directory
$qzDir = Join-Path $env:USERPROFILE ".qz"
if (-not (Test-Path $qzDir)) {
New-Item -ItemType Directory -Path $qzDir -Force | Out-Null
Write-Host "✓ Created .qz directory" -ForegroundColor Green
}
# Copy certificate
$source = Join-Path $PSScriptRoot "server\public-key.pem"
$dest = Join-Path $qzDir "override.crt"
if (Test-Path $source) {
Copy-Item $source $dest -Force
Write-Host "✓ Certificate copied to: $dest" -ForegroundColor Green
Write-Host ""
Write-Host "Certificate content:" -ForegroundColor Yellow
Get-Content $dest
Write-Host ""
Write-Host "Override certificate created!" -ForegroundColor Green
} else {
Write-Host "ERROR: Cannot find $source" -ForegroundColor Red
Write-Host "Current directory: $PSScriptRoot" -ForegroundColor Yellow
Write-Host "Looking for: $source" -ForegroundColor Yellow
exit 1
}
Write-Host ""
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "IMPORTANT - RESTART QZ TRAY NOW!" -ForegroundColor Yellow
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "1. Right-click QZ Tray icon in system tray" -ForegroundColor White
Write-Host "2. Click Exit" -ForegroundColor White
Write-Host "3. Start QZ Tray again from Start Menu" -ForegroundColor White
Write-Host "4. Reload your browser (Ctrl+Shift+R)" -ForegroundColor White
Write-Host ""
Write-Host "The Untrusted website error will be gone!" -ForegroundColor Green
Write-Host ""
Read-Host "Press Enter to exit"