From 0c915ed7910f6ab652c3dd1134385222f30bb37e Mon Sep 17 00:00:00 2001 From: Eric Weddington Date: Fri, 21 Feb 2003 18:55:59 +0000 Subject: [PATCH] Windows batch files to work with giveio.sys. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@215 81a1dc3b-b13d-400b-aceb-764788c761c2 --- install_giveio.bat | 34 ++++++++++++++++++++++++++++++++++ remove_giveio.bat | 14 ++++++++++++++ status_giveio.bat | 12 ++++++++++++ 3 files changed, 60 insertions(+) create mode 100755 install_giveio.bat create mode 100755 remove_giveio.bat create mode 100755 status_giveio.bat diff --git a/install_giveio.bat b/install_giveio.bat new file mode 100755 index 00000000..4a02b093 --- /dev/null +++ b/install_giveio.bat @@ -0,0 +1,34 @@ +@set DIRVERNAME=giveio +@set DIRVERFILE=%DIRVERNAME%.sys + +@echo Copying the driver to the windows directory +@echo target file: %WINDIR%\%DIRVERFILE% +@copy %DIRVERFILE% %WINDIR%\%DIRVERFILE% + +@echo Remove a running service if needed... +@loaddrv stop %DIRVERNAME% >NUL +@if errorlevel 2 goto install + +@loaddrv remove %DIRVERNAME% >NUL +@if errorlevel 1 goto install + +:install +@echo Installing Windows NT/2k/XP driver: %DIRVERNAME% + +@loaddrv install %DIRVERNAME% %WINDIR%\%DIRVERFILE% +@if errorlevel 3 goto error + +@loaddrv start %DIRVERNAME% +@if errorlevel 1 goto error + +@loaddrv starttype %DIRVERNAME% auto +@if errorlevel 1 goto error + +@echo Success +@goto exit + +:error +@echo ERROR: Installation of %DIRVERNAME% failed + +:exit + diff --git a/remove_giveio.bat b/remove_giveio.bat new file mode 100755 index 00000000..024427db --- /dev/null +++ b/remove_giveio.bat @@ -0,0 +1,14 @@ +@set DIRVERNAME=giveio + +@loaddrv stop %DIRVERNAME% +@if errorlevel 2 goto error + +@loaddrv remove %DIRVERNAME% +@if errorlevel 1 goto error + +@goto exit + +:error +@echo ERROR: Deinstallation of %DIRVERNAME% failed + +:exit diff --git a/status_giveio.bat b/status_giveio.bat new file mode 100755 index 00000000..bc821474 --- /dev/null +++ b/status_giveio.bat @@ -0,0 +1,12 @@ +@set DIRVERNAME=giveio + +@loaddrv status %DIRVERNAME% +@if errorlevel 1 goto error + +@goto exit + +:error +@echo ERROR: Status querry for %DIRVERNAME% failed + +:exit +