How to install a windows service programmatically in C#?
I found several errors in the code that you reused and have fixed these and also cleaned it up a little. Again, the original code is taken from here. public static class ServiceInstaller { private const int STANDARD_RIGHTS_REQUIRED = 0xF0000; private const int SERVICE_WIN32_OWN_PROCESS = 0x00000010; [StructLayout(LayoutKind.Sequential)] private class SERVICE_STATUS { public int dwServiceType = … Read more