|
@@ -3,6 +3,7 @@ using System.Diagnostics;
|
|
|
using System.IO;
|
|
|
using Microsoft.Win32;
|
|
|
using Microsoft.VisualBasic.FileIO;
|
|
|
+using System.Security.AccessControl;
|
|
|
|
|
|
namespace Optimizer
|
|
|
{
|
|
@@ -125,7 +126,7 @@ namespace Optimizer
|
|
|
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\diagnosticshub.standardcollector.service", "Start", "4", RegistryValueKind.DWord);
|
|
|
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\dmwappushservice", "Start", "4", RegistryValueKind.DWord);
|
|
|
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DcpSvc", "Start", "4", RegistryValueKind.DWord);
|
|
|
- Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DPS", "Start", "4", RegistryValueKind.DWord);
|
|
|
+ Utilities.RunCommand("sc config \"DPS\" start=disabled");
|
|
|
}
|
|
|
|
|
|
internal static void EnableTelemetryServices()
|
|
@@ -134,7 +135,7 @@ namespace Optimizer
|
|
|
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\diagnosticshub.standardcollector.service", "Start", "2", RegistryValueKind.DWord);
|
|
|
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\dmwappushservice", "Start", "2", RegistryValueKind.DWord);
|
|
|
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DcpSvc", "Start", "2", RegistryValueKind.DWord);
|
|
|
- Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DPS", "Start", "2", RegistryValueKind.DWord);
|
|
|
+ Utilities.RunCommand("sc config \"DPS\" start=demand");
|
|
|
|
|
|
Utilities.StartService("DiagTrack");
|
|
|
Utilities.StartService("diagnosticshub.standardcollector.service");
|