Implement QVPN Windows client for BlancVPN with resilient VPN service

This commit is contained in:
Курнат Андрей
2026-10-04 15:21:58 +03:00
commit 7e21b78b57
39 changed files with 3550 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
[CmdletBinding()]
param([switch]$RemoveData, [switch]$Silent)
$ErrorActionPreference = 'Stop'
$installRoot = [IO.Path]::GetFullPath((Join-Path $env:ProgramFiles 'QVPN'))
$setup = Join-Path $installRoot 'QVPN-Setup.exe'
if (-not (Test-Path -LiteralPath $setup -PathType Leaf)) { throw 'QVPN installer was not found in Program Files.' }
if ((Get-Item -LiteralPath $installRoot -Force).Attributes -band [IO.FileAttributes]::ReparsePoint) { throw 'The QVPN directory is a reparse point.' }
$arguments = @('--uninstall')
if ($RemoveData) { $arguments += '--remove-data' }
if ($Silent) { $arguments += '--silent' }
$process = Start-Process -FilePath $setup -ArgumentList $arguments -Verb RunAs -WindowStyle Hidden -PassThru -Wait
if ($process.ExitCode -ne 0) { throw "QVPN uninstaller exited with code $($process.ExitCode). Check the setup log in your TEMP folder." }
$deadline = [DateTime]::UtcNow.AddSeconds(90)
while ((Test-Path -LiteralPath $installRoot) -and [DateTime]::UtcNow -lt $deadline) { Start-Sleep -Milliseconds 500 }
if (Test-Path -LiteralPath $installRoot) { throw 'Removal did not finish. Check QVPN-Setup-*.log in your TEMP folder.' }
Write-Host 'QVPN removed.'