Ok This is what i had in mind: Code: #Version 0.15 Tracking Wiz Controller Script #GUI by Mr. Jinjie #Script by Smorgan and Murphy78 #With help from KnowledgeableNewbie and Lite8 #Notes #Windows Legacy = Windows Vista Forward $winver = (gwmi win32_OperatingSystem).Version $arc = $ENV:PROCESSOR_ARCHITECTURE function COMMANDER-JIN-JAY { #region Import the Assemblies [reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null [reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null #endregion #region Generated Form Objects $form1 = New-Object System.Windows.Forms.Form $button5 = New-Object System.Windows.Forms.Button $button4 = New-Object System.Windows.Forms.Button $button3 = New-Object System.Windows.Forms.Button $button2 = New-Object System.Windows.Forms.Button $button1 = New-Object System.Windows.Forms.Button $InitialFormWindowState = New-Object System.Windows.Forms.FormWindowState #endregion Generated Form Objects #---------------------------------------------- #Generated Event Script Blocks #---------------------------------------------- $handler_form1_Load= { } $handler_button1_Click= { ########################################################################################################### # Button 1 commands # ########################################################################################################### Write-Host Disable Full Telemetry Write-Host Disable Windows Error Reporting Disable-WindowsErrorReporting Write-Host Clear the Event Cache wevtutil el | Foreach-Object {wevtutil cl "$_"} write-host Certificate Section certutil -addstore "Disallowed" "$PWD/msitwww2.crt" certutil -addstore "Disallowed" "$PWD/MicSecSerCA2011_2011-10-18.crt" write-host Hosts Modification copy-item "C:\Windows\System32\Drivers\etc\hosts" "C:\Windows\System32\Drivers\etc\hosts.backup" Function Route_Table_Updaterer (){ $b = Get-Content $PWD\ip_addy_list.txt ForEach ($i in $b) { route add -host $i reject }} Route_Table_Updaterer write-host Disable DiagTracking if ($winver -ge "6.3.9651"){ #Not Present in Windows 8.1 Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient\Windows" -Name "CEIPEnable" -Type "DWord" -Value "0x00000000" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack" -Name "DisableAutomaticTelemetryKeywordReporting" -Type "DWord" -Value "0x00000001" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack" -Name "Disabled" -Type "DWord" -Value "0x00000001" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack" -Name "TelemetryServiceDisabled" -Type "DWord" -Value "0x00000001" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack\TestHooks" -Name "DisableAsimovUpload" -Type "DWord" -Value "0x00000001" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\PerfTrack" -Name "Disabled" -Type "DWord" -Value "0x00000001" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener" -Name "Start" -Type "DWord" -Value "0x00000000" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener\{22FB2CD6-0E7B-422B-A0C7-2FAD1FD0E716}" -Name "Enabled" -Type "DWord" -Value "0x00000000" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener\{331C3B3A-2005-44C2-AC5E-77220C37D6B4}" -Name "Enabled" -Type "DWord" -Value "0x00000000" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener\{44345799-E748-4607-9ACF-35306808422C}" -Name "Enabled" -Type "DWord" -Value "0x00000000" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener\{96F4A050-7E31-453C-88BE-9634F4E02139}" -Name "Enabled" -Type "DWord" -Value "0x00000000" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener\{DBE9B383-7CF3-4331-91CC-A3CB16A3B538}" -Name "Enabled" -Type "DWord" -Value "0x00000000" Write-Host Services Write-Host Stop Services net stop DiagTrack net stop dmwappushsvc Set-Service DiagTrack -startupType disabled Set-Service dmwappushsvc -startupType disabled } #Services Present in Windows Legacy net stop Wecsvc net stop Eventlog Set-Service Wecsvc -startupType disabled Set-Service Eventlog -startupType disabled } $handler_button2_Click= { ########################################################################################################### # Button 2 commands # ########################################################################################################### write-host Enable Full Telemetry Enable-WindowsErrorReporting write-host Allow Certificates certutil -delstore "Disallowed" "$PWD/msitwww2.crt" certutil -delstore "Disallowed" "$PWD/MicSecSerCA2011_2011-10-18.crt" write-host Restore Original Hosts File If (Test-Path "C:\Windows\System32\Drivers\etc\hosts.backup"){Remove-Item "C:\Windows\System32\Drivers\etc\hosts";Rename-Item "C:\Windows\System32\Drivers\etc\hosts.backup" "C:\Windows\System32\Drivers\etc\hosts"}else{write "No Backup"} write-host Enable Diagtracker if ($winver -ge "6.3.9651"){ Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient\Windows" -Name "CEIPEnable" -Type "DWord" -Value "0x00000001" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack" -Name "DisableAutomaticTelemetryKeywordReporting" -Type "DWord" -Value "0x00000000" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack" -Name "Disabled" -Type "DWord" -Value "0x00000000" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack" -Name "TelemetryServiceDisabled" -Type "DWord" -Value "0x00000000" New-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack\TestHooks" -Name "DisableAsimovUpload" -Type "DWord" -Value "0x00000000" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\PerfTrack" -Name "Disabled" -Type "DWord" -Value "0x00000000" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener" -Name "Start" -Type "DWord" -Value "0x00000001" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener\{22FB2CD6-0E7B-422B-A0C7-2FAD1FD0E716}" -Name "Enabled" -Type "DWord" -Value "0x00000001" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener\{331C3B3A-2005-44C2-AC5E-77220C37D6B4}" -Name "Enabled" -Type "DWord" -Value "0x00000001" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener\{44345799-E748-4607-9ACF-35306808422C}" -Name "Enabled" -Type "DWord" -Value "0x00000001" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener\{96F4A050-7E31-453C-88BE-9634F4E02139}" -Name "Enabled" -Type "DWord" -Value "0x00000001" Set-ItemProperty -path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener\{DBE9B383-7CF3-4331-91CC-A3CB16A3B538}" -Name "Enabled" -Type "DWord" -Value "0x00000001"Write-Host Write-Host Services net start DiagTrack net start dmwappushsvc Set-Service DiagTrack -startupType delayed-auto Set-Service dmwappushsvc -startupType delayed-auto } #Services Present in Windows Legacy net start Wecsvc net start Eventlog Set-Service Wecsvc -startupType delayed-auto Set-Service Eventlog -startupType delayed-auto } $handler_button3_Click= { ########################################################################################################### # Button 3 command - Exit # ########################################################################################################### $form1.close() #Exit } $handler_button4_Click= { ########################################################################################################### # Button 4 commands # ########################################################################################################### Write-Host Disable Tracking - Lite Install if ($winver -ge "6.3.9651"){ net stop DiagTrack net stop dmwappushsvc Set-Service dmwappushsvc -startupType disabled Set-Service DiagTrack -startupType disabled } #Present in Legacy net stop Wecsvc net stop Eventlog Set-Service Wecsvc -startupType disabled Set-Service Eventlog -startupType disabled } $handler_button5_Click= { ########################################################################################################### # Button 5 commands - # ########################################################################################################### Write-Host Enable Tracking - Lite uninstall if ($winver -ge "6.3.9651") { net start DiagTrack net start dmwappushsvc Set-Service DiagTrack -startupType delayed-auto Set-Service dmwappushsvc -startupType delayed-auto } #Present in Windows Legacy net start Wecsvc net start Eventlog Set-Service Wecsvc -startupType delayed-auto Set-Service Eventlog -startupType delayed-auto } $OnLoadForm_StateCorrection= {#Correct the initial state of the form to prevent the .Net maximized form issue $form1.WindowState = $InitialFormWindowState } #---------------------------------------------- #region Generated Form Code $form1.Text = "Tracking Control" $form1.Name = "form1" $form1.DataBindings.DefaultDataSourceUpdateMode = 0 $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 380 $System_Drawing_Size.Height = 175 $form1.FormBorderStyle = 'Fixed3D' $form1.MaximizeBox = $false $form1.ClientSize = $System_Drawing_Size $form1.add_Load($handler_form1_Load) # ======================================================= $button5.TabIndex = 3 $button5.Name = "button5" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Size.Width = 140 $System_Drawing_Size.Height = 35 $button5.Size = $System_Drawing_Size $button5.UseVisualStyleBackColor = $True $button5.Text = "Lite - Enable Tracking" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 200 $System_Drawing_Point.Y = 71 $button5.Location = $System_Drawing_Point $button5.DataBindings.DefaultDataSourceUpdateMode = 0 $button5.add_Click($handler_button5_Click) $form1.Controls.Add($button5) # ======================================================= $button4.TabIndex = 3 $button4.Name = "button4" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Size.Width = 140 $System_Drawing_Size.Height = 35 $button4.Size = $System_Drawing_Size $button4.UseVisualStyleBackColor = $True $button4.Text = "Lite - Disable Tracking" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 200 $System_Drawing_Point.Y = 28 $button4.Location = $System_Drawing_Point $button4.DataBindings.DefaultDataSourceUpdateMode = 0 $button4.add_Click($handler_button4_Click) $form1.Controls.Add($button4) # ======================================================= $button3.TabIndex = 2 $button3.Name = "button" $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 140 $System_Drawing_Size.Height = 35 $button3.Size = $System_Drawing_Size $button3.UseVisualStyleBackColor = $True $button3.Text = "Exit" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 110 $System_Drawing_Point.Y = 120 $button3.Location = $System_Drawing_Point $button3.DataBindings.DefaultDataSourceUpdateMode = 0 $button3.add_Click($handler_button3_Click) $form1.Controls.Add($button3) # ======================================================= $button2.TabIndex = 1 $button2.Name = "button2" $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 140 $System_Drawing_Size.Height = 35 $button2.Size = $System_Drawing_Size $button2.UseVisualStyleBackColor = $True $button2.Text = "Full - Enable Tracking" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 36 $System_Drawing_Point.Y = 71 $button2.Location = $System_Drawing_Point $button2.DataBindings.DefaultDataSourceUpdateMode = 0 $button2.add_Click($handler_button2_Click) $form1.Controls.Add($button2) # ======================================================= $button1.TabIndex = 0 $button1.Name = "button1" $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Width = 140 $System_Drawing_Size.Height = 35 $button1.Size = $System_Drawing_Size $button1.UseVisualStyleBackColor = $True $button1.Text = "Full - Disable Tracking" $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 36 $System_Drawing_Point.Y = 28 $button1.Location = $System_Drawing_Point $button1.DataBindings.DefaultDataSourceUpdateMode = 0 $button1.add_Click($handler_button1_Click) $form1.Controls.Add($button1) # ======================================================= #endregion Generated Form Code #Save the initial state of the form $InitialFormWindowState = $form1.WindowState #Init the OnLoad event to correct the initial state of the form $form1.add_Load($OnLoadForm_StateCorrection) #Show the Form $form1.ShowDialog()| Out-Null } #End Function #Check the Windows Version Here if ($winver -ge "6.0.6000") { COMMANDER-JIN-JAY } else { #if not true exit the script after 3 seconds Write-Host "Wrong Windows Version Detected - Exiting Now" Start-Sleep -s 3 exit } I have removed the version checking for the check to run the entire script. There is now built in checking that will be run only on Windows 10. It should work on Windows Vista forward
I don't really like taking sole credit on projects because usually my projects don't involve the ideas completely being my own. Pieces and parts come together to make the project happen which is why I mentioned your name. The same goes for other projects I do because at this point I don't really think that small anymore. Also its handy having different opinions so I get the best of both worlds.