Skip to content

Commit bb53719

Browse files
committed
Version 1.2.1
Verify existence of files before before changing permissions
1 parent df581c9 commit bb53719

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2017-2019 Dāvis Mošenkovs
3+
Copyright (c) 2017-2020 Dāvis Mošenkovs
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Telemetry Kill Script
33
A tool for disabling Windows Telemetry (at least part of it) on Windows
44
7, 8, 8.1 and 10.
55

6-
Version 1.2.0
6+
Version 1.2.1
77

8-
Copyright (c) 2017-2019 Davis Mosenkovs
8+
Copyright (c) 2017-2020 Davis Mosenkovs
99

1010
## Introduction
1111

Telemetry-Kill-Script.cmd

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
@echo off
22
rem Display info and license
33
color f0
4-
echo Telemetry Kill Script 1.2.0
4+
echo Telemetry Kill Script 1.2.1
55
echo A tool for disabling Windows Telemetry (at least part of it).
66
echo https://github.com/DavisNT/Telemetry-Kill-Script
77
echo.
8-
echo Copyright (c) 2017-2019 Davis Mosenkovs
8+
echo Copyright (c) 2017-2020 Davis Mosenkovs
99
echo.
1010
echo Permission is hereby granted, free of charge, to any person obtaining a copy
1111
echo of this software and associated documentation files (the "Software"), to deal
@@ -43,23 +43,23 @@ if errorlevel 1 goto :noadmin
4343
rem Disable Telemetry
4444
set errors=0
4545
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
4747
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
4949
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
5151
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
5353
if errorlevel 1 set errors=1
5454
echo.
5555
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)
5757
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)
5959
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)
6161
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)
6363
if errorlevel 1 set errors=1
6464
echo.
6565
echo Setting diagnostic data level to Security/Basic (lowest possible)...

0 commit comments

Comments
 (0)