.NET Windows service

Posted on 2010-01-04
Last Modified: 2013-11-26
Hello All,

I currently have developed a windows service that works so far, however it is still in debug mode running from VS 2005 (VB.NET).

How can I compile this service and deploy it on a Windows 2003 Server with all the supporting .dll's it needs ?

Thanks in advance.
Question by:abennett10
    LVL 11

    Accepted Solution

    LVL 7

    Expert Comment

    This site should help clear things up for you.
    It did for me.
    LVL 11

    Assisted Solution

    by:Kusala Wijayasena

    I think your link should start from here:

    LVL 15

    Assisted Solution

    Have you also been sure to add an Installer Class to your project?  As that is required for the installation, with code similar to the following in it (name the strings to whatever you require.
    Then simply follow the following instructions:
    Click Start -> Visual Studio [Version] -> Visual Studio Tools then select Visual Studio [Version] Command Prompt, from here just type:

    installutil.exe then the full path to your exe.  Eg:

    installutil.exe "C:\MyApp\MyApp.exe"

    That will install it.  Alternatively, you can create an MSI with a custom action to install your service, this would use the install class that you add in your project.

    ServiceInstaller si = new ServiceInstaller(); 
                ServiceProcessInstaller spi = new ServiceProcessInstaller(); 
                si.ServiceName = ""; 
                si.DisplayName = ""; 
                si.Description = ""; 
                si.StartType = ServiceStartMode.Automatic; 
                spi.Account = System.ServiceProcess.ServiceAccount.User; 
                spi.Password = null; 
                spi.Username = null; 

    Open in new window


    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now