-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpvm.bat
More file actions
20 lines (20 loc) · 699 Bytes
/
Copy pathpvm.bat
File metadata and controls
20 lines (20 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
@echo off
:: PVM launcher - reads PVM_HOME from environment, falls back to default
if not defined PVM_HOME set "PVM_HOME=%USERPROFILE%\.pvm"
where pwsh.exe >nul 2>&1
if %errorlevel%==0 (
pwsh.exe -NoProfile -ExecutionPolicy Bypass -File "%PVM_HOME%\bin\pvm.ps1" %*
goto :done
)
where powershell.exe >nul 2>&1
if %errorlevel%==0 (
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%PVM_HOME%\bin\pvm.ps1" %*
goto :done
)
echo ERROR: PowerShell not found.
exit /b 1
:done
:: Refresh PATH from registry (delims= preserves full value including semicolons)
for /f "tokens=2* delims=" %%A in ('reg query "HKCU\Environment" /v PATH 2^>nul ^| findstr REG_') do (
set "PATH=%%B"
)