SlideShare a Scribd company logo
Session 2 Windows Services
Session Objectives Explain Windows Services & its architecture Explain the Service Control Manager Create a Windows Service Program Discuss the service configuration program
Windows Services (1) Applications require user interaction to get them started IIS (Internet Information Server) automatically starts without the user logging into the system Windows service can run without any user logging in
Windows Services (2) To execute Windows Services, you need the Windows NT Kernel The Windows NT Kernel is available only in Windows NT/ 2000/ XP It is not available on systems running  Windows 95/ 98/ Me
Windows Services MMC (1) Windows Services can be monitored using the Windows 2000 Services MMC In Windows NT, the Services option is found in the Control Panel
Windows Services MMC (2) The MMC for services looks something like -
Windows Services - Architecture(1) Three types of programs are required to operate a service -  Service Program Service Control Program Service Configuration Program
Windows Services - Architecture (2) Graphical Representation -
The Service Program Service program contains logic of Windows Service A service program might contain code for more than one Windows Service The service program must have an entry point i.e. the Main() method
Service Control Manager (1) Windows Services need to be registered with the Service Control Manager The entry point – Main() method takes care of the registration process The Main() method is called automatically at boot time if the windows service is configured to start automatically
Service Control Manager (2) The service program should also implement handlers The handler of the service program handles the start/ stop/ pause requests from the Service Control Manager To implement a service program we need to inherit from a class called the ServiceBase class
Service Control Program Creating a service control program is optional A Service Control Program facilitates easy access to control the service and also provides custom functionality The ServiceController class needs to be inherited to implement a service controller program
Service Configuration Program The configuration of a windows service either happens at the time of installation or later Configuration includes settings that will start the service automatically or manually To implement a configuration program, you need to inherit from classes – ServiceProcessInstaller, ServiceInstaller
Creating a Windows Service (1) Select Windows Service -
Example 1
Example 2
Example 3
Creating a Service Installer Adding an Installer -
Properties of the Service Installer Viewing the properties of the installer -
Installing a Windows Service The .exe file created has to be registered with the Windows Registry Syntax - OR
Running a Windows Service (1) Windows Services MMC -
Running a Windows Service (2) Windows Services started -
Uninstalling a Windows Service Syntax -
Example 4
Service Program Code (2) Consider the following example -
OnStart() Example  5 -
FileSystemEventHandler Definition -
OnStop() Example 6 -

More Related Content

PPTX
Enterprise Integration
PDF
Patch Management Software - Administrator Guide
PDF
JVL MotoWare32 Programming Software
PPTX
Configuration management
PPTX
Installation & Initial Configuration
PDF
IONET Change Manager
PPT
Windows services 101 (2004)
DOCX
How_To_Manually_Reinstall_SCCM2012_Agent
Enterprise Integration
Patch Management Software - Administrator Guide
JVL MotoWare32 Programming Software
Configuration management
Installation & Initial Configuration
IONET Change Manager
Windows services 101 (2004)
How_To_Manually_Reinstall_SCCM2012_Agent

Viewers also liked (15)

PPT
Cp La Fresneda
PPS
PresentacióN1
PDF
Betts Associates Brochure
PPT
Ted.Dec08
PPS
Somos Mayores
PPT
Cruise2007 Carib
PDF
India E News Jan 27, 2009 Markets Move North, Sensex Gains 329 Points
PPT
Reunió De Pares
PPS
Frutas
PPS
Felicitacion Ah Mostoles
PPT
Ambiente de Trabalho
PPTX
Crossing the chasm - Expanding the Market
PPS
Loteria Homer
PPT
Ostruka Presentazioa
PPT
presentacións
Cp La Fresneda
PresentacióN1
Betts Associates Brochure
Ted.Dec08
Somos Mayores
Cruise2007 Carib
India E News Jan 27, 2009 Markets Move North, Sensex Gains 329 Points
Reunió De Pares
Frutas
Felicitacion Ah Mostoles
Ambiente de Trabalho
Crossing the chasm - Expanding the Market
Loteria Homer
Ostruka Presentazioa
presentacións
Ad

Similar to Session 2 (20)

PPTX
Windows Services 101
PPT
05 Management Technologies
PPTX
3 App Compat Win7
PDF
Programming Windows Server 2003 Robert Hill Foster
PDF
Programming Windows Server 2003 Robert Hill Foster
PPTX
Window architecture
PDF
Os file
PPTX
Windows Server 2008 R2 Dev Session 01
PDF
Windows Internals Covering Windows Server 2008 And Windows Vista 5th Edition ...
PPTX
Windows Architecture Explained by Stacksol
PPTX
Building Better Backdoors with WMI - DerbyCon 2017
PPTX
Topic # 12 of outline Configuring Local Services.pptx
PPT
Session 3
PPTX
WMI for Penetration Testers - Arcticcon 2017
PPTX
Fun with windows services
PDF
Windows Internals Part 1_6th Edition.pdf
PPT
PPT
Chapter 02
PPT
Chapter 02
Windows Services 101
05 Management Technologies
3 App Compat Win7
Programming Windows Server 2003 Robert Hill Foster
Programming Windows Server 2003 Robert Hill Foster
Window architecture
Os file
Windows Server 2008 R2 Dev Session 01
Windows Internals Covering Windows Server 2008 And Windows Vista 5th Edition ...
Windows Architecture Explained by Stacksol
Building Better Backdoors with WMI - DerbyCon 2017
Topic # 12 of outline Configuring Local Services.pptx
Session 3
WMI for Penetration Testers - Arcticcon 2017
Fun with windows services
Windows Internals Part 1_6th Edition.pdf
Chapter 02
Chapter 02
Ad

