Skip to content

Code for a Windows Service that writes log files out to a "Logs" directory whre the service executable resides.

Notifications You must be signed in to change notification settings

Wm-M-Thompson/WindowsServices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WindowsServices

Code for a Windows Service that writes log files out to a "Logs" directory whre the service executable resides.

Steps to run after build

  • copy path to the executable file
  • open a CMD program in Adminstrative mode
  • go to the Microsoft.Net/framework directory and then to the latest subdirectory version. (for example C:\Windows\Microsoft.NET\Framework\v4.0.30319>)
  • type InstallUtil.exe
  • paste the executable path and hit enter

Run Service

  • run services.msc from the windows system command
  • find the service according to the Service Name (not the executable name) found in the file ProjectInstaller.Designer.cs which will be this.serviceInstaller1.DisplayName = "Alpha Windows Survice Test";
  • manually right click and press start

What will happen

  • In the Logs directory of where the program started you will see a ServiceLog file for today that was given an entry every 5 seconds. It will also record every start and stop.

About

Code for a Windows Service that writes log files out to a "Logs" directory whre the service executable resides.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages