-
Notifications
You must be signed in to change notification settings - Fork 2
/
Disable Gamesdows V3.bat
134 lines (121 loc) · 4.49 KB
/
Disable Gamesdows V3.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
@echo off
SETLOCAL EnableExtensions EnableDelayedExpansion
:: Paths for Steam
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
SET "STEAM_SCRIPT_NAME=DelayedExplorerStart.bat"
SET "STEAM_SCRIPT_PATH=%STEAM_FOLDER%\%STEAM_SCRIPT_NAME%"
SET "STEAM_VBS_NAME=RunBatchSilently.vbs"
SET "STEAM_VBS_PATH=%STEAM_FOLDER%\%STEAM_VBS_NAME%"
SET "STEAM_XML_NAME=DelayedExplorerStartTask.xml"
SET "STEAM_XML_PATH=%STEAM_FOLDER%\%STEAM_XML_NAME%"
:: Paths for Playnite
SET "PLAYNITE_FOLDER=%LOCALAPPDATA%\Playnite"
SET "PLAYNITE_SCRIPT_NAME=DelayedExplorerStart.bat"
SET "PLAYNITE_SCRIPT_PATH=%PLAYNITE_FOLDER%\%PLAYNITE_SCRIPT_NAME%"
SET "PLAYNITE_VBS_NAME=RunBatchSilently.vbs"
SET "PLAYNITE_VBS_PATH=%PLAYNITE_FOLDER%\%PLAYNITE_VBS_NAME%"
SET "PLAYNITE_XML_NAME=DelayedExplorerStartTask.xml"
SET "PLAYNITE_XML_PATH=%PLAYNITE_FOLDER%\%PLAYNITE_XML_NAME%"
echo ================================
echo DISABLING GAMESDOWS / REMOVING CUSTOM SHELL
echo ================================
:: 1) Reset the default shell to Explorer
echo [1/5] Resetting default shell to Explorer...
REG ADD "HKCU\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.
)
:: 2) Delete any existing DelayedExplorerStart.bat in Steam folder
echo [2/5] Deleting DelayedExplorerStart.bat from Steam folder...
IF EXIST "%STEAM_SCRIPT_PATH%" (
DEL /F /Q "%STEAM_SCRIPT_PATH%"
if ERRORLEVEL 1 (
echo [WARNING] Could not delete %STEAM_SCRIPT_NAME%.
) else (
echo [SUCCESS] %STEAM_SCRIPT_NAME% deleted.
)
) else (
echo [INFO] %STEAM_SCRIPT_NAME% does not exist in Steam folder.
)
:: 2b) Delete any existing DelayedExplorerStart.bat in Playnite folder
echo [2b/5] Deleting DelayedExplorerStart.bat from Playnite folder...
IF EXIST "%PLAYNITE_SCRIPT_PATH%" (
DEL /F /Q "%PLAYNITE_SCRIPT_PATH%"
if ERRORLEVEL 1 (
echo [WARNING] Could not delete %PLAYNITE_SCRIPT_NAME%.
) else (
echo [SUCCESS] %PLAYNITE_SCRIPT_NAME% deleted.
)
) else (
echo [INFO] %PLAYNITE_SCRIPT_NAME% does not exist in Playnite folder.
)
:: 3) Delete any existing RunBatchSilently.vbs in Steam folder
echo [3/5] Deleting RunBatchSilently.vbs from Steam folder...
IF EXIST "%STEAM_VBS_PATH%" (
DEL /F /Q "%STEAM_VBS_PATH%"
if ERRORLEVEL 1 (
echo [WARNING] Could not delete %STEAM_VBS_NAME%.
) else (
echo [SUCCESS] %STEAM_VBS_NAME% deleted.
)
) else (
echo [INFO] %STEAM_VBS_NAME% does not exist in Steam folder.
)
:: 3b) Delete any existing RunBatchSilently.vbs in Playnite folder
echo [3b/5] Deleting RunBatchSilently.vbs from Playnite folder...
IF EXIST "%PLAYNITE_VBS_PATH%" (
DEL /F /Q "%PLAYNITE_VBS_PATH%"
if ERRORLEVEL 1 (
echo [WARNING] Could not delete %PLAYNITE_VBS_NAME%.
) else (
echo [SUCCESS] %PLAYNITE_VBS_NAME% deleted.
)
) else (
echo [INFO] %PLAYNITE_VBS_NAME% does not exist in Playnite folder.
)
:: 4) Delete any existing DelayedExplorerStartTask.xml in Steam folder
echo [4/5] Deleting DelayedExplorerStartTask.xml from Steam folder...
IF EXIST "%STEAM_XML_PATH%" (
DEL /F /Q "%STEAM_XML_PATH%"
if ERRORLEVEL 1 (
echo [WARNING] Could not delete %STEAM_XML_NAME%.
) else (
echo [SUCCESS] %STEAM_XML_NAME% deleted.
)
) else (
echo [INFO] %STEAM_XML_NAME% does not exist in Steam folder.
)
:: 4b) Delete any existing DelayedExplorerStartTask.xml in Playnite folder
echo [4b/5] Deleting DelayedExplorerStartTask.xml from Playnite folder...
IF EXIST "%PLAYNITE_XML_PATH%" (
DEL /F /Q "%PLAYNITE_XML_PATH%"
if ERRORLEVEL 1 (
echo [WARNING] Could not delete %PLAYNITE_XML_NAME%.
) else (
echo [SUCCESS] %PLAYNITE_XML_NAME% deleted.
)
) else (
echo [INFO] %PLAYNITE_XML_NAME% does not exist in Playnite folder.
)
:: 5) Delete the scheduled task (if it exists)
echo [5/5] 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 All Playnite/Steam scripts removed.
echo The default shell is now Explorer.
echo A system restart is recommended.
echo ================================
:end
ENDLOCAL
pause