Imported 1.x Project Files
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace VmwareLauncher
|
||||
{
|
||||
partial class ServiceConfig
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Forces the startup type for the specified services to manual.
|
||||
/// </summary>
|
||||
/// <param name="svc"></param>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user