|
1 | 1 | @echo off |
2 | 2 | rem Display info and license |
3 | 3 | color f0 |
4 | | -echo Telemetry Kill Script 1.2.0 |
| 4 | +echo Telemetry Kill Script 1.2.1 |
5 | 5 | echo A tool for disabling Windows Telemetry (at least part of it). |
6 | 6 | echo https://github.com/DavisNT/Telemetry-Kill-Script |
7 | 7 | echo. |
8 | | -echo Copyright (c) 2017-2019 Davis Mosenkovs |
| 8 | +echo Copyright (c) 2017-2020 Davis Mosenkovs |
9 | 9 | echo. |
10 | 10 | echo Permission is hereby granted, free of charge, to any person obtaining a copy |
11 | 11 | echo of this software and associated documentation files (the "Software"), to deal |
@@ -43,23 +43,23 @@ if errorlevel 1 goto :noadmin |
43 | 43 | rem Disable Telemetry |
44 | 44 | set errors=0 |
45 | 45 | echo Taking ownership of Telemetry files... |
46 | | -takeown /A /F %SystemRoot%\system32\CompatTelRunner.exe |
| 46 | +if exist %SystemRoot%\system32\CompatTelRunner.exe takeown /A /F %SystemRoot%\system32\CompatTelRunner.exe |
47 | 47 | if errorlevel 1 set errors=1 |
48 | | -takeown /A /F %SystemRoot%\system32\GeneralTel.dll |
| 48 | +if exist %SystemRoot%\system32\GeneralTel.dll takeown /A /F %SystemRoot%\system32\GeneralTel.dll |
49 | 49 | if errorlevel 1 set errors=1 |
50 | | -takeown /A /F %SystemRoot%\system32\CompatTel\*.exe |
| 50 | +if exist %SystemRoot%\system32\CompatTel\*.exe takeown /A /F %SystemRoot%\system32\CompatTel\*.exe |
51 | 51 | if errorlevel 1 set errors=1 |
52 | | -takeown /A /F %SystemRoot%\system32\CompatTel\*.dll |
| 52 | +if exist %SystemRoot%\system32\CompatTel\*.dll takeown /A /F %SystemRoot%\system32\CompatTel\*.dll |
53 | 53 | if errorlevel 1 set errors=1 |
54 | 54 | echo. |
55 | 55 | echo Changing permissions of Telemetry files... |
56 | | -icacls %SystemRoot%\system32\CompatTelRunner.exe /deny *S-1-1-0:(X) |
| 56 | +if exist %SystemRoot%\system32\CompatTelRunner.exe icacls %SystemRoot%\system32\CompatTelRunner.exe /deny *S-1-1-0:(X) |
57 | 57 | if errorlevel 1 set errors=1 |
58 | | -icacls %SystemRoot%\system32\GeneralTel.dll /deny *S-1-1-0:(X) |
| 58 | +if exist %SystemRoot%\system32\GeneralTel.dll icacls %SystemRoot%\system32\GeneralTel.dll /deny *S-1-1-0:(X) |
59 | 59 | if errorlevel 1 set errors=1 |
60 | | -icacls %SystemRoot%\system32\CompatTel\*.exe /deny *S-1-1-0:(X) |
| 60 | +if exist %SystemRoot%\system32\CompatTel\*.exe icacls %SystemRoot%\system32\CompatTel\*.exe /deny *S-1-1-0:(X) |
61 | 61 | if errorlevel 1 set errors=1 |
62 | | -icacls %SystemRoot%\system32\CompatTel\*.dll /deny *S-1-1-0:(X) |
| 62 | +if exist %SystemRoot%\system32\CompatTel\*.dll icacls %SystemRoot%\system32\CompatTel\*.dll /deny *S-1-1-0:(X) |
63 | 63 | if errorlevel 1 set errors=1 |
64 | 64 | echo. |
65 | 65 | echo Setting diagnostic data level to Security/Basic (lowest possible)... |
|
0 commit comments