how to install and debug windows service developed in 2008 ?

Posted on 2009-12-31
Last Modified: 2013-12-17
how to install and debug windows service developed in 2008 ?

(installutil is not working !! )
Question by:Ameerh24
    LVL 3

    Expert Comment

    what error message you are getting (installutill is not working).
    can you explain the exact situation
    LVL 2

    Expert Comment

    why installutil   is not working???
    LVL 15

    Accepted 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


    Author Closing Comment

    Solution Works Fine

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    729 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

    16 Experts available now in Live!

    Get 1:1 Help Now