|
|
#include <windows.h> #include "resource.h" #include "cmdlineres.h"
#include "cmdline.rc"
///////////////////////////////////////////////////////////////////////////// // // String Table //
STRINGTABLE DISCARDABLE BEGIN IDS_HELP_LINE1 "TASKLIST [/S system [/U username [/P [password]]]]\n" IDS_HELP_LINE2 " [/M [module] | /SVC | /V] [/FI filter] [/FO format] [/NH]\n" IDS_HELP_LINE3 "\n" IDS_HELP_LINE4 "Description:\n" IDS_HELP_LINE5 " This tool displays a list of currently running processes on\n" IDS_HELP_LINE6 " either a local or remote machine.\n" IDS_HELP_LINE7 "" IDS_HELP_LINE8 "\n" IDS_HELP_LINE9 "Parameter List:\n" IDS_HELP_LINE10 " /S system Specifies the remote system to connect to.\n\n" IDS_HELP_LINE11 " /U [domain\\]user Specifies the user context under which\n" IDS_HELP_LINE12 " the command should execute.\n\n" IDS_HELP_LINE13 " /P [password] Specifies the password for the given\n" IDS_HELP_LINE14 " user context. Prompts for input if omitted.\n\n" IDS_HELP_LINE15 " /M [module] Lists all tasks currently using the given\n" IDS_HELP_LINE16 " exe/dll name. If the module name is not\n" IDS_HELP_LINE17 " specified all loaded modules are displayed.\n\n" IDS_HELP_LINE18 "" IDS_HELP_LINE19 " /SVC Displays services hosted in each process.\n\n" IDS_HELP_LINE20 " /V Displays verbose task information.\n\n" IDS_HELP_LINE21 "" IDS_HELP_LINE22 " /FI filter Displays a set of tasks that match a\n" IDS_HELP_LINE23 " given criteria specified by the filter.\n\n" IDS_HELP_LINE24 " /FO format Specifies the output format.\n" IDS_HELP_LINE25 " Valid values: ""TABLE"", ""LIST"", ""CSV"".\n\n" IDS_HELP_LINE26 " /NH Specifies that the ""Column Header"" should\n" IDS_HELP_LINE27 " not be displayed in the output.\n" IDS_HELP_LINE28 " Valid only for ""TABLE"" and ""CSV"" formats.\n\n" IDS_HELP_LINE29 " /? Displays this help message.\n" IDS_HELP_LINE30 "\n" IDS_HELP_LINE31 "Filters:\n" IDS_HELP_LINE32 " Filter Name Valid Operators Valid Value(s)\n" IDS_HELP_LINE33 " ----------- --------------- --------------------------\n" IDS_HELP_LINE34 " STATUS eq, ne RUNNING | \n" IDS_HELP_LINE35 " NOT RESPONDING | UNKNOWN\n" IDS_HELP_LINE36 " IMAGENAME eq, ne Image name\n" IDS_HELP_LINE37 " PID eq, ne, gt, lt, ge, le PID value\n" IDS_HELP_LINE38 " SESSION eq, ne, gt, lt, ge, le Session number\n" IDS_HELP_LINE39 " SESSIONNAME eq, ne Session name\n" IDS_HELP_LINE40 " CPUTIME eq, ne, gt, lt, ge, le CPU time in the format\n" IDS_HELP_LINE41 " of hh:mm:ss.\n" IDS_HELP_LINE42 " hh - hours,\n" IDS_HELP_LINE43 " mm - minutes, ss - seconds\n" IDS_HELP_LINE44 " MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB\n" IDS_HELP_LINE45 " USERNAME eq, ne User name in [domain\\]user\n" IDS_HELP_LINE46 " format\n" IDS_HELP_LINE47 " SERVICES eq, ne Service name\n" IDS_HELP_LINE48 " WINDOWTITLE eq, ne Window title\n" IDS_HELP_LINE49 " MODULES eq, ne DLL name\n" IDS_HELP_LINE50 "\n" IDS_HELP_LINE51 "NOTE: ""WINDOWTITLE"" and ""STATUS"" filters are not supported when querying\n" IDS_HELP_LINE52 " a remote machine.\n\n" IDS_HELP_LINE53 "Examples:\n" IDS_HELP_LINE54 " TASKLIST\n" IDS_HELP_LINE55 " TASKLIST /M\n" IDS_HELP_LINE56 " TASKLIST /V /FO CSV\n" IDS_HELP_LINE57 " TASKLIST /SVC /FO LIST\n" IDS_HELP_LINE58 " TASKLIST /M wbem*\n" IDS_HELP_LINE59 " TASKLIST /S system /FO LIST\n" IDS_HELP_LINE60 " TASKLIST /S system /U domain\\username /FO CSV /NH\n" IDS_HELP_LINE61 " TASKLIST /S system /U username /P password /FO TABLE /NH\n" IDS_HELP_LINE62 " TASKLIST /FI ""USERNAME ne NT AUTHORITY\\SYSTEM"" /FI ""STATUS eq running""\n" END
STRINGTABLE DISCARDABLE BEGIN IDS_OVALUES_FORMAT "list|table|csv" IDS_TEXT_FORMAT_LIST "list" IDS_TEXT_FORMAT_TABLE "table" IDS_TEXT_FORMAT_CSV "csv" END
STRINGTABLE DISCARDABLE BEGIN IDS_FMT_KILOBYTE "%s K" IDS_VALUE_RUNNING "Running" IDS_VALUE_NOTRESPONDING "Not Responding" IDS_VALUE_UNKNOWN "Unknown" END
STRINGTABLE DISCARDABLE BEGIN IDS_COLHEAD_HOSTNAME "Host Name" IDS_COLHEAD_STATUS "Status" IDS_COLHEAD_IMAGENAME "Image Name" IDS_COLHEAD_PID "PID" IDS_COLHEAD_SESSION "Session#" IDS_COLHEAD_USERNAME "User Name" IDS_COLHEAD_WINDOWTITLE "Window Title" IDS_COLHEAD_CPUTIME "CPU Time" IDS_COLHEAD_MEMUSAGE "Mem Usage" IDS_COLHEAD_SERVICES "Services" IDS_COLHEAD_SESSIONNAME "Session Name" IDS_COLHEAD_MODULES "Modules"
IDS_COLWIDTH_HOSTNAME "16" IDS_COLWIDTH_STATUS "15" IDS_COLWIDTH_IMAGENAME "25" IDS_COLWIDTH_PID "6" IDS_COLWIDTH_SESSION "8" IDS_COLWIDTH_WINDOWTITLE "72" IDS_COLWIDTH_USERNAME "50" IDS_COLWIDTH_CPUTIME "12" IDS_COLWIDTH_MEMUSAGE "12" IDS_COLWIDTH_SERVICES "80" IDS_COLWIDTH_SERVICES_WRAP "45" IDS_COLWIDTH_SESSIONNAME "16" IDS_COLWIDTH_MODULES "80" IDS_COLWIDTH_MODULES_WRAP "45" END
STRINGTABLE DISCARDABLE BEGIN IDS_FILTER_SESSIONNAME "sessionname" IDS_FILTER_STATUS "status" IDS_FILTER_IMAGENAME "imagename" IDS_FILTER_PID "pid" IDS_FILTER_SESSION "session" IDS_FILTER_CPUTIME "cputime" IDS_FILTER_MEMUSAGE "memusage" IDS_FILTER_USERNAME "username" IDS_FILTER_SERVICES "services" IDS_FILTER_WINDOWTITLE "windowtitle" IDS_FILTER_MODULES "modules"
IDS_FVALUES_STATUS "running|not responding|unknown"
IDS_PID_0_DOMAIN "NT AUTHORITY" IDS_PID_0_USERNAME "SYSTEM"
IDS_OPERATORS_STRING " eq | ne " IDS_OPERATORS_NUMERIC " eq | ne | lt | gt | le | ge "
IDS_FMT_MODULES_FILTER "modules eq %s" END
STRINGTABLE DISCARDABLE BEGIN IDS_ERROR_INVALID_USAGE_REQUEST "Invalid syntax.\nType ""TASKLIST /?"" for usage.\n" IDS_ERROR_USERNAME_BUT_NOMACHINE "Invalid syntax. /U can be specified only when /S is specified.\nType ""TASKLIST /?"" for usage.\n" IDS_ERROR_PASSWORD_BUT_NOUSERNAME "Invalid syntax. /P can be specified only when /U is specified.\nType ""TASKLIST /?"" for usage.\n" IDS_ERROR_NODATA_AVAILABLE "INFO: No tasks are running which match the specified criteria.\n" IDS_ERROR_COM_ERROR "%s Error Code: 0x%08lx was returned.\n" IDS_ERROR_USERNAME_EMPTY "Invalid syntax. User name cannot be empty.\n" IDS_ERROR_SERVERNAME_EMPTY "Invalid syntax. System name cannot be empty.\n" IDS_ERROR_NH_NOTSUPPORTED "Invalid syntax. /NH option is allowed only for ""TABLE"" and ""CSV"" formats.\nType ""TASKLIST /?"" for usage.\n" IDS_ERROR_M_SVC_V_CANNOTBECOUPLED "Invalid syntax. /V, /M and /SVC options cannot be used together.\nType ""TASKLIST /?"" for usage.\n" IDS_ERROR_M_CHAR_AFTER_WILDCARD "Invalid syntax. No characters are allowed after '*' for /M option.\nType ""TASKLIST /?"" for usage.\n" IDS_WARNING_FILTERNOTSUPPORTED "\nWARNING: ""WINDOWTITLE"" and ""STATUS"" filters are not supported when querying a remote machine.\n" END
// // Version resources // #include <ntverp.h> #define VER_FILETYPE VFT_APP #define VER_FILESUBTYPE VFT2_UNKNOWN #define VER_FILEDESCRIPTION_STR "Lists the current running tasks" #define VER_INTERNALNAME_STR "tasklist.exe" #define VER_ORIGINALFILENAME_STR "tasklist.exe" #include <common.ver>
|