-
Notifications
You must be signed in to change notification settings - Fork 2
/
Disable Gamesdows V2.bat
89 lines (79 loc) · 2.58 KB
/
Disable Gamesdows V2.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
@echo off
SETLOCAL EnableExtensions EnableDelayedExpansion
:: Define paths and names
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%"
SET "VBS_NAME=RunBatchSilently.vbs"
SET "VBS_PATH=%STEAM_FOLDER%\%VBS_NAME%"
SET "XML_NAME=DelayedExplorerStartTask.xml"
SET "XML_PATH=%STEAM_FOLDER%\%XML_NAME%"
echo ================================
echo Disabling GamesDows
echo ================================
:: Reset the default shell to Explorer
echo [1/5] Resetting default shell to Explorer...
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "C:\Windows\explorer.exe" /f
if ERRORLEVEL 1 (
echo [ERROR] Failed to reset the default shell.
goto end
) else (
echo [SUCCESS] Default shell reset to Explorer.
)
:: Terminate Steam processes to ensure changes take effect
echo [2/5] Terminating Steam processes...
taskkill /IM "Steam.exe" /F >nul 2>&1
taskkill /IM "SteamService.exe" /F >nul 2>&1
echo [INFO] Steam processes terminated.
:: Delete the DelayedExplorerStart.bat script
echo [3/5] Deleting DelayedExplorerStart.bat...
IF EXIST "%SCRIPT_PATH%" (
DEL /F /Q "%SCRIPT_PATH%"
if ERRORLEVEL 1 (
echo [WARNING] Could not delete %SCRIPT_NAME%.
) else (
echo [SUCCESS] %SCRIPT_NAME% deleted.
)
) else (
echo [INFO] %SCRIPT_NAME% does not exist.
)
:: Delete the RunBatchSilently.vbs script
echo [4/5] Deleting RunBatchSilently.vbs...
IF EXIST "%VBS_PATH%" (
DEL /F /Q "%VBS_PATH%"
if ERRORLEVEL 1 (
echo [WARNING] Could not delete %VBS_NAME%.
) else (
echo [SUCCESS] %VBS_NAME% deleted.
)
) else (
echo [INFO] %VBS_NAME% does not exist.
)
:: Delete the DelayedExplorerStartTask.xml file
echo [5/5] Deleting DelayedExplorerStartTask.xml...
IF EXIST "%XML_PATH%" (
DEL /F /Q "%XML_PATH%"
if ERRORLEVEL 1 (
echo [WARNING] Could not delete %XML_NAME%.
) else (
echo [SUCCESS] %XML_NAME% deleted.
)
) else (
echo [INFO] %XML_NAME% does not exist.
)
:: Delete the scheduled task
echo [6/6] Deleting scheduled task 'RunDelayedExplorerStart'...
schtasks /delete /tn "RunDelayedExplorerStart" /f >nul 2>&1
if ERRORLEVEL 1 (
echo [WARNING] Could not delete the scheduled task 'RunDelayedExplorerStart'.
) else (
echo [SUCCESS] Scheduled task 'RunDelayedExplorerStart' deleted.
)
echo.
echo ================================
echo GamesDows has been disabled successfully.
echo A system restart is recommended for all changes to take effect.
echo ================================
:end
ENDLOCAL
pause