21 lines
562 B
Batchfile
21 lines
562 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
net session >nul 2>&1
|
|
if not "%errorlevel%"=="0" (
|
|
echo Requesting Administrator privileges...
|
|
powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -ArgumentList '%*' -Verb RunAs"
|
|
exit /b %errorlevel%
|
|
)
|
|
|
|
set SCRIPT_DIR=%~dp0
|
|
set WSL_IP=%~1
|
|
|
|
if "%WSL_IP%"=="" (
|
|
powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%setup_windows_all_portproxies.ps1"
|
|
) else (
|
|
powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%setup_windows_all_portproxies.ps1" -WslIp %WSL_IP%
|
|
)
|
|
|
|
endlocal
|