161 lines
7.3 KiB
Plaintext
161 lines
7.3 KiB
Plaintext
|
#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 or Invalid credentials specified.\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 is passing user credential on local connection.\n"
|
||
|
IDS_ERROR_WMI_FAILURE "ERROR: Unable to retrieve Information.\n"
|
||
|
IDS_INVALID_SIGNED_SYNTAX "ERROR: Invalid Syntax. Verbose Option invalid for signed drivers.\n "
|
||
|
IDS_ERROR_GET "ERROR: Could not retreive 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"
|
||
|
END
|
||
|
|
||
|
STRINGTABLE DISCARDABLE
|
||
|
BEGIN
|
||
|
IDS_INPUT_PASSWORD "Type the password for %s: "
|
||
|
IDS_FORMAT_LIST "LIST"
|
||
|
IDS_FORMAT_TABLE "TABLE"
|
||
|
IDS_FORMAT_CSV "CSV"
|
||
|
IDS_FORMAT_VALUES "list|csv|table"
|
||
|
END
|
||
|
|
||
|
STRINGTABLE DISCARDABLE
|
||
|
BEGIN
|
||
|
IDS_NO_DRIVERS_FOUND "INFO: No drivers 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 "20"
|
||
|
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 enumerate and display the list of \n"
|
||
|
IDS_STRING83 " installed device drivers as well as their properties.\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. Prompts for input if omitted.\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 in the\n"
|
||
|
IDS_STRING95 " screen output. Valid for ""TABLE"" \n"
|
||
|
IDS_STRING96 " and ""CSV"" format only.\n\n"
|
||
|
IDS_STRING97 " /V Displays detailed information. Not valid \n"
|
||
|
IDS_STRING98 " for signed drivers.\n\n"
|
||
|
IDS_STRING99 " /SI Provides information about signed drivers.\n\n"
|
||
|
IDS_STRING100 " /? Displays this Help/Usage.\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 "Driver Query"
|
||
|
#define VER_INTERNALNAME_STR "DriverQuery.exe"
|
||
|
#define VER_ORIGINALFILENAME_STR "DrvQry.exe"
|
||
|
#include <common.ver>
|
||
|
|