I am currently writing a little windows service application and I can successfully in/uninstall it etc via something like this:
serviceProcessInstall
Here's a more concise answer:
In your ServiceInstaller class (the one that uses the Installer as a base class), add the following two overrides:
public partial class ServiceInstaller : System.Configuration.Install.Installer {
public ServiceInstaller () {
...
}
protected override void OnBeforeInstall(System.Collections.IDictionary savedState) {
Context.Parameters["assemblypath"] += "\" /service";
base.OnBeforeInstall(savedState);
}
protected override void OnBeforeUninstall(System.Collections.IDictionary savedState) {
Context.Parameters["assemblypath"] += "\" /service";
base.OnBeforeUninstall(savedState);
}
}