From e1aca3b2825bcea7ce6be1f9ecd1640a42e8622f Mon Sep 17 00:00:00 2001 From: Alexandr Bogomyakov Date: Mon, 1 Dec 2025 01:41:47 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 09aacf1..be91bb4 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,10 @@ Options: -h, --help Print help -V, --version Print version ``` + + +### Install as Windows Task to start automatically +Run this command via PowerShell +``` +powershell -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/house-of-vanity/v2-uri-parser/main/scripts/win-service-installer.ps1 -OutFile $env:TEMP\v2.ps1; & $env:TEMP\v2.ps1" +``` From 6e4a5da563ea018f5678cda57bb299e572b42d1c Mon Sep 17 00:00:00 2001 From: Alexandr Bogomyakov Date: Mon, 1 Dec 2025 01:43:03 +0200 Subject: [PATCH 2/2] Silently continue on Remove-Item errors --- scripts/win-service-installer.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/win-service-installer.ps1 b/scripts/win-service-installer.ps1 index a9146b5..abde8b2 100644 --- a/scripts/win-service-installer.ps1 +++ b/scripts/win-service-installer.ps1 @@ -22,7 +22,7 @@ $v2asset = $v2release.assets | Where-Object { $_.name -eq "v2parser-x86_64-pc-wi $v2zip = "$env:TEMP\v2parser.zip" Invoke-WebRequest -Uri $v2asset.browser_download_url -OutFile $v2zip Expand-Archive -Path $v2zip -DestinationPath $binPath -Force -Remove-Item $v2zip +Remove-Item $v2zip -ErrorAction SilentlyContinue # Download Xray-core $xrayRepo = "XTLS/Xray-core" @@ -31,7 +31,7 @@ $xrayAsset = $xrayRelease.assets | Where-Object { $_.name -eq "Xray-windows-64.z $xrayZip = "$env:TEMP\xray.zip" Invoke-WebRequest -Uri $xrayAsset.browser_download_url -OutFile $xrayZip Expand-Archive -Path $xrayZip -DestinationPath $binPath -Force -Remove-Item $xrayZip +Remove-Item $xrayZip -ErrorAction SilentlyContinue # Request server location $serverLocation = Read-Host "Enter server location (e.g., US-NY, DE-Berlin, JP-Tokyo)"