A question called "Disable the Windows service ...", but the answers all talk about how to stop the service.
Most of what you find on Google is that you can update the registry to disable the service using something like this:
RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Services\[YourServiceName]", true); key.SetValue("Start", 4);
I have not tried this method, but it seems that it will work. I also came up with another method that uses sc.exe to disable the service:
Process sc = Process.Start("sc.exe", "config [YourServiceName] start= disabled");
xr280xr
source share