BaSs_HaXoR

win10privacyfix.au3

Jun 21st, 2018
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 14.40 KB | None | 0 0
  1. ; FIRST DOWNLOAD AND INSTALL: https://www.autoitscript.com/site/autoit/downloads/
  2. ; THEN RUN SCRIPT:
  3.  
  4. #include <ButtonConstants.au3>
  5. #include <GUIConstantsEx.au3>
  6. #include <StaticConstants.au3>
  7. #include <WindowsConstants.au3>
  8. #Region ### START Koda GUI section ### Form=c:\users\yourname_here\documents\github\win10privacyfix\win10privacyfix.kxf
  9. $win10privacyfix = GUICreate("win10privacyfix - v0.3", 534, 458, 185, 131)
  10. $Gservices = GUICtrlCreateGroup("Services", 16, 56, 225, 113)
  11. $Cservice1 = GUICtrlCreateCheckbox("DiagTrack Service State...", 24, 72, 153, 17)
  12. GUICtrlSetState(-1, $GUI_DISABLE)
  13. $Cservice2 = GUICtrlCreateCheckbox("DiagTrack Service State...", 24, 89, 153, 17)
  14. GUICtrlSetState(-1, $GUI_DISABLE)
  15. $Cservice4 = GUICtrlCreateCheckbox("dmwappushservice Service State...", 24, 124, 209, 17)
  16. GUICtrlSetState(-1, $GUI_DISABLE)
  17. $Cservice3 = GUICtrlCreateCheckbox("dmwappushservice Service State...", 24, 106, 209, 17)
  18. GUICtrlSetState(-1, $GUI_DISABLE)
  19. $Bfixservice = GUICtrlCreateButton("fix", 208, 144, 25, 17)
  20. GUICtrlSetState(-1, $GUI_DISABLE)
  21. GUICtrlCreateGroup("", -99, -99, 1, 1)
  22. $Bcheck = GUICtrlCreateButton("check", 16, 8, 81, 41)
  23. $Bblog = GUICtrlCreateButton("my blog", 112, 8, 81, 17)
  24. $Breddit = GUICtrlCreateButton("reddit thread", 112, 32, 81, 17)
  25. $Group2 = GUICtrlCreateGroup("Mircosoft Telemetry and Feedback", 16, 176, 225, 121)
  26. $Bfixfeedback = GUICtrlCreateButton("fix", 208, 216, 25, 17)
  27. GUICtrlSetState(-1, $GUI_DISABLE)
  28. $Cfeedback = GUICtrlCreateCheckbox("Checking Feedback frequency", 24, 196, 177, 17)
  29. GUICtrlSetState(-1, $GUI_DISABLE)
  30. $Ctelem = GUICtrlCreateCheckbox("Checking Mircosoft Telemetry Hosts...", 24, 244, 209, 17)
  31. GUICtrlSetState(-1, $GUI_DISABLE)
  32. $Bfixtele = GUICtrlCreateButton("fix", 206, 266, 25, 17)
  33. GUICtrlSetState(-1, $GUI_DISABLE)
  34. GUICtrlCreateGroup("", -99, -99, 1, 1)
  35. $Group3 = GUICtrlCreateGroup("other stuff ... todo", 248, 336, 281, 113)
  36. $Coldwindir = GUICtrlCreateCheckbox("no windows.old dir ", 256, 360, 193, 17)
  37. GUICtrlSetState(-1, $GUI_DISABLE)
  38. $Bfixwindir = GUICtrlCreateButton("fix", 496, 360, 25, 17)
  39. GUICtrlSetState(-1, $GUI_DISABLE)
  40. $Checkbox8 = GUICtrlCreateCheckbox("Windows Update Serivce is active", 256, 376, 193, 17)
  41. GUICtrlSetState(-1, $GUI_DISABLE)
  42. $Button3 = GUICtrlCreateButton("start", 456, 376, 33, 17)
  43. GUICtrlSetState(-1, $GUI_DISABLE)
  44. $Button4 = GUICtrlCreateButton("stop", 488, 376, 33, 17)
  45. GUICtrlSetState(-1, $GUI_DISABLE)
  46. $Checkbox9 = GUICtrlCreateCheckbox("Windows Update P2P Service active", 256, 392, 201, 17)
  47. GUICtrlSetState(-1, $GUI_DISABLE)
  48. $Button5 = GUICtrlCreateButton("fix", 496, 392, 25, 17)
  49. GUICtrlSetState(-1, $GUI_DISABLE)
  50. $Checkbox11 = GUICtrlCreateCheckbox("Windows Defender Cloud Protection", 256, 408, 233, 17)
  51. GUICtrlSetState(-1, $GUI_DISABLE)
  52. $Button6 = GUICtrlCreateButton("fix", 496, 408, 25, 17)
  53. GUICtrlSetState(-1, $GUI_DISABLE)
  54. $Checkbox12 = GUICtrlCreateCheckbox("Windows Defender Sample submission", 256, 424, 233, 17)
  55. GUICtrlSetState(-1, $GUI_DISABLE)
  56. $Button7 = GUICtrlCreateButton("fix", 496, 424, 25, 17)
  57. GUICtrlSetState(-1, $GUI_DISABLE)
  58. GUICtrlCreateGroup("", -99, -99, 1, 1)
  59. $Group1 = GUICtrlCreateGroup("Windows 10 Apps ... todo", 248, 144, 281, 185)
  60. $Checkbox1 = GUICtrlCreateCheckbox("... to Location", 256, 168, 129, 17)
  61. GUICtrlSetState(-1, $GUI_DISABLE)
  62. $Checkbox2 = GUICtrlCreateCheckbox("... to Camera ", 256, 184, 121, 17)
  63. GUICtrlSetState(-1, $GUI_DISABLE)
  64. $Checkbox3 = GUICtrlCreateCheckbox("... to Microphone", 256, 200, 145, 17)
  65. GUICtrlSetState(-1, $GUI_DISABLE)
  66. $Checkbox4 = GUICtrlCreateCheckbox("... to Name, picture and more", 256, 216, 153, 17)
  67. GUICtrlSetState(-1, $GUI_DISABLE)
  68. $Checkbox5 = GUICtrlCreateCheckbox("... to Calendar", 256, 232, 145, 17)
  69. GUICtrlSetState(-1, $GUI_DISABLE)
  70. $Checkbox6 = GUICtrlCreateCheckbox("... to SMS and MMS", 256, 248, 129, 17)
  71. GUICtrlSetState(-1, $GUI_DISABLE)
  72. $Checkbox7 = GUICtrlCreateCheckbox("... to bluetooth and wlan", 256, 264, 137, 17)
  73. GUICtrlSetState(-1, $GUI_DISABLE)
  74. $Button1 = GUICtrlCreateButton("remove access", 416, 304, 105, 17)
  75. GUICtrlSetState(-1, $GUI_DISABLE)
  76. $Button2 = GUICtrlCreateButton("uninstall all windows apps", 264, 304, 137, 17)
  77. GUICtrlSetState(-1, $GUI_DISABLE)
  78. $Checkbox10 = GUICtrlCreateCheckbox("... to Speech, inking and typing", 256, 280, 169, 17)
  79. GUICtrlSetState(-1, $GUI_DISABLE)
  80. GUICtrlCreateGroup("", -99, -99, 1, 1)
  81. $Lversion = GUICtrlCreateLabel("Windows Version...", 16, 312, 215, 17)
  82. $Group4 = GUICtrlCreateGroup("General Privacy Settings", 248, 8, 281, 129)
  83. $CSmartScreen = GUICtrlCreateCheckbox("SmartScreen Filter...", 256, 64, 177, 17)
  84. GUICtrlSetState(-1, $GUI_DISABLE)
  85. $BfixSmartScreen = GUICtrlCreateButton("fix", 496, 64, 25, 17)
  86. GUICtrlSetState(-1, $GUI_DISABLE)
  87. $Cwrite = GUICtrlCreateCheckbox("Send Microsoft info about how I write", 256, 88, 193, 17)
  88. GUICtrlSetState(-1, $GUI_DISABLE)
  89. $Bwrite = GUICtrlCreateButton("fix", 496, 88, 25, 17)
  90. GUICtrlSetState(-1, $GUI_DISABLE)
  91. $Cwebprove = GUICtrlCreateCheckbox("Let websites provide locally relevant content", 256, 112, 233, 17)
  92. GUICtrlSetState(-1, $GUI_DISABLE)
  93. $Bwebprove = GUICtrlCreateButton("fix", 496, 112, 25, 17)
  94. GUICtrlSetState(-1, $GUI_DISABLE)
  95. $Cads = GUICtrlCreateCheckbox("Checking Advert Info....", 256, 36, 209, 17)
  96. GUICtrlSetState(-1, $GUI_DISABLE)
  97. $Bfixad = GUICtrlCreateButton("fix", 496, 40, 25, 17)
  98. GUICtrlSetState(-1, $GUI_DISABLE)
  99. GUICtrlCreateGroup("", -99, -99, 1, 1)
  100. $Lversio = GUICtrlCreateLabel("Programm Version...", 8, 432, 234, 17)
  101. GUISetState(@SW_SHOW)
  102. #EndRegion ### END Koda GUI section ###
  103.  
  104. #Include <Array.au3>
  105. #Include <String.au3>
  106. #include <INet.au3>
  107.  
  108. $version = "0.2"
  109. $titel = "win10privacyfix"
  110.  
  111. ;simple update checker
  112. Local $version = '0.2'
  113. Local $check_1 = 'https://raw.githubusercontent.com/lordfiSh/win10privacyfix/master/README.md'
  114. Local $check_2 = '### Version '
  115. Local $check_3 = '###'
  116.  
  117. GUICtrlSetData($Lversio, "Version: " & $version)
  118.  
  119. If @OSVersion = "WIN_10" Then
  120.    Msgbox(64, "win10privacyfix", "wrote this tool in a few minutes. If I get some feedback, then I extend this Tool")
  121.    $winv = "Windows 10"
  122. Else
  123.     Msgbox(48, "win10privacyfix", "This Tool is only for Windows 10! Errors may occure")
  124.     $winv = @OSVersion
  125. EndIf
  126.  
  127. While 1
  128.     $nMsg = GUIGetMsg()
  129.     Switch $nMsg
  130.         Case $GUI_EVENT_CLOSE
  131.             Exit
  132.  
  133.          Case $Bcheck
  134. GUICtrlSetData($Bcheck, "checking...")
  135. GUICtrlSetState($Bcheck, $GUI_DISABLE)
  136.  
  137. $OSEdition = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "EditionID")
  138. GUICtrlSetData($Lversion, $winv & " " & $OSEdition & " - Build " & @OSBuild)
  139.  
  140. Local $versioncheck = _StringBetween(_INetGetSource($check_1), $check_2, $check_3)
  141. $versionscheck = StringCompare($versioncheck[0], $version)
  142. $versioncheck[0] = "0.3"
  143. If $versionscheck = "1" Then
  144.    GUICtrlSetData($Lversio, $versioncheck[0] & " is online avalible")
  145.    GUICtrlSetColor(-1, 0x0000FF)
  146.  
  147. Endif
  148.  
  149.  
  150. #Region ### Buttoncheck Registry
  151.  
  152. $SmartScreen = RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost\", "EnableWebContentEvaluation")
  153.    If $SmartScreen = "1" Then
  154.       GUICtrlSetData($CSmartScreen,"SmartScreen Filter enabled")
  155.       GUICtrlSetState($CSmartScreen, $GUI_CHECKED)
  156.    EndIf
  157.    If $SmartScreen = "0" Then
  158.       GUICtrlSetData($CSmartScreen,"SmartScreen Filter disabled")
  159.       GUICtrlSetState($CSmartScreen, $GUI_UNCHECKED)
  160.    EndIf
  161.  
  162. $HttpAcceptLanguageOptOut = RegRead("HKCU\Control Panel\International\User Profile\", "HttpAcceptLanguageOptOut")
  163. If $HttpAcceptLanguageOptOut = "1" Then
  164.       GUICtrlSetData($Cwebprove,"SmartScreen Filter enabled")
  165.    Else
  166.       GUICtrlSetData($Cwebprove,"SmartScreen Filter enabled")
  167.       GUICtrlSetState($Cwebprove, $GUI_CHECKED)
  168. EndIf
  169.  
  170.  
  171.    $DiagTrack = RegRead("HKLM\SYSTEM\CurrentControlSet\Services\DiagTrack", "Start")
  172.    If $DiagTrack = "1" Then
  173.       GUICtrlSetData($Cservice1,"DiagTrack Autostart")
  174.       GUICtrlSetState($Cservice1, $GUI_CHECKED)
  175.    EndIf
  176.    If $DiagTrack = "4" Then
  177.       GUICtrlSetData($Cservice1,"DiagTrack Autostart disabled")
  178.    EndIf
  179.  
  180.    $dmwappushservice = RegRead("HKLM\SYSTEM\CurrentControlSet\Services\dmwappushservice", "Start")
  181.    If $dmwappushservice = "1" Then
  182.       GUICtrlSetData($Cservice3,"dmwappushservice Autostart active")
  183.       GUICtrlSetState($Cservice3, $GUI_CHECKED)
  184.    EndIf
  185.    If $dmwappushservice = "4" Then
  186.       GUICtrlSetData($Cservice3,"dmwappushservice Autostart disabled")
  187.    EndIf
  188.  
  189.    $AdvertisingInfo = RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo", "Enabled")
  190.    $AdvertisingInfo2 = RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo", "Id")
  191.    If $AdvertisingInfo = "1" Then
  192.      GUICtrlSetData($Cads,"personalsied Ads active: Your ID" & $AdvertisingInfo2)
  193.      GUICtrlSetState($Cads, $GUI_CHECKED)
  194.    EndIf
  195.    If $AdvertisingInfo = "0" Then
  196.      GUICtrlSetData($Cads,"AdvertisingInfo disabled")
  197.    EndIf
  198.  
  199.    $feedback = RegRead("HKCU\SOFTWARE\Microsoft\Siuf\Rules", "NumberOfSIUFInPeriod")
  200.    If $feedback = "0" Then
  201.    GUICtrlSetData($Cfeedback,"Feedback frequency disabled")
  202.    Else
  203.       GUICtrlSetData($Cfeedback,"Feedback frequency not disabled")
  204.       GUICtrlSetState($Cfeedback, $GUI_CHECKED)
  205.    EndIf
  206.  
  207.  
  208. ;#######
  209. $pid = Run('ping telemetry.urs.microsoft.com', '', @SW_HIDE, 2)
  210.  
  211. Global $data
  212.  
  213. Do
  214.     $data &= StdOutRead($pid)
  215. Until @error
  216.  
  217. If StringInStr($data, '127.0.0.1') Then
  218.    GUICtrlSetData($Ctelem, "Mircosoft Telemetry Hosts blocked")
  219. Else
  220.       GUICtrlSetData($Ctelem, "Mircosoft Telemetry Hosts not blocked")
  221.       GUICtrlSetState($Cfeedback, $GUI_CHECKED)
  222.    EndIf
  223.  
  224.  
  225. ;#######
  226. $pid = Run('sc query DiagTrack', '', @SW_HIDE, 2)
  227.  
  228. Global $data
  229.  
  230. Do
  231.     $data &= StdOutRead($pid)
  232. Until @error
  233.  
  234. If StringInStr($data, 'running') Then
  235.    GUICtrlSetData($Cservice2, "DiagTrack running")
  236. Else
  237.       GUICtrlSetData($Cservice2, "DiagTrack not running")
  238.  EndIf
  239. ;#######
  240.  
  241. $pid = Run('sc query dmwappushservice', '', @SW_HIDE, 2)
  242.  
  243. Global $data
  244.  
  245. Do
  246.     $data &= StdOutRead($pid)
  247. Until @error
  248.  
  249. If StringInStr($data, 'running') Then
  250.    GUICtrlSetData($Cservice4, "dmwappushservice running")
  251.    GUICtrlSetState($Cservice4, $GUI_CHECKED)
  252. Else
  253.       GUICtrlSetData($Cservice4, "dmwappushservice not running")
  254.    EndIf
  255.  
  256. ;#######
  257.  
  258. If FileExists (@HomeDrive & "\Windows.old\") Then
  259. GUICtrlSetState($Coldwindir, $GUI_CHECKED)
  260. Local $iSize = DirGetSize(@HomeDrive & "\Windows.old\")
  261. GUICtrlSetData($Coldwindir, "there is a Windows.old: (" & Round($iSize / 1024 / 1024) & " MB)")
  262. EndIf
  263.  
  264.  
  265. GUICtrlSetState($Bfixservice, $GUI_ENABLE)
  266. GUICtrlSetState($Bfixad, $GUI_ENABLE)
  267. GUICtrlSetState($Bfixtele, $GUI_ENABLE)
  268. GUICtrlSetData($Bcheck, "check")
  269. GUICtrlSetState($Bcheck, $GUI_ENABLE)
  270. GUICtrlSetState($Bfixwindir, $GUI_ENABLE)
  271. GUICtrlSetState($Bfixfeedback, $GUI_ENABLE)
  272. GUICtrlSetState($BfixSmartScreen, $GUI_ENABLE)
  273. GUICtrlSetState($Bwrite, $GUI_ENABLE)
  274. GUICtrlSetState($Bwebprove, $GUI_ENABLE)
  275. ;##################### End Check Button
  276.  
  277. Case $Bfixservice
  278.    Run(@ComSpec & ' /c net stop DiagTrack', '', @SW_HIDE)
  279.    Run(@ComSpec & ' /c sc config DiagTrack start=disabled', '', @SW_HIDE)
  280.    Run(@ComSpec & ' /c net stop dmwappushservice', '', @SW_HIDE)
  281.    Run(@ComSpec & ' /c sc config dmwappushservice start=disabled', '', @SW_HIDE)
  282.    Run(@ComSpec & ' /c echo "" > C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl', '', @SW_HIDE)
  283.  
  284.  
  285. Case $Bfixad
  286.    RegWrite("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo", "Enabled", "REG_DWORD", "0")
  287.    RegDelete("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo", "Id")
  288.  
  289. Case $Bfixtele
  290.    $file = FileOpen(@windowsdir & "\system32\drivers\etc\hosts", 1)
  291.    FileWrite($file, @CRLF)
  292.    FileWrite($file, "### Block MS Telemetry Hosts")
  293.    FileWrite($file, @CRLF)
  294.    FileWrite($file, "127.0.0.1 vortex.data.microsoft.com" & @CRLF)
  295.    FileWrite($file, "127.0.0.1 vortex-win.data.microsoft.com" & @CRLF)
  296.    FileWrite($file, "127.0.0.1 telecommand.telemetry.microsoft.com" & @CRLF)
  297.    FileWrite($file, "127.0.0.1 telecommand.telemetry.microsoft.com.nsatc.net" & @CRLF)
  298.    FileWrite($file, "127.0.0.1 oca.telemetry.microsoft.com" & @CRLF)
  299.    FileWrite($file, "127.0.0.1 oca.telemetry.microsoft.com.nsatc.net" & @CRLF)
  300.    FileWrite($file, "127.0.0.1 sqm.telemetry.microsoft.com" & @CRLF)
  301.    FileWrite($file, "127.0.0.1 sqm.telemetry.microsoft.com.nsatc.net" & @CRLF)
  302.    FileWrite($file, "127.0.0.1 watson.telemetry.microsoft.com" & @CRLF)
  303.    FileWrite($file, "127.0.0.1 watson.telemetry.microsoft.com.nsatc.net" & @CRLF)
  304.    FileWrite($file, "127.0.0.1 redir.metaservices.microsoft.com" & @CRLF)
  305.    FileWrite($file, "127.0.0.1 choice.microsoft.com" & @CRLF)
  306.    FileWrite($file, "127.0.0.1 choice.microsoft.com.nsatc.net" & @CRLF)
  307.    FileWrite($file, "127.0.0.1 df.telemetry.microsoft.com" & @CRLF)
  308.    FileWrite($file, "127.0.0.1 reports.wes.df.telemetry.microsoft.com" & @CRLF)
  309.    FileWrite($file, "127.0.0.1 services.wes.df.telemetry.microsoft.com" & @CRLF)
  310.    FileWrite($file, "127.0.0.1 sqm.df.telemetry.microsoft.com" & @CRLF)
  311.    FileWrite($file, "127.0.0.1 telemetry.microsoft.com" & @CRLF)
  312.    FileWrite($file, "127.0.0.1 watson.ppe.telemetry.microsoft.com" & @CRLF)
  313.    FileWrite($file, "127.0.0.1 telemetry.appex.bing.net" & @CRLF)
  314.    FileWrite($file, "127.0.0.1 telemetry.urs.microsoft.com" & @CRLF)
  315.    FileWrite($file, "127.0.0.1 telemetry.appex.bing.net:443" & @CRLF)
  316.    FileWrite($file, "127.0.0.1 settings-sandbox.data.microsoft.com" & @CRLF)
  317.    FileWrite($file, "127.0.0.1 vortex-sandbox.data.microsoft.com" & @CRLF)
  318.    FileWrite($file, "127.0.0.1 telemetry.*" & @CRLF)
  319.    FileClose($file)
  320.  
  321. Case $BfixSmartScreen
  322.    RegWrite("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost\", "EnableWebContentEvaluation", "REG_DWORD", "0")
  323.  
  324. Case $Bwrite
  325.   msgbox(0, "", "todo")
  326.  
  327. Case $Bwebprove
  328.   msgbox(0, "", "todo")
  329.  
  330. Case $Bfixfeedback
  331.    RegWrite("HKCU\SOFTWARE\Microsoft\Siuf\Rules", "NumberOfSIUFInPeriod", "REG_DWORD", "0")
  332.  
  333. Case $Bfixwindir
  334.    Msgbox(0, "cleaning up windows.old dir", "- choose your Windows Drive" & @CRLF & "- press OK" & @CRLF & "- press the Clean up system files Button" & @CRLF & "- choose your Windows Drive" & @CRLF & "- press OK" & @CRLF & "- check Previose Windows installtion(s)"& @CRLF & "- Press OK")
  335.    ShellExecute("cleanmgr")
  336.  
  337. Case $Bblog
  338.    ShellExecute("https://wiiare.in/windows-10-privacy-fixer/")
  339.  
  340. Case $Breddit
  341.    ShellExecute("https://www.reddit.com/r/conspiracy/comments/3fhy27/how_do_disable_all_privacy_leaks_in_windows_10/ctq3p3m")
  342.  
  343. Case $Lversio
  344.    ShellExecute("https://github.com/lordfiSh/win10privacyfix/releases")
  345.  
  346.  
  347.  
  348.     EndSwitch
  349. WEnd
Add Comment
Please, Sign In to add comment