using Microsoft.Win32;
namespace VmwareLauncher
{
partial class ServiceConfig
{
///
/// Forces the startup type for the specified services to manual.
///
///
public static void ForceServicesManual (string[] svc)
{
string winServices = @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services";
foreach (var service in svc)
{
string currentService = winServices + "\\" + service;
if ((int) Registry.GetValue(currentService, "Start", null) != 3)
{
Registry.SetValue(currentService, "Start", 3);
}
}
}
}
}