Automatically Start Windows Service on Install
问题 I have a Windows service and an MSI installer (setup project) for it. The setup project has custom actions for install and uninstall with args of /install and /uninstall respectively. I would like the service to start immediately after the install. All my service does is starts a process. When the service is stopped, it does process.Close(); . I have tried doing var sc = new ServiceController( "MyProcess" ); sc.Start(); The process starts, but the event log message saying the service has