RcBuilder@walla.com
call centre: 054-5614020

basic windows service plus installer c#

Posted by: RcBuilder  /   Category: Installers / Services / SOURCE CODE / System / Timer / Windows Service   /   No Comments
17
Jun
2014

basic windows service plus installer c# Service private System.Timers.Timer timer1; protected override void OnStart(string { this.serviceProcessInstaller1, this.serviceInstaller1}); } void Installer1_AfterInstall(object sender, InstallEventArgs e) { // start service after registration ServiceController service = new ServiceController(this.serviceInstaller1.ServiceName); service.Start(); } notice! use InstallUtil to register the.

Read more

STOP AND START SERVICES C#

Posted by: RcBuilder  /   Category: Services / SOURCE CODE / System   /   No Comments
17
Jun
2014

STOP AND START SERVICES C#

1.  add the  System.ServiceProcess namespace
2. create instance of ServiceController object
3. use Status attribute to determine the service status
4. use Start() or Stop() methods

structure

using System.ServiceProcess;

using (ServiceController srv = new ServiceController(service_name))
if (srv.Status == ServiceControllerStatus.Running)
srv.Stop();

using (ServiceController srv = new ServiceController(service_name))
if (srv.Status == ServiceControllerStatus.Stopped || srv.Status == ServiceControllerStatus.Paused)
srv.Start();

example

using System.ServiceProcess;

try
{
if.

Read more

change windows service name

Posted by: RcBuilder  /   Category: Services / System   /   No Comments
11
May
2014

change windows service name 1.regedit 2.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services 3.change the service folder name and the displayName.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים