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.

178 lines
8.5 KiB

  1. #include <windows.h>
  2. #include "resource.h"
  3. #include "cmdlineres.h"
  4. #include "cmdline.rc"
  5. /////////////////////////////////////////////////////////////////////////////
  6. //
  7. // String Table
  8. //
  9. STRINGTABLE DISCARDABLE
  10. BEGIN
  11. IDS_HELP_LINE1 "TASKLIST [/S system [/U username [/P [password]]]]\n"
  12. IDS_HELP_LINE2 " [/M [module] | /SVC | /V] [/FI filter] [/FO format] [/NH]\n"
  13. IDS_HELP_LINE3 "\n"
  14. IDS_HELP_LINE4 "Description:\n"
  15. IDS_HELP_LINE5 " This command line tool displays a list of application(s) and \n"
  16. IDS_HELP_LINE6 " associated task(s)/process(es) currently running on either a local or \n"
  17. IDS_HELP_LINE7 " remote system.\n"
  18. IDS_HELP_LINE8 "\n"
  19. IDS_HELP_LINE9 "Parameter List:\n"
  20. IDS_HELP_LINE10 " /S system Specifies the remote system to connect to.\n\n"
  21. IDS_HELP_LINE11 " /U [domain\\]user Specifies the user context under which\n"
  22. IDS_HELP_LINE12 " the command should execute.\n\n"
  23. IDS_HELP_LINE13 " /P [password] Specifies the password for the given\n"
  24. IDS_HELP_LINE14 " user context. Prompts for input if omitted.\n\n"
  25. IDS_HELP_LINE15 " /M [module] Lists all tasks that have DLL modules loaded\n"
  26. IDS_HELP_LINE16 " in them that match the given pattern name.\n"
  27. IDS_HELP_LINE17 " If the module name is not specified,\n"
  28. IDS_HELP_LINE18 " displays all modules loaded by each task.\n\n"
  29. IDS_HELP_LINE19 " /SVC Displays services in each process.\n\n"
  30. IDS_HELP_LINE20 " /V Specifies that the verbose information\n"
  31. IDS_HELP_LINE21 " is to be displayed.\n\n"
  32. IDS_HELP_LINE22 " /FI filter Displays a set of tasks that match a\n"
  33. IDS_HELP_LINE23 " given criteria specified by the filter.\n\n"
  34. IDS_HELP_LINE24 " /FO format Specifies the output format.\n"
  35. IDS_HELP_LINE25 " Valid values: ""TABLE"", ""LIST"", ""CSV"".\n\n"
  36. IDS_HELP_LINE26 " /NH Specifies that the ""Column Header"" should\n"
  37. IDS_HELP_LINE27 " not be displayed in the output.\n"
  38. IDS_HELP_LINE28 " Valid only for ""TABLE"" and ""CSV"" formats.\n\n"
  39. IDS_HELP_LINE29 " /? Displays this help/usage.\n"
  40. IDS_HELP_LINE30 "\n"
  41. IDS_HELP_LINE31 "Filters:\n"
  42. IDS_HELP_LINE32 " Filter Name Valid Operators Valid Value(s)\n"
  43. IDS_HELP_LINE33 " ----------- --------------- --------------\n"
  44. IDS_HELP_LINE34 " STATUS eq, ne RUNNING | NOT RESPONDING\n"
  45. IDS_HELP_LINE35 " IMAGENAME eq, ne Image name\n"
  46. IDS_HELP_LINE36 " PID eq, ne, gt, lt, ge, le PID value\n"
  47. IDS_HELP_LINE37 " SESSION eq, ne, gt, lt, ge, le Session number\n"
  48. IDS_HELP_LINE38 " SESSIONNAME eq, ne Session name\n"
  49. IDS_HELP_LINE39 " CPUTIME eq, ne, gt, lt, ge, le CPU time in the format\n"
  50. IDS_HELP_LINE40 " of hh:mm:ss.\n"
  51. IDS_HELP_LINE41 " hh - hours,\n"
  52. IDS_HELP_LINE42 " mm - minutes, ss - seconds\n"
  53. IDS_HELP_LINE43 " MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB\n"
  54. IDS_HELP_LINE44 " USERNAME eq, ne User name in [domain\\]user\n"
  55. IDS_HELP_LINE45 " format\n"
  56. IDS_HELP_LINE46 " SERVICES eq, ne Service name\n"
  57. IDS_HELP_LINE47 " WINDOWTITLE eq, ne Window title\n"
  58. IDS_HELP_LINE48 " MODULES eq, ne DLL name\n"
  59. IDS_HELP_LINE49 "\n"
  60. IDS_HELP_LINE50 "Examples:\n"
  61. IDS_HELP_LINE51 " TASKLIST\n"
  62. IDS_HELP_LINE52 " TASKLIST /M\n"
  63. IDS_HELP_LINE53 " TASKLIST /V\n"
  64. IDS_HELP_LINE54 " TASKLIST /SVC\n"
  65. IDS_HELP_LINE55 " TASKLIST /M wbem*\n"
  66. IDS_HELP_LINE56 " TASKLIST /S system /FO LIST\n"
  67. IDS_HELP_LINE57 " TASKLIST /S system /U domain\\username /FO CSV /NH\n"
  68. IDS_HELP_LINE58 " TASKLIST /S system /U username /P password /FO TABLE /NH\n"
  69. IDS_HELP_LINE59 " TASKLIST /FI ""USERNAME ne NT AUTHORITY\\SYSTEM"" /FI ""STATUS eq running""\n"
  70. END
  71. STRINGTABLE DISCARDABLE
  72. BEGIN
  73. IDS_OVALUES_FORMAT "list|table|csv"
  74. IDS_TEXT_FORMAT_LIST "list"
  75. IDS_TEXT_FORMAT_TABLE "table"
  76. IDS_TEXT_FORMAT_CSV "csv"
  77. END
  78. STRINGTABLE DISCARDABLE
  79. BEGIN
  80. IDS_FMT_KILOBYTE "%s K"
  81. IDS_VALUE_RUNNING "Running"
  82. IDS_VALUE_NOTRESPONDING "Not Responding"
  83. END
  84. STRINGTABLE DISCARDABLE
  85. BEGIN
  86. IDS_COLHEAD_HOSTNAME "Host Name"
  87. IDS_COLHEAD_STATUS "Status"
  88. IDS_COLHEAD_IMAGENAME "Image Name"
  89. IDS_COLHEAD_PID "PID"
  90. IDS_COLHEAD_SESSION "Session#"
  91. IDS_COLHEAD_USERNAME "User Name"
  92. IDS_COLHEAD_WINDOWTITLE "Window Title"
  93. IDS_COLHEAD_CPUTIME "CPU Time"
  94. IDS_COLHEAD_MEMUSAGE "Mem Usage"
  95. IDS_COLHEAD_SERVICES "Services"
  96. IDS_COLHEAD_SESSIONNAME "Session Name"
  97. IDS_COLHEAD_MODULES "Modules"
  98. IDS_COLWIDTH_HOSTNAME "16"
  99. IDS_COLWIDTH_STATUS "15"
  100. IDS_COLWIDTH_IMAGENAME "25"
  101. IDS_COLWIDTH_PID "6"
  102. IDS_COLWIDTH_SESSION "8"
  103. IDS_COLWIDTH_WINDOWTITLE "72"
  104. IDS_COLWIDTH_USERNAME "50"
  105. IDS_COLWIDTH_CPUTIME "12"
  106. IDS_COLWIDTH_MEMUSAGE "12"
  107. IDS_COLWIDTH_SERVICES "80"
  108. IDS_COLWIDTH_SERVICES_WRAP "45"
  109. IDS_COLWIDTH_SESSIONNAME "16"
  110. IDS_COLWIDTH_MODULES "80"
  111. IDS_COLWIDTH_MODULES_WRAP "45"
  112. END
  113. STRINGTABLE DISCARDABLE
  114. BEGIN
  115. IDS_FILTER_SESSIONNAME "sessionname"
  116. IDS_FILTER_STATUS "status"
  117. IDS_FILTER_IMAGENAME "imagename"
  118. IDS_FILTER_PID "pid"
  119. IDS_FILTER_SESSION "session"
  120. IDS_FILTER_CPUTIME "cputime"
  121. IDS_FILTER_MEMUSAGE "memusage"
  122. IDS_FILTER_USERNAME "username"
  123. IDS_FILTER_SERVICES "services"
  124. IDS_FILTER_WINDOWTITLE "windowtitle"
  125. IDS_FILTER_MODULES "modules"
  126. IDS_FVALUES_STATUS "running|not responding"
  127. IDS_PID_0_DOMAIN "NT AUTHORITY"
  128. IDS_PID_0_USERNAME "SYSTEM"
  129. IDS_OPERATORS_STRING " eq | ne "
  130. IDS_OPERATORS_NUMERIC " eq | ne | lt | gt | le | ge "
  131. IDS_FMT_MODULES_FILTER "modules eq %s"
  132. END
  133. STRINGTABLE DISCARDABLE
  134. BEGIN
  135. IDS_ERROR_INVALID_USAGE_REQUEST "Invalid Syntax.\nType ""TASKLIST /?"" for usage.\n"
  136. IDS_ERROR_USERNAME_BUT_NOMACHINE "Invalid Syntax. /U can be specified only when /S is specified.\nType ""TASKLIST /?"" for usage.\n"
  137. IDS_ERROR_PASSWORD_BUT_NOUSERNAME "Invalid Syntax. /P can be specified only when /U is specified.\nType ""TASKLIST /?"" for usage.\n"
  138. IDS_ERROR_NODATA_AVAILABLE "INFO: No tasks running with the specified criteria.\n"
  139. IDS_ERROR_COM_ERROR "%s Error Code: 0x%08lx\n"
  140. IDS_ERROR_USERNAME_EMPTY "Invalid Syntax. User name cannot be empty.\n"
  141. IDS_ERROR_SERVERNAME_EMPTY "Invalid Syntax. System name cannot be empty.\n"
  142. IDS_ERROR_NH_NOTSUPPORTED "Invalid Syntax. /NH option is allowed only for ""TABLE"" and ""CSV"" formats.\nType ""TASKLIST /?"" for usage.\n"
  143. IDS_ERROR_M_SVC_V_CANNOTBECOUPLED "Invalid Syntax. /V, /M and /SVC options cannot be coupled.\nType ""TASKLIST /?"" for usage.\n"
  144. IDS_ERROR_M_CHAR_AFTER_WILDCARD "Invalid Syntax. No characters were allowed after '*' for /M option.\nType ""TASKLIST /?"" for usage.\n"
  145. END
  146. STRINGTABLE DISCARDABLE
  147. BEGIN
  148. IDS_MSG_TASKSINFO "Loading the tasks information ..."
  149. IDS_MSG_MODULESINFO "Loading the modules information. Please Wait. This may take few minutes ..."
  150. IDS_MSG_MODULESINFO_EX "Loading the modules information ( PID = %u ) ..."
  151. IDS_MSG_SERVICESINFO "Loading the services information ..."
  152. END
  153. //
  154. // Version resources
  155. //
  156. #include <ntverp.h>
  157. #define VER_FILETYPE VFT_APP
  158. #define VER_FILESUBTYPE VFT2_UNKNOWN
  159. #define VER_FILEDESCRIPTION_STR "Task List"
  160. #define VER_INTERNALNAME_STR "TaskList.exe"
  161. #define VER_ORIGINALFILENAME_STR "TaskList.exe"
  162. #include <common.ver>