I have created a Windows service that I use a bat file to install like this :
@ECHO OFF
REM The following directory is for .NET 4.0
set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319
set PATH=%PATH%;%DOTNETFX2%
echo Installing IEPPAMS Win Service...
echo ---------------------------------------------------
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil "%~dp0MyApp.WindowsService.exe"
echo ---------------------------------------------------
pause
echo Done.
This works fine but now I need a way to make this part even simpler for the end user. MSI is no longer possible to create within Visual Studio 2012 as far as I know?
Multiple services will be installed with same Setup package but with different names and basadresses (name and baseadress is set in app.config of the Windows Service) so its important that app.config is editable even after the setup package is finished.
It would be even better if the name of the service could be set from within the setup but not a most.
Use WiX to create an installer package and have that run your batch script as part of the setup process.
http://wix.codeplex.com/
http://visualstudiogallery.msdn.microsoft.com/5f43f268-7752-48c7-90e8-ae5b6f136b3f