Windows Service

anurag_45 used Ask the Experts™
Hi Experts,

How to build and deploy code on different environment? (need to deploy my local system code to Production Server. I am using studio 2008, c# and Server 2003. Framework is 3.5

I have idea about Installutil.exe but never used before..If i am not wrong i cannot install services program wise as IDE would not be on Server.

Please help and guide me step by step.

Thanks a lot,
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

do you mean you want to be guided on how to install a windows service on your server?


Yes Sir..Thanks

After you create a Windows Service solution at the Visual Studio, your endpoint result will be the exe and its dependant dll's (if there are dlls).

At the Server where you want to deploy the windows service:
The built “.exe” file should be placed in a directory (eg. Windows\System32). After which the command prompt should be ran as Administrator and input the following command “sc create ExampleExe binpath= c:\Window\system32\ExampleExe.exe type= own start= auto”. It then creates it under services.

Note that windows services are not user-interacted objects, for example if you are used to windows.forms.timers at windows forms applications,  at windows service ones you should use system.timers.timer, designer objects will not work with windows service.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial