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.
159 lines
7.8 KiB
159 lines
7.8 KiB
#include <windows.h>
|
|
#include "resource.h"
|
|
|
|
#include "cmdlineres.h"
|
|
#include "cmdline.rc"
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// String Table
|
|
//
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_ERROR_USERNAME_BUT_NOMACHINE "ERROR: Invalid syntax. /U cannot be specified without specifying /S.\nType ""DRIVERQUERY /?"" for usage.\n"
|
|
IDS_ERROR_PASSWORD_BUT_NOUSERNAME "ERROR: Invalid syntax. /P cannot be specified without specifying /U.\nType ""DRIVERQUERY /?"" for usage.\n"
|
|
IDS_ERROR_COM_INTIALIZE "ERROR: Failed to initialize COM library.\n"
|
|
IDS_ERROR_COM_SECURITY_INITIALIZE "ERROR: Failed to initialize security.\n"
|
|
IDS_ERROR_COM_ENUMERATE_INSTANCE "ERROR: Unable to retrieve information.\n "
|
|
IDS_ERROR_CONNECT "ERROR: Failed to connect to specified system.\n"
|
|
IDS_INVALID_SYNTAX "ERROR: Invalid syntax.\nType ""DRIVERQUERY /?"" for usage.\n"
|
|
IDS_ERROR_RETREIVE_INFO "ERROR: Access is denied.\n"
|
|
IDS_WMI_CREDENTIALS "ERROR: Could not connect to the WMI server with the given credentials\n"
|
|
IDS_INVALID_CREDENTIALS "ERROR: Could not connect to the specified system with the given credentials.\n"
|
|
IDS_ERROR_INVALID_FORMAT "ERROR: Invalid format specified.\nType ""DRIVERQUERY /?"" for usage.\n"
|
|
IDS_ALLOC_FAILURE "ERROR: Failed to allocate memory.\n "
|
|
IDS_ERROR_AUTHENTICATION_FAILURE "ERROR: Access denied.\n\n"
|
|
IDS_ERROR_LOCAL_CRED "ERROR: User credentials not needed for local connection.\n"
|
|
IDS_ERROR_WMI_FAILURE "ERROR: Unable to retrieve information.\n"
|
|
IDS_INVALID_SIGNED_SYNTAX "ERROR: Invalid syntax. The verbose option is invalid for signed drivers.\n "
|
|
IDS_ERROR_GET "ERROR: Could not retrieve information due to version mismatch.\n"
|
|
IDS_NO_HEADERS "ERROR: Invalid syntax. /NH option is valid only for ""TABLE"" and ""CSV"" format.\nType ""DRIVERQUERY /?"" for usage.\n"
|
|
IDS_INVALID_SERVER "ERROR: Invalid syntax. System name cannot be empty.\nType ""DRIVERQUERY /?"" for usage.\n"
|
|
IDS_INVALID_USER "ERROR: Invalid syntax. User name cannot be empty.\nType ""DRIVERQUERY /?"" for usage.\n"
|
|
IDS_ERROR_TAG "ERROR: "
|
|
IDS_VERSION_MISMATCH_ERROR "ERROR: /SI option will work only for Windows XP or above.\n"
|
|
IDS_MORE_INSTANCES_SIGNEDDRIVERS "INFO: DriverQuery /SI cannot run simultaneously in more than one instance.\n"
|
|
|
|
END
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_INPUT_PASSWORD "Type the password for %s: "
|
|
IDS_FORMAT_LIST "LIST"
|
|
IDS_FORMAT_TABLE "TABLE"
|
|
IDS_FORMAT_CSV "CSV"
|
|
END
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_NO_DRIVERS_FOUND "INFO: No driver information found.\n"
|
|
END
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_WARNING_TAG "WARNING: "
|
|
IDS_IGNORE_LOCAL_CRED "WARNING: Ignoring the user credentials for the local connection.\n"
|
|
END
|
|
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_COL_HOSTNAME "HostName"
|
|
IDS_COL_FILENAME "Module Name"
|
|
IDS_COL_SIGNED "Signed"
|
|
IDS_COL_DISPLAYNAME "Display Name"
|
|
IDS_COL_DESCRIPTION "Description"
|
|
IDS_COL_DRIVERTYPE "Driver Type"
|
|
IDS_COL_STARTMODE "Start Mode"
|
|
IDS_COL_STATE "State"
|
|
IDS_COL_STATUS "Status"
|
|
IDS_COL_ACCEPTSTOP "Accept Stop"
|
|
IDS_COL_ACCEPTPAUSE "Accept Pause"
|
|
IDS_COL_MEMORYUSAGE "MemoryUsage(bytes)"
|
|
IDS_COL_PAGEDPOOL "Paged Pool(bytes)"
|
|
IDS_COL_NONPAGEDPOOL "NonPaged Pool(bytes)"
|
|
IDS_COL_EXECCODE "Code(bytes)"
|
|
IDS_COL_NBSS "Image:Non-BlockStorageSegment:(bytes)"
|
|
IDS_COL_BSS "BSS(bytes)"
|
|
IDS_COL_LINKDATE "Link Date"
|
|
IDS_COL_INITSIZE "Init(bytes)"
|
|
IDS_COL_PAGESIZE "Paged"
|
|
IDS_COL_LOCATION "Path"
|
|
IDS_COL_DEVICENAME "DeviceName"
|
|
IDS_COL_INF_NAME "InfName"
|
|
IDS_COL_ISSIGNED "IsSigned"
|
|
IDS_COL_MANUFACTURER "Manufacturer"
|
|
IDS_DRIVER_TAG "Driver"
|
|
END
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_COL_HOSTNAME_SIZE "9"
|
|
IDS_COL_FILENAME_SIZE "12"
|
|
IDS_SIGNED_SIZE "20"
|
|
IDS_COL_DISPLAYNAME_SIZE "22"
|
|
IDS_COL_DESCRIPTION_SIZE "22"
|
|
IDS_COL_DRIVERTYPE_SIZE "13"
|
|
IDS_COL_STARTMODE_SIZE "10"
|
|
IDS_COL_STATE_SIZE "10"
|
|
IDS_COL_STATUS_SIZE "10"
|
|
IDS_COL_ACCEPTSTOP_SIZE "11"
|
|
IDS_COL_ACCEPTPAUSE_SIZE "12"
|
|
IDS_COL_MEMORYUSAGE_SIZE "16"
|
|
IDS_COL_PAGEDPOOL_SIZE "10"
|
|
IDS_COL_NONPAGEDPOOL_SIZE "10"
|
|
IDS_COL_EXECCODE_SIZE "10"
|
|
IDS_COL_NBSS_SIZE "10"
|
|
IDS_COL_BSS_SIZE "6"
|
|
IDS_COL_LINKDATE_SIZE "22"
|
|
IDS_COL_LOCATION_SIZE "48"
|
|
IDS_COL_INITSIZE_SIZE "10"
|
|
IDS_COL_PAGESIZE_SIZE "10"
|
|
IDS_COL_DEVICE_WIDTH "30"
|
|
IDS_COL_INF_WIDTH "13"
|
|
IDS_COL_ISSIGNED_WIDTH "8"
|
|
IDS_COL_MANUFACTURER_WIDTH "25"
|
|
END
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_USAGEBEGIN1 "\nDRIVERQUERY [/S system [/U username [/P [password]]]]\n"
|
|
IDS_STRING81 " [/FO format] [/NH] [/SI] [/V] \nDescription:\n"
|
|
IDS_STRING82 " Enables an administrator to display a list of \n"
|
|
IDS_STRING83 " installed device drivers.\n\n"
|
|
IDS_STRING84 "Parameter List:\n"
|
|
IDS_STRING85 " /S system Specifies the remote system to connect to.\n\n"
|
|
IDS_STRING86 " /U [domain\\]user Specifies the user context \n"
|
|
IDS_STRING87 " under which the command should execute.\n\n"
|
|
IDS_STRING88 " /P [password] Specify the password for the given \n"
|
|
IDS_STRING89 " user context.\n\n"
|
|
IDS_STRING90 " /FO format Specifies the type of output to display.\n"
|
|
IDS_STRING91 " Valid values to be passed with the\n"
|
|
IDS_STRING92 " switch are ""TABLE"", ""LIST"", ""CSV"".\n\n"
|
|
IDS_STRING93 " /NH Specifies that the ""Column Header"" \n"
|
|
IDS_STRING94 " should not be displayed. Valid for \n"
|
|
IDS_STRING95 " ""TABLE"" and ""CSV"" format only.\n\n"
|
|
IDS_STRING96 ""
|
|
IDS_STRING97 " /SI Provides information about signed drivers.\n\n"
|
|
IDS_STRING98 " /V Displays verbose output. Not valid \n"
|
|
IDS_STRING99 " for signed drivers.\n\n"
|
|
IDS_STRING100 " /? Displays this help message.\n\n"
|
|
IDS_STRING101 "Examples:\n"
|
|
IDS_STRING102 " DRIVERQUERY\n"
|
|
IDS_STRING103 " DRIVERQUERY /FO CSV /SI\n"
|
|
IDS_STRING104 " DRIVERQUERY /NH\n"
|
|
IDS_STRING105 " DRIVERQUERY /S ipaddress /U user /V \n"
|
|
IDS_USAGEEND1 " DRIVERQUERY /S system /U domain\\user /P password /FO LIST\n"
|
|
END
|
|
|
|
//
|
|
// Version resources
|
|
//
|
|
#include <ntverp.h>
|
|
#define VER_FILETYPE VFT_APP
|
|
#define VER_FILESUBTYPE VFT2_UNKNOWN
|
|
#define VER_FILEDESCRIPTION_STR "Queries the drivers on a system"
|
|
#define VER_INTERNALNAME_STR "driverquery.exe"
|
|
#define VER_ORIGINALFILENAME_STR "drvqry.exe"
|
|
#include <common.ver>
|