Found a way to get the hostname.

Not sure if it's ideal, but it works..

Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
This commit is contained in:
Bevan Weiss 2024-06-23 22:50:17 +10:00 коммит произвёл Bob Arnson
Родитель 18bb064b71
Коммит 1580bf87f7
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -16,6 +16,9 @@ for /f "tokens=2 delims=[]" %%a in ('ping -n 1 -4 ""') do set IPAddr=%%a
set "MsVsMonPath=C:\sandbox\Debugger\x64\msvsmon.exe /noauth /anyuser /nosecuritywarn"
)
)
FOR /F "tokens=* USEBACKQ" %%F IN (`powershell -Command "[System.Net.Dns]::GetHostEntry('localhost').HostName"`) DO (
SET "Hostname=%%F"
)
:TestSelect
cls
@ -24,7 +27,7 @@ REM Show the test select menu
REM We start with an entry for the Debugger if available
set index=0
if not "%MsVsMonPath%"=="" (
echo [!index!] Run Remote Debugger [SandboxIP=%IPAddr%]
echo [!index!] Run Remote Debugger [IP=%IPAddr%] [Hostname=%Hostname%]
set "option[!index!]=%MsVsMonPath%"
)