DrEmpiricism/Optimize-Offline

[REQUEST] - Please differentiate Diagtrack naming in Set-Additional.ps1 to accommodate different Builds

espanafly opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
The reintroduced "Set-Additional.ps1" doesn't block Diagtrack in bullds 20H1 and newer

  • For 20H1 and newer, Microsoft uses the name "Diagtrack-Listener"
  • For 19H2 and older, Microsoft uses the name "AutoLogger-Diagtrack-Listener"

Describe the solution you'd like
Include a conditional to differentiate between the Diagtrack names for builds 19041 and newer & 18363 and older

Additional context
Some Examples:
19041 and newer
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\Diagtrack-Listener
Set-AutologgerConfig -Name Diagtrack-Listener -Start 0

18363 and older
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener
Set-AutologgerConfig -Name AutoLogger-Diagtrack-Listener -Start 0

The disclaimer to use "Set-Additional.ps1" at your own risk is truly warranted.
Anyone who blindly applies "Set-Additional.ps1" without careful vetting deserves the messed up OS they will undoubtedly get.
There are lots of great tweaks in "Set-Additional.ps1", but it's better to carefully cherry-pick and manually update the tweaks you want rather than using the script as written. Applies to all versions up to and including 4.0.1.7.