@if "%1c"=="c" goto usage
@goto install

:usage
@echo.
@echo USAGE: Install [current-working-directory]
@echo The current-working-directory is the full path containing all the
@echo Online Flash Update files, including this command file.
@echo.
@echo Example:
@echo.
@echo         Install C:\OFU\Test
@echo.
@goto error

:install
@set OFU_INSTALL_DIR=%1
@echo.
@echo Installing IMB driver...
@echo.
Win2kinstall %OFU_INSTALL_DIR%\imbdrv.inf *IMBDRV
@if ERRORLEVEL 0 goto flashudinstall
goto error

:flashudinstall
@set OFU_INSTALL_DIR=%1
@echo.
@echo Installing FLASHUD driver...
@echo.
Win2kinstall %OFU_INSTALL_DIR%\flashud.inf *INT0800
@if ERRORLEVEL 2 goto error
@goto done

:done
@echo Done!
@echo.
@echo Successfully installed the Online Flash Update Utility drivers!
@echo PLEASE REBOOT the system in order for the drivers to be loaded.
@echo.
@goto exit

:error
@echo.
@echo @@@@ Error installing the Online Flash Update Utility drivers @@@@
@echo.

:exit


