@echo off

color 9
title MAIN Axxon 16-port Driver Installer.


echo.
echo Cleaning out old .inf files and prepping server...
CleanAxxon.exe

echo.
echo Removing existing FTDI devices...
devcon remove OXMF\*PNP0501*
devcon remove PCI\VEN_1415*



echo.
echo Installing Axxon 16-port driver...
devcon dp_add "%CD%\32bit\OxMf.inf"
devcon dp_add "%CD%\32bit\OxSer.inf"
 
:start 
rem cls
echo.
echo.
echo 1.Restart (Recommended)
echo 2.Shutdown
echo 3.Quit
 
:invalid_choice
set /p choice="enter your choice 1,2,3: "
if %choice%==1 goto restart
if %choice%==2 goto shutdown
if %choice%==3 exit
echo invalid choice: %choice%
goto invalid_choice


:restart
cls
shutdown -r -t 15
echo system restart initiated.
set /p cancel="type cancel to stop shutdown "
if %cancel%==cancel shutdown -a
if %cancel%==cancel goto start
 
:shutdown
cls
shutdown -s -t 15
echo shutdown initiated.
set /p cancel="type cancel to stop shutdown "
if %cancel%==cancel shutdown -a
if %cancel%==cancel goto start




