aboutsummaryrefslogtreecommitdiff
path: root/examples/driver-protobuf-c-tcp.bat
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-09-09 16:52:28 +0200
committerToni Uhlig <matzeton@googlemail.com>2022-09-09 16:52:28 +0200
commit38495d423f23b145a4377f87a536db5d2721f814 (patch)
tree61087a4c5e4138873cc4e6e0f9eeb4ac22d617e2 /examples/driver-protobuf-c-tcp.bat
parentccb717ac524bb8a5c49ae92710864d022eebb401 (diff)
Cleaned up repository, moved files where they belong to.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/driver-protobuf-c-tcp.bat')
-rw-r--r--examples/driver-protobuf-c-tcp.bat27
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/driver-protobuf-c-tcp.bat b/examples/driver-protobuf-c-tcp.bat
new file mode 100644
index 0000000..9aa935b
--- /dev/null
+++ b/examples/driver-protobuf-c-tcp.bat
@@ -0,0 +1,27 @@
+@echo off
+set SERVICE_NAME=protobuf-c-tcp
+set DRIVER="%~dp0\driver-protobuf-c-tcp.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