Click here to Skip to main content
15,903,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


Please tell me that, how to install/ deploy the Windows Service applicaiton(C#.Net) in test environment, without copying total code. Only deployment files need ot upload into server. The application was developed in C#.Net in VS 2012.


thanks in advance
guru
Posted

You can install a .net windows service with InstallUtil.exe : http://msdn.microsoft.com/en-us/library/50614e95%28v=vs.110%29.aspx[^]

Other than the above contact the author of the application for extra configuration options required.
 
Share this answer
 
Comments
gurusha 29-Nov-13 0:46am    
Hi,

Thank you for response,

Is there any other solution, other than configure via command prompt. We required like (.msi) setup.

thanks
guru
Mehdi Gholam 29-Nov-13 0:51am    
If you can edit the code you can make a self installing app : http://stackoverflow.com/questions/4144019/self-install-windows-service-in-net-c-sharp
Hi,

Thank you,

Resolved this solution as like,

Once we build the application it generates the BIN folder with .exe.
Then create one batch file to execute the windows service .exe. (We can't run the .exe directly. Either command prompt or batch file).
Run the batch file, either manually or schedular. Below is the sample file to create the batch file.

--- Batch Start --------

@echo off
SET PROG=%"%F:\CCMProduct\BOSCH-BIPO\BIPOServerWindowsService\bin\Debug%"%
SET SERVICE_EXE=%"%\BIPOServerWindowsService.exe%"%
SET FIRSTPART=%WINDIR%"\Microsoft.NET\Framework\v"
SET SECONDPART="\InstallUtil.exe"
SET SERVICENAME=%"%SynchronizeData%"%
SET DELETEBATCH="\*.bat"


SET DOTNETVER=4.0.30319
IF EXIST %FIRSTPART%%DOTNETVER%%SECONDPART% GOTO install
SET DOTNETVER=2.0.50727
IF EXIST %FIRSTPART%%DOTNETVER%%SECONDPART% GOTO install
SET DOTNETVER=1.1.4322
IF EXIST %FIRSTPART%%DOTNETVER%%SECONDPART% GOTO install
SET DOTNETVER=1.0.3705
IF EXIST %FIRSTPART%%DOTNETVER%%SECONDPART% GOTO install
:install
ECHO Found .NET Framework version %DOTNETVER%
ECHO Installing service "%PROG%"
%FIRSTPART%%DOTNETVER%%SECONDPART% /name=%SERVICENAME% "%PROG%%SERVICE_EXE%"
sc start AS
GOTO end
:end
ECHO DONE!!!

--- Batch End --------

Copy these text in notepad and save with .bat ext.

Thank you
guru
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900