diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2022-08-31 01:17:10 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2022-08-31 01:17:10 +0200 |
commit | 7b42d7f3415149005b05b7b5ea14fca6cb01a261 (patch) | |
tree | 0e3ffae3c4bdbe731c199ebff31c3482ace7f722 /driver.bat |
initial commit
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'driver.bat')
-rw-r--r-- | driver.bat | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/driver.bat b/driver.bat new file mode 100644 index 0000000..519d9e8 --- /dev/null +++ b/driver.bat @@ -0,0 +1,27 @@ +@echo off +set SERVICE_NAME=ksocket +set DRIVER="%~dp0\driver.sys" + +net session >nul 2>&1 +if NOT %ERRORLEVEL% EQU 0 ( + echo ERROR: This script requires Administrator privileges! + pause + exit /b 1 +) + +echo --------------------------------------- +echo -- Service Name: %SERVICE_NAME% +echo -- Driver......: %DRIVER% +echo --------------------------------------- + +sc create %SERVICE_NAME% binPath= %DRIVER% type= kernel +echo --------------------------------------- +sc start %SERVICE_NAME% +echo --------------------------------------- +sc query %SERVICE_NAME% +echo [PRESS A KEY TO STOP THE DRIVER] +pause +sc stop %SERVICE_NAME% +sc delete %SERVICE_NAME% +echo Done. +timeout /t 3 |