aboutsummaryrefslogtreecommitdiff
path: root/ddk-template.bat
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2021-04-16 18:26:55 +0200
committerToni Uhlig <matzeton@googlemail.com>2021-04-16 18:26:55 +0200
commit59d9936eb2dafd32c34cae76e50a579a9e46361a (patch)
treefe55a15e6becff2c42faaed4b071f0a3c92c0726 /ddk-template.bat
parenta55bdd92642990dc2559eb8544bd8c6d8dada7bb (diff)
Added Makefile install target and point'n'click batch files.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'ddk-template.bat')
-rwxr-xr-xddk-template.bat27
1 files changed, 27 insertions, 0 deletions
diff --git a/ddk-template.bat b/ddk-template.bat
new file mode 100755
index 0000000..f26461c
--- /dev/null
+++ b/ddk-template.bat
@@ -0,0 +1,27 @@
+@echo off
+set SERVICE_NAME=DDK-Template
+set DRIVER="%~dp0\ddk-template.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