1@set DIRVERNAME=giveio
2@set DIRVERFILE=%DIRVERNAME%.sys
3
4@echo Copying the driver to the windows directory
5@echo target file: %WINDIR%\%DIRVERFILE%
6@copy %DIRVERFILE% %WINDIR%\%DIRVERFILE%
7
8@echo Remove a running service if needed...
9@loaddrv stop %DIRVERNAME% >NUL
10@if errorlevel 2 goto install
11
12@loaddrv remove %DIRVERNAME% >NUL
13@if errorlevel 1 goto install
14
15:install
16@echo Installing Windows NT/2k/XP driver: %DIRVERNAME%
17
18@loaddrv install %DIRVERNAME% %WINDIR%\%DIRVERFILE%
19@if errorlevel 3 goto error
20
21@loaddrv start %DIRVERNAME%
22@if errorlevel 1 goto error
23
24@loaddrv starttype %DIRVERNAME% auto
25@if errorlevel 1 goto error
26
27@echo Success
28@goto exit
29
30:error
31@echo ERROR: Installation of %DIRVERNAME% failed
32
33:exit
34
35