Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
4.2 KiB

  1. ; Name: Mohsin Ahmed
  2. ; Email: [email protected]
  3. ; Date: Mon Dec 02 17:54:32 1996
  4. ; File: s:/tftpd/readme
  5. ===========================================================================
  6. Date: Mon Dec 02 17:54:32 1996
  7. > set dir=D:\nt\PRIVATE\net\sockets\tcpcmd\tftpd\obj\i386
  8. > cd %dir%
  9. > sc create tftpd binPath= %dir%\tftpd.exe
  10. [SC] CreateService SUCCESS
  11. > sc query tftpd
  12. ... details ...
  13. > net start tftpd
  14. The tftpd service is starting.
  15. The tftpd service was started successfully.
  16. > tftp localhost get x y
  17. ===========================================================================
  18. MohsinA, 29-May-97.
  19. Customization fix:
  20. Added registry settings and valid filename checks in dir.c
  21. Security check: only files that can be accessed are:
  22. StartDirectory\\[\w.-_]+
  23. ===========================================================================
  24. Service Samples:
  25. \\products2\relsys\win32.sdk\mstools\samples\win32\winnt\service
  26. \\ntpdk\internl$\mstools\samples\win32\winnt\service
  27. \\ntddk\internl$\ddk\src\network\packet
  28. ===========================================================================
  29. > mstools\SC.EXE (Service control cmd line tool).
  30. DESCRIPTION:
  31. SC is a command line program used for communicating with the
  32. NT Service Controller and services.
  33. USAGE:
  34. sc <server> [command] [service name] <option1> <option2>...
  35. The option <server> has the form "\\ServerName"
  36. Further help on commands can be obtained by typing: "sc [command]"
  37. Commands:
  38. query Queries the status for a service, or
  39. enumerates the status for types of services.
  40. start Starts a service.
  41. pause Sends a PAUSE control request to a service.
  42. interrogate Sends an INTERROGATE control request to a service.
  43. continue Sends a CONTINUE control request to a service.
  44. stop Sends a STOP request to a service.
  45. config Changes the configuration of a service (persistant).
  46. qc Queries the configuration information for a service.
  47. delete Deletes a service (from the registry).
  48. create Creates a service. (adds it to the registry).
  49. control Sends a control to a service.
  50. GetDisplayName Gets the DisplayName for a service.
  51. GetKeyName Gets the ServiceKeyName for a service.
  52. EnumDepend Enumerates Service Dependencies.
  53. The following commands don't require a service name:
  54. sc <server> <command> <option>
  55. boot (ok | bad) Indicates whether the last boot should
  56. be saved as the last known good boot configuration
  57. Lock Locks the Service Database
  58. QueryLock Queries the LockStatus for the SCManager Database
  59. QUERY OPTIONS :
  60. If the query command is followed by a service name, the status
  61. for that service is returned. Further options do not apply in
  62. this case. If the query command is followed nothing or one of
  63. the options listed below, the services are enumerated.
  64. type= Type of services to enumerate (driver, service, all)
  65. (default = service)
  66. state= State of services to enumerate (inactive, all)
  67. (default = active)
  68. bufsize= The size (in bytes) of the enumeration buffer
  69. (default = 1024)
  70. ri= The resume index number at which to begin the enumeration
  71. (default = 0)
  72. group= Service group to enumerate
  73. (default = all groups)
  74. SYNTAX EXAMPLES
  75. sc query - Enumerates status for active services & drivers
  76. sc query messenger - Displays status for the messenger service
  77. sc query type= driver - Enumerates only active drivers
  78. sc query type= service - Enumerates only Win32 services
  79. sc query state= all - Enumerates only all services & drivers
  80. sc query bufsize= 50 - Enumerates with a 50 byte buffer.
  81. sc query ri= 14 - Enumerates with resume index = 14
  82. sc query type= service type= interact - Enumerates all interactive services
  83. sc query type= driver group= NDIS - Enumerates all NDIS drivers
  84. sc query type= driver
  85. sc query type= service
  86. sc query type= all bufsize= 1000
  87. sc start MyService
  88. ===========================================================================