What is Windows Service:
- Applications require some user interaction to execute.
- Internet Information Server automatically starts without the user logging into the system.
- You can run run it without any user logging in.
- You need Windows NT Kernel to execute Windows Service.
- The Windows NT Kernel is available in Windows NT/2000/ XP and Later Versions of Windows.
- You can not execute it on Windows Me/95/98.
- In Windows, the Services Option is found in the Control Panel -> Administrative Tools
How to Create a Windows Service:
- Open the Windows Service Project in Visual Studio.
- Right click in "WindowsService1 - Microsoft Visual Studio" and click on "Add Installer (menu item)"
- Click on "Service Process Installer" that is enabled above.
- Go to its Properties Menu.
- Change its Name
- Change Account Type to "Local System".
- Now Click on ServiceInstaller1, that is besides Service Process Installer.
- So to its Properties and change Display Name.
- Its StartType should be Manual so it will not run automatically at Boot Time.
- Build Solution.
- Go to the Debug Folder of its Visual Studio file and copy Path.
How to Install a Windows Service:
- Go to "Visual Studio Command Prompt and run it as Administrator.
- Enter the path of Windows Service and install it using Command "installutil/i [name of Windows Service]".
Store Secret key in Registry to run your software on specified machine, Learn Here.