aboutsummaryrefslogtreecommitdiff
path: root/bf4.bat
diff options
context:
space:
mode:
Diffstat (limited to 'bf4.bat')
-rw-r--r--bf4.bat27
1 files changed, 27 insertions, 0 deletions
diff --git a/bf4.bat b/bf4.bat
new file mode 100644
index 0000000..03bc112
--- /dev/null
+++ b/bf4.bat
@@ -0,0 +1,27 @@
+@echo off
+set SERVICE_NAME=bf4
+set DRIVER="%~dp0\bf4.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