187 lines
9.9 KiB
Plaintext
187 lines
9.9 KiB
Plaintext
#include <windows.h>
|
|
#include "resource.h"
|
|
|
|
#include "cmdlineres.h"
|
|
#include "cmdline.rc"
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_HELP_LINE1 "\nSYSTEMINFO [/S system [/U username [/P [password]]]] [/FO format] [/NH]\n"
|
|
IDS_HELP_LINE2 "\n"
|
|
IDS_HELP_LINE3 "Description:\n"
|
|
IDS_HELP_LINE4 " This tool displays operating system configuration information for\n"
|
|
IDS_HELP_LINE5 " a local or remote machine, including service pack levels.\n"
|
|
IDS_HELP_LINE6 "\n"
|
|
IDS_HELP_LINE7 "Parameter List:\n"
|
|
IDS_HELP_LINE8 " /S system Specifies the remote system to connect to.\n\n"
|
|
IDS_HELP_LINE9 " /U [domain\\]user Specifies the user context under which\n"
|
|
IDS_HELP_LINE10 " the command should execute.\n\n"
|
|
IDS_HELP_LINE11 " /P [password] Specifies the password for the given\n"
|
|
IDS_HELP_LINE12 " user context. Prompts for input if omitted.\n\n"
|
|
IDS_HELP_LINE13 " /FO format Specifies the format in which the output\n"
|
|
IDS_HELP_LINE14 " is to be displayed.\n"
|
|
IDS_HELP_LINE15 " Valid values: ""TABLE"", ""LIST"", ""CSV"".\n\n"
|
|
IDS_HELP_LINE16 " /NH Specifies that the ""Column Header"" should\n"
|
|
IDS_HELP_LINE17 " not be displayed in the output.\n"
|
|
IDS_HELP_LINE18 " Valid only for ""TABLE"" and ""CSV"" formats.\n\n"
|
|
IDS_HELP_LINE19 " /? Displays this help message.\n"
|
|
IDS_HELP_LINE20 "\n"
|
|
IDS_HELP_LINE21 "Examples:\n"
|
|
IDS_HELP_LINE22 " SYSTEMINFO\n"
|
|
IDS_HELP_LINE23 " SYSTEMINFO /?\n"
|
|
IDS_HELP_LINE24 " SYSTEMINFO /S system\n"
|
|
IDS_HELP_LINE25 " SYSTEMINFO /S system /U user\n"
|
|
IDS_HELP_LINE26 " SYSTEMINFO /S system /U domain\user /P password /FO TABLE\n"
|
|
IDS_HELP_LINE27 " SYSTEMINFO /S system /FO LIST\n"
|
|
IDS_HELP_LINE28 " SYSTEMINFO /S system /FO CSV /NH\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"
|
|
|
|
IDS_MSG_OSINFO "Loading Operating System Information ..."
|
|
IDS_MSG_COMPINFO "Loading Computer Information ..."
|
|
IDS_MSG_PERFINFO "Loading System Performance Information ..."
|
|
IDS_MSG_PROCESSORINFO "Loading Processor Information ..."
|
|
IDS_MSG_BIOSINFO "Loading BIOS Information ..."
|
|
IDS_MSG_INPUTLOCALEINFO "Loading Input Locale Information ..."
|
|
IDS_MSG_TZINFO "Loading TimeZone Information ..."
|
|
IDS_MSG_PAGEFILEINFO "Loading Pagefile Information ..."
|
|
IDS_MSG_HOTFIXINFO "Loading Hotfix Information ..."
|
|
IDS_MSG_NICINFO "Loading Network Card Information ..."
|
|
IDS_MSG_PROFILEINFO "Loading Profile Information ..."
|
|
|
|
IDS_VALUE_STANDALONEWORKSTATION "Standalone Workstation"
|
|
IDS_VALUE_MEMBERWORKSTATION "Member Workstation"
|
|
IDS_VALUE_STANDALONESERVER "Standalone Server"
|
|
IDS_VALUE_MEMBERSERVER "Member Server"
|
|
IDS_VALUE_BACKUPDOMAINCONTROLLER "Additional/Backup Domain Controller"
|
|
IDS_VALUE_PRIMARYDOMAINCONTROLLER "Primary Domain Controller"
|
|
|
|
IDS_VALUE_YES "Yes"
|
|
IDS_VALUE_NO "No"
|
|
IDS_VALUE_DISCONNECTED "Disconnected"
|
|
IDS_VALUE_CONNECTING "Connecting ..."
|
|
IDS_VALUE_CONNECTED "Connected"
|
|
IDS_VALUE_DISCONNECTING "Disconnecting ..."
|
|
IDS_VALUE_HWNOTPRESENT "Hardware not present"
|
|
IDS_VALUE_HWDISABLED "Hardware disabled"
|
|
IDS_VALUE_HWMALFUNCTION "Hardware malfunction"
|
|
IDS_VALUE_MEDIADISCONNECTED "Media disconnected"
|
|
IDS_VALUE_AUTHENTICATING "Authenticating ..."
|
|
IDS_VALUE_AUTHSUCCEEDED "Authentication succeeded"
|
|
IDS_VALUE_AUTHFAILED "Authentication failed"
|
|
|
|
IDS_FMT_KILOBYTES "%s K"
|
|
IDS_FMT_UPTIME "%d Days, %d Hours, %d Minutes, %d Seconds"
|
|
IDS_FMT_OSVERSION "%s Build %s"
|
|
IDS_FMT_MEGABYTES "%s MB"
|
|
IDS_FMT_PROCESSOR_TOTAL "%d Processor(s) Installed."
|
|
IDS_FMT_PROCESSOR_INFO "[%02d]: %s %s ~%d Mhz"
|
|
IDS_FMT_NIC_TOTAL "%d NIC(s) Installed."
|
|
IDS_FMT_NIC_INFO "[%02d]: %s"
|
|
IDS_FMT_CONNECTION " Connection Name: %s"
|
|
IDS_FMT_NIC_STATUS " Status: %s"
|
|
IDS_FMT_DHCP_STATUS " DHCP Enabled: %s"
|
|
IDS_FMT_DHCP_SERVER " DHCP Server: %s"
|
|
IDS_FMT_IPADDRESS_TOTAL " IP address(es)"
|
|
IDS_FMT_IPADDRESS_INFO " [%02d]: %s"
|
|
IDS_FMT_HOTFIX_INFO "[%02d]: %s"
|
|
IDS_FMT_HOTFIX_TOTAL "%d Hotfix(s) Installed."
|
|
END
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_COLHEAD_HOSTNAME "Host Name"
|
|
IDS_COLHEAD_OS_NAME "OS Name"
|
|
IDS_COLHEAD_OS_VERSION "OS Version"
|
|
IDS_COLHEAD_OS_MANUFACTURER "OS Manufacturer"
|
|
IDS_COLHEAD_OS_CONFIG "OS Configuration"
|
|
IDS_COLHEAD_OS_BUILDTYPE "OS Build Type"
|
|
IDS_COLHEAD_REG_OWNER "Registered Owner"
|
|
IDS_COLHEAD_REG_ORG "Registered Organization"
|
|
IDS_COLHEAD_PRODUCT_ID "Product ID"
|
|
IDS_COLHEAD_INSTALL_DATE "Original Install Date"
|
|
IDS_COLHEAD_SYSTEM_UPTIME "System Up Time"
|
|
IDS_COLHEAD_SYSTEM_MANUFACTURER "System Manufacturer"
|
|
IDS_COLHEAD_SYSTEM_MODEL "System Model"
|
|
IDS_COLHEAD_SYSTEM_TYPE "System Type"
|
|
IDS_COLHEAD_PROCESSOR "Processor(s)"
|
|
IDS_COLHEAD_BIOS_VERSION "BIOS Version"
|
|
IDS_COLHEAD_WINDOWS_DIRECTORY "Windows Directory"
|
|
IDS_COLHEAD_SYSTEM_DIRECTORY "System Directory"
|
|
IDS_COLHEAD_BOOT_DEVICE "Boot Device"
|
|
IDS_COLHEAD_SYSTEM_LOCALE "System Locale"
|
|
IDS_COLHEAD_INPUT_LOCALE "Input Locale"
|
|
IDS_COLHEAD_TIME_ZONE "Time Zone"
|
|
IDS_COLHEAD_TOTAL_PHYSICAL_MEMORY "Total Physical Memory"
|
|
IDS_COLHEAD_AVAILABLE_PHYSICAL_MEMORY "Available Physical Memory"
|
|
IDS_COLHEAD_VIRTUAL_MEMORY_MAX "Page File: Max Size"
|
|
IDS_COLHEAD_VIRTUAL_MEMORY_AVAILABLE "Page File: Available"
|
|
IDS_COLHEAD_VIRTUAL_MEMORY_INUSE "Page File: In Use"
|
|
IDS_COLHEAD_PAGEFILE_LOCATION "Page File Location(s)"
|
|
IDS_COLHEAD_DOMAIN "Domain"
|
|
IDS_COLHEAD_LOGON_SERVER "Logon Server"
|
|
IDS_COLHEAD_HOTFIX "Hotfix(s)"
|
|
IDS_COLHEAD_NETWORK_CARD "Network Card(s)"
|
|
|
|
IDS_COLWIDTH_HOSTNAME "30"
|
|
IDS_COLWIDTH_OS_NAME "30"
|
|
IDS_COLWIDTH_OS_VERSION "30"
|
|
IDS_COLWIDTH_OS_MANUFACTURER "40"
|
|
IDS_COLWIDTH_OS_CONFIG "40"
|
|
IDS_COLWIDTH_OS_BUILDTYPE "20"
|
|
IDS_COLWIDTH_REG_OWNER "50"
|
|
IDS_COLWIDTH_REG_ORG "50"
|
|
IDS_COLWIDTH_PRODUCT_ID "30"
|
|
IDS_COLWIDTH_INSTALL_DATE "25"
|
|
IDS_COLWIDTH_SYSTEM_UPTIME "30"
|
|
IDS_COLWIDTH_SYSTEM_MANUFACTURER "30"
|
|
IDS_COLWIDTH_SYSTEM_MODEL "20"
|
|
IDS_COLWIDTH_SYSTEM_TYPE "25"
|
|
IDS_COLWIDTH_PROCESSOR "45"
|
|
IDS_COLWIDTH_BIOS_VERSION "30"
|
|
IDS_COLWIDTH_WINDOWS_DIRECTORY "20"
|
|
IDS_COLWIDTH_SYSTEM_DIRECTORY "20"
|
|
IDS_COLWIDTH_BOOT_DEVICE "35"
|
|
IDS_COLWIDTH_SYSTEM_LOCALE "35"
|
|
IDS_COLWIDTH_INPUT_LOCALE "35"
|
|
IDS_COLWIDTH_TIME_ZONE "50"
|
|
IDS_COLWIDTH_TOTAL_PHYSICAL_MEMORY "25"
|
|
IDS_COLWIDTH_AVAILABLE_PHYSICAL_MEMORY "25"
|
|
IDS_COLWIDTH_VIRTUAL_MEMORY_MAX "25"
|
|
IDS_COLWIDTH_VIRTUAL_MEMORY_AVAILABLE "25"
|
|
IDS_COLWIDTH_VIRTUAL_MEMORY_INUSE "25"
|
|
IDS_COLWIDTH_PAGEFILE_LOCATION "30"
|
|
IDS_COLWIDTH_DOMAIN "20"
|
|
IDS_COLWIDTH_LOGON_SERVER "20"
|
|
IDS_COLWIDTH_HOTFIX "20"
|
|
IDS_COLWIDTH_NETWORK_CARD "100"
|
|
END
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_ERROR_INVALID_USAGE_REQUEST "Invalid syntax.\nType ""SYSTEMINFO /?"" for usage.\n"
|
|
IDS_ERROR_USERNAME_BUT_NOMACHINE "Invalid syntax. /U can be specified only when /S is specified.\nType ""SYSTEMINFO /?"" for usage.\n"
|
|
IDS_ERROR_PASSWORD_BUT_NOUSERNAME "Invalid syntax. /P can be specified only when /U is specified.\nType ""SYSTEMINFO /?"" for usage.\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 ""SYSTEMINFO /?"" for usage.\n"
|
|
END
|
|
|
|
//
|
|
// Version resources
|
|
//
|
|
#include <ntverp.h>
|
|
#define VER_FILETYPE VFT_APP
|
|
#define VER_FILESUBTYPE VFT2_UNKNOWN
|
|
#define VER_FILEDESCRIPTION_STR "Displays system information"
|
|
#define VER_INTERNALNAME_STR "systeminfo.exe"
|
|
#define VER_ORIGINALFILENAME_STR "sysinfo.exe"
|
|
#include <common.ver>
|