More from LiquidHub (20)

PDF
Share point 2013 coding standards and best practices 1.0
PPTX
Sharepoint 2013 upgrade process
PPTX
Share point 2013
PPTX
Share point 2010-uiimprovements
PPT
Microsoft office-sharepoint-server-2007-presentation-120211522467022-2
PPTX
Managing metadata in_share_point_2010
PPTX
Fast search for share point
DOC
Simple Farm Server Deployment
DOC
Pre Install Databases
DOC
Moss 2007 Deployment Detail
PDF
Moss 2007 Backup Strategies
PDF
How To Configure Email Enabled Lists In Moss2007 Rtm Using Exchange 2003
RTF
Bdc Screens
DOCX
Bdc Screens
PDF
5060 A 01 Demonstration Steps
PDF
5060 A 01
DOC
Working With Infopath 2007
PDF
Whats New In Microsoft Windows Share Point Services Feature Walkthrough
PDF
Overviewofthe2007 Microsoft Office System Components Refresh
PDF
Organizingand Finding Resourceswith Office Share Point Server2007 Refresh
Share point 2013 coding standards and best practices 1.0
Sharepoint 2013 upgrade process
Share point 2013
Share point 2010-uiimprovements
Microsoft office-sharepoint-server-2007-presentation-120211522467022-2
Managing metadata in_share_point_2010
Fast search for share point
Simple Farm Server Deployment
Pre Install Databases
Moss 2007 Deployment Detail
Moss 2007 Backup Strategies
How To Configure Email Enabled Lists In Moss2007 Rtm Using Exchange 2003
Bdc Screens
Bdc Screens
5060 A 01 Demonstration Steps
5060 A 01
Working With Infopath 2007
Whats New In Microsoft Windows Share Point Services Feature Walkthrough
Overviewofthe2007 Microsoft Office System Components Refresh
Organizingand Finding Resourceswith Office Share Point Server2007 Refresh

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Approach and Philosophy of On baking technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Big Data Technologies - Introduction.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Cloud computing and distributed systems.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Empathic Computing: Creating Shared Understanding
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
Teaching material agriculture food technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
sap open course for s4hana steps from ECC to s4
NewMind AI Weekly Chronicles - August'25-Week II
Approach and Philosophy of On baking technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Per capita expenditure prediction using model stacking based on satellite ima...
Big Data Technologies - Introduction.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Digital-Transformation-Roadmap-for-Companies.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Building Integrated photovoltaic BIPV_UPV.pdf
Cloud computing and distributed systems.
Dropbox Q2 2025 Financial Results & Investor Presentation
Empathic Computing: Creating Shared Understanding
The Rise and Fall of 3GPP – Time for a Sabbatical?
Teaching material agriculture food technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Machine learning based COVID-19 study performance prediction
sap open course for s4hana steps from ECC to s4

Session 2

  • 1. Session 2 Windows Services
  • 2. Session Objectives Explain Windows Services & its architecture Explain the Service Control Manager Create a Windows Service Program Discuss the service configuration program
  • 3. Windows Services (1) Applications require user interaction to get them started IIS (Internet Information Server) automatically starts without the user logging into the system Windows service can run without any user logging in
  • 4. Windows Services (2) To execute Windows Services, you need the Windows NT Kernel The Windows NT Kernel is available only in Windows NT/ 2000/ XP It is not available on systems running Windows 95/ 98/ Me
  • 5. Windows Services MMC (1) Windows Services can be monitored using the Windows 2000 Services MMC In Windows NT, the Services option is found in the Control Panel
  • 6. Windows Services MMC (2) The MMC for services looks something like -
  • 7. Windows Services - Architecture(1) Three types of programs are required to operate a service - Service Program Service Control Program Service Configuration Program
  • 8. Windows Services - Architecture (2) Graphical Representation -
  • 9. The Service Program Service program contains logic of Windows Service A service program might contain code for more than one Windows Service The service program must have an entry point i.e. the Main() method
  • 10. Service Control Manager (1) Windows Services need to be registered with the Service Control Manager The entry point – Main() method takes care of the registration process The Main() method is called automatically at boot time if the windows service is configured to start automatically
  • 11. Service Control Manager (2) The service program should also implement handlers The handler of the service program handles the start/ stop/ pause requests from the Service Control Manager To implement a service program we need to inherit from a class called the ServiceBase class
  • 12. Service Control Program Creating a service control program is optional A Service Control Program facilitates easy access to control the service and also provides custom functionality The ServiceController class needs to be inherited to implement a service controller program
  • 13. Service Configuration Program The configuration of a windows service either happens at the time of installation or later Configuration includes settings that will start the service automatically or manually To implement a configuration program, you need to inherit from classes – ServiceProcessInstaller, ServiceInstaller
  • 14. Creating a Windows Service (1) Select Windows Service -
  • 18. Creating a Service Installer Adding an Installer -
  • 19. Properties of the Service Installer Viewing the properties of the installer -
  • 20. Installing a Windows Service The .exe file created has to be registered with the Windows Registry Syntax - OR
  • 21. Running a Windows Service (1) Windows Services MMC -
  • 22. Running a Windows Service (2) Windows Services started -
  • 23. Uninstalling a Windows Service Syntax -
  • 25. Service Program Code (2) Consider the following example -