Click here to Skip to main content
15,921,212 members
Home / Discussions / C#
   

C#

 
GeneralRe: Break program flow Pin
Nnamdi Onyeyiri11-Sep-02 9:07
Nnamdi Onyeyiri11-Sep-02 9:07 
GeneralRe: Break program flow Pin
D Shen12-Sep-02 3:06
D Shen12-Sep-02 3:06 
GeneralRe: Break program flow Pin
Nnamdi Onyeyiri13-Sep-02 5:20
Nnamdi Onyeyiri13-Sep-02 5:20 
GeneralRe: Break program flow Pin
Paul Riley11-Sep-02 13:16
Paul Riley11-Sep-02 13:16 
GeneralRe: Break program flow Pin
David Stone12-Sep-02 3:55
sitebuilderDavid Stone12-Sep-02 3:55 
GeneralRe: Break program flow Pin
Paul Riley12-Sep-02 4:48
Paul Riley12-Sep-02 4:48 
GeneralNT Service Installation Pin
jparsons11-Sep-02 8:50
jparsons11-Sep-02 8:50 
GeneralRe: NT Service Installation Pin
Erik Westermann11-Sep-02 12:48
professionalErik Westermann11-Sep-02 12:48 
I'm actually working on an article that includes coverage of services. Here's the code I use to install a service:

[RunInstaller(true)] public class ServiceInstaller: Installer
{
  private System.ServiceProcess.ServiceInstaller svcInst;
  private System.ServiceProcess.ServiceProcessInstaller processInstaller;

  public  ServiceInstaller()
  {

    processInstaller = new System.ServiceProcess.ServiceProcessInstaller();
    svcInst = new System.ServiceProcess.ServiceInstaller();

    // Service will run under the system account
    processInstaller.Account = ServiceAccount.LocalSystem;

    svcInst.StartType = ServiceStartMode.Manual;
    // These are the other possible valuse for ServiceStartMode...
    // ServiceStartMode.Manual
    // ServiceStartMode.Automatic
    // ServiceStartMode.Disabled
  

    svcInst.ServiceName = "EWService";
    svcInst.DisplayName="EW Sample Service";
    Installers.Add(svcInst);
    Installers.Add(processInstaller);
  }
}


The code basically establishes the service's name, display name, startup, and logon. Use InstallUtil to install the service and configure it as in the preceding class.


Erik Westermann
Author, Learn XML In A Weekend ^ (October 2002)
GeneralEvidence for Assembly.LoadFrom Pin
Ryan Cromwell11-Sep-02 4:38
Ryan Cromwell11-Sep-02 4:38 
GeneralRe: Evidence for Assembly.LoadFrom Pin
Ryan Cromwell11-Sep-02 4:52
Ryan Cromwell11-Sep-02 4:52 
GeneralIntercept rendered html code Pin
Anonymous11-Sep-02 4:19
Anonymous11-Sep-02 4:19 
GeneralReloading explorer.exe Pin
Eka11-Sep-02 1:57
Eka11-Sep-02 1:57 
GeneralRe: Reloading explorer.exe Pin
Rickard Andersson2011-Sep-02 2:34
Rickard Andersson2011-Sep-02 2:34 
GeneralRe: Reloading explorer.exe Pin
Jason Gerard12-Sep-02 7:57
Jason Gerard12-Sep-02 7:57 
Questionhow to load a dll at runtime Pin
fftongzhi10-Sep-02 21:39
fftongzhi10-Sep-02 21:39 
AnswerRe: how to load a dll at runtime Pin
Nish Nishant10-Sep-02 22:04
sitebuilderNish Nishant10-Sep-02 22:04 
GeneralRe: how to load a dll at runtime Pin
fftongzhi10-Sep-02 22:46
fftongzhi10-Sep-02 22:46 
GeneralRe: how to load a dll at runtime Pin
leppie10-Sep-02 23:54
leppie10-Sep-02 23:54 
GeneralRe: how to load a dll at runtime Pin
fftongzhi11-Sep-02 0:13
fftongzhi11-Sep-02 0:13 
GeneralRe: how to load a dll at runtime Pin
fftongzhi11-Sep-02 20:47
fftongzhi11-Sep-02 20:47 
GeneralRe: how to load a dll at runtime Pin
Paul Riley11-Sep-02 23:35
Paul Riley11-Sep-02 23:35 
GeneralRe: how to load a dll at runtime Pin
fftongzhi12-Sep-02 1:24
fftongzhi12-Sep-02 1:24 
GeneralRe: how to load a dll at runtime Pin
Paul Riley12-Sep-02 1:31
Paul Riley12-Sep-02 1:31 
GeneralRe: how to load a dll at runtime Pin
fftongzhi12-Sep-02 2:11
fftongzhi12-Sep-02 2:11 
GeneralRe: how to load a dll at runtime Pin
leppie12-Sep-02 2:01
leppie12-Sep-02 2:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.