REM Using "'" as a delimiter, the second token is the name of the VirtualBox
REM Ethernet interface
FOR /F "tokens=2 delims='" %%A IN ('"%VBM%" hostonlyif create') DO SET IFACE=%%A
IF %errorlevel% NEQ 0 GOTO :vbm_error
ECHO SET #IFNAME=%IFACE%
SET #IFNAME=%IFACE%
ECHO SET #IFNAME=%IFACE%>> "%~dp0\iface_config.bat"

ECHO VBoxManage hostonlyif ipconfig "%#IFNAME%" --ip #IFIP --netmask 255.255.255.0
"%VBM%" hostonlyif ipconfig "%#IFNAME%" --ip #IFIP --netmask 255.255.255.0

REM vim: set ai ts=4 sw=4 et ft=dosbatch:
