Two Lines of Code - Installing Windows Services w/o InstallUtil.exe
After long time of browsing the web I finally found an article describing how to install/uninstall a service with only two lines of code.
Install:
String []installParams= {filename};
System.Configuration.Install.ManagedInstallerClass.InstallHelper(installParams);
Uninstall:
String []installParams= {"/u", filename};
System.Configuration.Install.ManagedInstallerClass.InstallHelper(installParams);
You have to add System.Configuration.Install reference manually.
Please have a look at Roaan's article at SA Developer http://www.sadeveloper.net/viewarticle.aspx?articleID=49 for further information about logging and stack output.