-
Notifications
You must be signed in to change notification settings - Fork 0
/
Remove_Razor_GameManager_Service.bat
65 lines (58 loc) · 1.88 KB
/
Remove_Razor_GameManager_Service.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@Echo off
ECHO Removing Game Manager Service dependency from Registry...
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Razer Synapse Service" /v DependOnService /f
IF ERRORLEVEL 1 (
ECHO No Admin priviledges...
ECHO Please right-click this file and select "Run as administrator".
ECHO.
pause
exit
)
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Razer Synapse Service" /v DependOnService /t Reg_Sz /d RzActionSvc /f
ECHO.
sc query "Razer Synapse Service" | find "RUNNING" > NUL
IF %ERRORLEVEL% NEQ 1 (
ECHO Stopping "Razer Synapse Service"...
sc stop "Razer Synapse Service" > NUL
)
sc query "Razer Game Manager Service" | find "RUNNING" > NUL
IF %ERRORLEVEL% NEQ 1 (
ECHO Stopping "Razer Game Manager Service"...
sc stop "Razer Game Manager Service" > NUL
)
sc query "RzActionSvc" | find "RUNNING" > NUL
IF %ERRORLEVEL% NEQ 1 (
ECHO Stopping "Razer Action Service"...
sc stop "RzActionSvc" > NUL
)
sc config "RzActionSvc" start=demand > NUL
sc config "Razer Synapse Service" depend=RzActionSvc > NUL
sc config "Razer Synapse Service" start=auto > NUL
ECHO Disabling "Razer Game Manager Service"...
sc config "Razer Game Manager Service" start=disabled > NUL
:CHECK_RZ_SERVICE_PENDING
sc query "RzActionSvc" | find "PENDING" > NUL
IF %ERRORLEVEL% NEQ 1 (
ECHO Waiting for "Razer Action Service" to stop...
TIMEOUT /t 4 /NOBREAK
ECHO.
GOTO CHECK_RZ_SERVICE_PENDING
)
sc start "RzActionSvc" > NUL
ECHO Starting "Razer Action Service"...
:CHECK_RZ_SERVICE
sc query "RzActionSvc" | find "RUNNING" > NUL
IF %ERRORLEVEL% NEQ 0 (
ECHO "Razer Action Service" is not running yet, waiting...
TIMEOUT /t 10 /NOBREAK
ECHO.
GOTO CHECK_RZ_SERVICE
) ELSE (
ECHO "Razer Action Service" is now running.
)
sc start "Razer Synapse Service" > NUL
ECHO "Razer Synapse Service" started.
ECHO.
ECHO All done!
ECHO.
pause