Skip to content

Commit 575b676

Browse files
committed
Version 1.0.0
Initial version
0 parents  commit 575b676

File tree

3 files changed

+162
-0
lines changed

3 files changed

+162
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Dāvis Mošenkovs
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Telemetry Kill Script
2+
===============
3+
A tool for disabling Windows Telemetry (at least part of it) on Windows
4+
8, 8.1 and 10.
5+
6+
Version 1.0.0
7+
8+
Copyright (c) 2017 Davis Mosenkovs
9+
10+
## Introduction
11+
12+
There already are several instructions available for disabling Telemetry
13+
on Windows.
14+
However this is probably the first easy to use script for this purpose.
15+
16+
Use of this script should be simple enough for average users and this script
17+
can be easily verified by IT professionals (to understand how it works and
18+
ensure there is nothing malicious in it).
19+
20+
## Usage
21+
22+
The script can be downloaded (after reading and accepting `LICENSE`) from
23+
this GitHub repository (e.g. [Releases](https://github.com/DavisNT/Telemetry-Kill-Script/releases)
24+
section). After downloading (and extracting) file `Telemetry-Kill-Script.cmd` it
25+
must be run with Administrator rights (by right clicking on it and selecting
26+
_Run as Administrator_).
27+
28+
Most likely this script will have to be used again each time when Windows Update
29+
updates Telemetry related files and/or service.
30+
31+
## Notices
32+
33+
Permission is hereby granted, free of charge, to any person obtaining a copy
34+
of this software and associated documentation files (the "Software"), to deal
35+
in the Software without restriction, including without limitation the rights
36+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37+
copies of the Software, and to permit persons to whom the Software is
38+
furnished to do so, subject to the following conditions:
39+
40+
The above copyright notice and this permission notice shall be included in all
41+
copies or substantial portions of the Software.
42+
43+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
49+
SOFTWARE.

Telemetry-Kill-Script.cmd

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
@echo off
2+
rem Display info and license
3+
color f0
4+
echo Telemetry Kill Script 1.0.0
5+
echo A tool for disabling Windows Telemetry (at least part of it).
6+
echo https://github.com/DavisNT/Telemetry-Kill-Script
7+
echo.
8+
echo Copyright (c) 2017 Davis Mosenkovs
9+
echo.
10+
echo Permission is hereby granted, free of charge, to any person obtaining a copy
11+
echo of this software and associated documentation files (the "Software"), to deal
12+
echo in the Software without restriction, including without limitation the rights
13+
echo to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
echo copies of the Software, and to permit persons to whom the Software is
15+
echo furnished to do so, subject to the following conditions:
16+
echo.
17+
echo The above copyright notice and this permission notice shall be included in all
18+
echo copies or substantial portions of the Software.
19+
echo.
20+
echo THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21+
echo IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
echo FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23+
echo AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
echo LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25+
echo OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26+
echo SOFTWARE.
27+
echo.
28+
verify other 2>nul
29+
setlocal enableextensions
30+
if errorlevel 1 goto :end
31+
set accepted=
32+
if not "%1"=="/AUTO" if not "%1"=="/auto" set /P accepted=Press enter if you agree or immediately close this window otherwise!
33+
if not "%accepted%"=="" goto :end
34+
echo.
35+
36+
rem Check admin rights
37+
net session >nul 2>nul
38+
if errorlevel 1 goto :noadmin
39+
40+
rem Disable Telemetry
41+
set errors=0
42+
echo Taking ownership of Telemetry files...
43+
takeown /A /F %SystemRoot%\system32\CompatTelRunner.exe
44+
if errorlevel 1 set errors=1
45+
takeown /A /F %SystemRoot%\system32\GeneralTel.dll
46+
if errorlevel 1 set errors=1
47+
echo.
48+
echo Changing permissions of Telemetry files...
49+
icacls %SystemRoot%\system32\CompatTelRunner.exe /deny *S-1-1-0:(X)
50+
if errorlevel 1 set errors=1
51+
icacls %SystemRoot%\system32\GeneralTel.dll /deny *S-1-1-0:(X)
52+
if errorlevel 1 set errors=1
53+
echo.
54+
echo Disabling Telemetry service...
55+
sc config DiagTrack start= disabled
56+
if errorlevel 1 set errors=1
57+
echo.
58+
echo Terminating Telemetry processes...
59+
taskkill /f /im CompatTelRunner*
60+
taskkill /f /im rundll32* /fi "MODULES eq GeneralTel*"
61+
echo.
62+
echo Stopping Telemetry service...
63+
net stop DiagTrack 2>nul
64+
echo.
65+
66+
rem Display results
67+
if "%errors%"=="1" goto :errors
68+
69+
rem Success
70+
color f2
71+
echo Telemetry should be disabled now.
72+
if not "%1"=="/AUTO" if not "%1"=="/auto" pause
73+
74+
goto :end
75+
76+
rem Errors occured
77+
:errors
78+
color fc
79+
echo Error(s) occurred, please review the script output!
80+
if not "%1"=="/AUTO" if not "%1"=="/auto" pause
81+
82+
goto :end
83+
84+
rem Missing admin rights error
85+
:noadmin
86+
color fc
87+
echo This script must be run with Administrator rights.
88+
echo Please right click on the script and select "Run as Administrator"
89+
if not "%1"=="/AUTO" if not "%1"=="/auto" pause
90+
91+
rem For compatibility
92+
:end

0 commit comments

Comments
 (0)