179 lines
8.5 KiB
Plaintext
179 lines
8.5 KiB
Plaintext
#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 command line tool displays a list of application(s) and \n"
|
|
IDS_HELP_LINE6 " associated task(s)/process(es) currently running on either a local or \n"
|
|
IDS_HELP_LINE7 " remote system.\n"
|
|
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 that have DLL modules loaded\n"
|
|
IDS_HELP_LINE16 " in them that match the given pattern name.\n"
|
|
IDS_HELP_LINE17 " If the module name is not specified,\n"
|
|
IDS_HELP_LINE18 " displays all modules loaded by each task.\n\n"
|
|
IDS_HELP_LINE19 " /SVC Displays services in each process.\n\n"
|
|
IDS_HELP_LINE20 " /V Specifies that the verbose information\n"
|
|
IDS_HELP_LINE21 " is to be displayed.\n\n"
|
|
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/usage.\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 | NOT RESPONDING\n"
|
|
IDS_HELP_LINE35 " IMAGENAME eq, ne Image name\n"
|
|
IDS_HELP_LINE36 " PID eq, ne, gt, lt, ge, le PID value\n"
|
|
IDS_HELP_LINE37 " SESSION eq, ne, gt, lt, ge, le Session number\n"
|
|
IDS_HELP_LINE38 " SESSIONNAME eq, ne Session name\n"
|
|
IDS_HELP_LINE39 " CPUTIME eq, ne, gt, lt, ge, le CPU time in the format\n"
|
|
IDS_HELP_LINE40 " of hh:mm:ss.\n"
|
|
IDS_HELP_LINE41 " hh - hours,\n"
|
|
IDS_HELP_LINE42 " mm - minutes, ss - seconds\n"
|
|
IDS_HELP_LINE43 " MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB\n"
|
|
IDS_HELP_LINE44 " USERNAME eq, ne User name in [domain\\]user\n"
|
|
IDS_HELP_LINE45 " format\n"
|
|
IDS_HELP_LINE46 " SERVICES eq, ne Service name\n"
|
|
IDS_HELP_LINE47 " WINDOWTITLE eq, ne Window title\n"
|
|
IDS_HELP_LINE48 " MODULES eq, ne DLL name\n"
|
|
IDS_HELP_LINE49 "\n"
|
|
IDS_HELP_LINE50 "Examples:\n"
|
|
IDS_HELP_LINE51 " TASKLIST\n"
|
|
IDS_HELP_LINE52 " TASKLIST /M\n"
|
|
IDS_HELP_LINE53 " TASKLIST /V\n"
|
|
IDS_HELP_LINE54 " TASKLIST /SVC\n"
|
|
IDS_HELP_LINE55 " TASKLIST /M wbem*\n"
|
|
IDS_HELP_LINE56 " TASKLIST /S system /FO LIST\n"
|
|
IDS_HELP_LINE57 " TASKLIST /S system /U domain\\username /FO CSV /NH\n"
|
|
IDS_HELP_LINE58 " TASKLIST /S system /U username /P password /FO TABLE /NH\n"
|
|
IDS_HELP_LINE59 " 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"
|
|
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"
|
|
|
|
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 running with the specified criteria.\n"
|
|
IDS_ERROR_COM_ERROR "%s Error Code: 0x%08lx\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 coupled.\nType ""TASKLIST /?"" for usage.\n"
|
|
IDS_ERROR_M_CHAR_AFTER_WILDCARD "Invalid Syntax. No characters were allowed after '*' for /M option.\nType ""TASKLIST /?"" for usage.\n"
|
|
END
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_MSG_TASKSINFO "Loading the tasks information ..."
|
|
IDS_MSG_MODULESINFO "Loading the modules information. Please Wait. This may take few minutes ..."
|
|
IDS_MSG_MODULESINFO_EX "Loading the modules information ( PID = %u ) ..."
|
|
IDS_MSG_SERVICESINFO "Loading the services information ..."
|
|
END
|
|
|
|
//
|
|
// Version resources
|
|
//
|
|
#include <ntverp.h>
|
|
#define VER_FILETYPE VFT_APP
|
|
#define VER_FILESUBTYPE VFT2_UNKNOWN
|
|
#define VER_FILEDESCRIPTION_STR "Task List"
|
|
#define VER_INTERNALNAME_STR "TaskList.exe"
|
|
#define VER_ORIGINALFILENAME_STR "TaskList.exe"
|
|
#include <common.ver>
|