Added win install script

This commit is contained in:
AB
2025-12-01 01:37:53 +02:00
parent 4fcffd57ca
commit 113c8254ab

View File

@@ -3,10 +3,11 @@ $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIden
if (-not $isAdmin) {
Write-Host "Administrator rights required. Restarting..." -ForegroundColor Yellow
# Save script to temp file
$tempScript = "$env:TEMP\v2proxy-installer.ps1"
$MyInvocation.MyCommand.ScriptContents | Out-File -FilePath $tempScript -Encoding UTF8
Start-Process powershell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -NoExit -File `"$tempScript`""
$scriptPath = $MyInvocation.MyCommand.Path
if ([string]::IsNullOrEmpty($scriptPath)) {
$scriptPath = "$env:TEMP\v2proxy-installer.ps1"
}
Start-Process powershell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -NoExit -File `"$scriptPath`""
exit
}