mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2025-12-16 06:57:52 +00:00
Added win install script
This commit is contained in:
@@ -3,10 +3,11 @@ $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIden
|
|||||||
|
|
||||||
if (-not $isAdmin) {
|
if (-not $isAdmin) {
|
||||||
Write-Host "Administrator rights required. Restarting..." -ForegroundColor Yellow
|
Write-Host "Administrator rights required. Restarting..." -ForegroundColor Yellow
|
||||||
# Save script to temp file
|
$scriptPath = $MyInvocation.MyCommand.Path
|
||||||
$tempScript = "$env:TEMP\v2proxy-installer.ps1"
|
if ([string]::IsNullOrEmpty($scriptPath)) {
|
||||||
$MyInvocation.MyCommand.ScriptContents | Out-File -FilePath $tempScript -Encoding UTF8
|
$scriptPath = "$env:TEMP\v2proxy-installer.ps1"
|
||||||
Start-Process powershell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -NoExit -File `"$tempScript`""
|
}
|
||||||
|
Start-Process powershell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -NoExit -File `"$scriptPath`""
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user