As with any other Microsoft Technology. goto MSDN.
Common NT Services: SQL Server, Oracle, IIS, Apache, Tomcat, COM+. To check out what NT services are running on your NT/2000/XP/2003 Server box, open up the Administrative Tools and select Services.
Writing a service in .NET or VB6 is easy. Haven't done it in C++.
Services can be set to run with specific rights. Services can also be set to start automatically or manually.
Alternatives:
You can also run an executable with custom rights using the "runas"
RUNAS USAGE:
RUNAS [/profile] [/env] [/netonly] /user:<UserName> program
/profile if the user's profile needs to be loaded
/env to use current environment instead of user's.
/netonly use if the credentials specified are for remote access only.
/user <UserName> should be in form USER@DOMAIN or DOMAIN\USER
program command line for EXE. See below for examples
Examples:
> runas /profile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""
NOTE: Enter user's password only when prompted.
NOTE: USER@DOMAIN is not compatible with /netonly.
You can fire up an executable with @ command, or Scheduler.
You can fire up an executable when the system starts with a registry hack to //hkey_local_machine/Software/Microsoft/Windows/CurrentVersion/Run or //hkey_local_machine/Software/Microsoft/Windows/CurrentVersion/RunOnce