-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRemove CBS.LOG
More file actions
37 lines (29 loc) · 930 Bytes
/
Remove CBS.LOG
File metadata and controls
37 lines (29 loc) · 930 Bytes
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
:: Disable Windows Update and Windows Module Installer services
sc config wuauserv start= disabled
sc config TrustedInstaller start= disabled
:: Stop the services
net stop wuauserv /y
net stop TrustedInstaller /y
:: Kill Windows Module Installer process
taskkill /f /im TrustedInstaller.exe
:: Delete the CBS log folder
set CBS_FOLDER=%windir%\Logs\CBS
if exist "%CBS_FOLDER%" (
rmdir /s /q "%CBS_FOLDER%"
if not exist "%CBS_FOLDER%" (
echo CBS log folder removed successfully.
:: Re-enable Windows Update and Windows Module Installer services
sc config wuauserv start= auto
sc config TrustedInstaller start= auto
:: Start the services
net start wuauserv
net start TrustedInstaller
echo Services re-enabled and started successfully.
) else (
echo Failed to remove CBS log folder.
)
) else (
echo CBS log folder does not exist.
)
endlocal
pause