[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 522
  • Last Modified:

how to install and debug windows service developed in c#.net 2008 ?

how to install and debug windows service developed in c#.net 2008 ?

(installutil is not working !! )
0
Ameerh24
Asked:
Ameerh24
1 Solution
 
CsharpCommented:
what error message you are getting (installutill is not working).
can you explain the exact situation
 
0
 
swapneel_d14Commented:
why installutil   is not working???
0
 
angus_young_acdcCommented:
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;
            this.Installers.Add(si);

            spi.Account = System.ServiceProcess.ServiceAccount.User;
            spi.Password = null;
            spi.Username = null;
            this.Installers.Add(spi);

Open in new window

0
 
Ameerh24Author Commented:
Solution Works Fine
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now