Files
training-guides/labs/lib/wbatch/template-begin_base_bat
Roger Luethi c992ae3e21 labs: Automatically download install ISO in Windows
With this patch, the Windows batch scripts attempt to automatically
download the install ISO image (this is already the case on Linux, OS X).

Change-Id: I080b593f2b627801845f18587521ad64d53b3504
2015-04-15 19:28:18 +00:00

38 lines
849 B
Batchfile

ECHO %time% Cleaning up autostart and log directories
DEL /S /Q %AUTODIR%
DEL /S /Q %LOGDIR%
ECHO %time% Looking for %IMGDIR%\%INSTALLFILE%
IF EXIST %IMGDIR%\%INSTALLFILE% goto got_install_iso
ECHO.
ECHO %INSTALLFILE% not found in %IMGDIR%.
ECHO.
ECHO Trying to download the install ISO from
ECHO %ISOURL%
ECHO.
ECHO Expect this to take several minutes or longer, depending on your
ECHO Internet connection.
ECHO.
cscript /nologo downloader.js %ISOURL%
RENAME downloaded.bin %INSTALLFILE%
MOVE %INSTALLFILE% %IMGDIR%
IF EXIST %IMGDIR%\%INSTALLFILE% goto got_install_iso
ECHO.
ECHO %INSTALLFILE% still not found in %IMGDIR%.
ECHO Aborting.
ECHO.
goto :terminate
:got_install_iso
ECHO.
ECHO %time% Found %IMGDIR%\%INSTALLFILE%
ECHO.
ECHO %time% Initialization done. Hit any key to continue.
ECHO.
PAUSE
REM vim: set ai ts=4 sw=4 et ft=dosbatch: