how to install and debug windows service developed in 2008 ?

how to install and debug windows service developed in 2008 ?

(installutil is not working !! )
Who is Participating?
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

what error message you are getting (installutill is not working).
can you explain the exact situation
why installutil   is not working???
Ameerh24Author Commented:
Solution Works Fine
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.