-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindowsFileCorruption.bat
More file actions
56 lines (47 loc) · 1.41 KB
/
Copy pathWindowsFileCorruption.bat
File metadata and controls
56 lines (47 loc) · 1.41 KB
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
@Echo Off
CLS
::Check_Permissions
net session >nul 2>&1
if %errorLevel% == 0 (
Echo ********************************************************
Echo ***** Administrative permissions confirmed *****
) else (
Color 4F
Echo ********************************************************
Echo ***** Failure: Current permissions inadequate *****
Echo ***** You need Administrative permissions *****
Echo ***** for this to work properly *****
Echo ********************************************************
Echo.
Pause
Color 7
)
:: *** Date and Time
Echo.
Set StartTime=%Time:~0,5%
Echo *************************
Echo ***** Starting %StartTime%
DISM /Online /Cleanup-Image /CheckHealth
Set TTime=%Time:~0,5%
Echo ***** Check #1 Done ***** %TTime%
ping -n 10 127.0.0.1 >nul: 2>nul:
DISM /Online /Cleanup-Image /ScanHealth
Set TTime=%Time:~0,5%
Echo ***** Check #2 Done ***** %TTime%
ping -n 10 127.0.0.1 >nul: 2>nul:
DISM /Online /Cleanup-Image /RestoreHealth /Source:repairSource\install.wim
Set TTime=%Time:~0,5%
Echo ***** Check #3 Done ***** %TTime%
ping -n 10 127.0.0.1 >nul: 2>nul:
sfc /scannow
Set TTime=%Time:~0,5%
Echo ***** Check #4 Done *****%TTime%
Echo *************************
:: *** Date and Time
Set StopTime=%Time:~0,5%
Echo.
Echo Start Time %StartTime%
Echo Stop Time %StopTime%
Echo.
Echo Thank you
ping -n 10 127.0.0.1 >nul: 2>nul: