Leaked source code of windows server 2003
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.

186 lines
10 KiB

  1. #include <windows.h>
  2. #include "resource.h"
  3. #include "cmdlineres.h"
  4. #include "cmdline.rc"
  5. STRINGTABLE DISCARDABLE
  6. BEGIN
  7. IDS_HELP_LINE1 "\nSYSTEMINFO [/S system [/U username [/P [password]]]] [/FO format] [/NH]\n"
  8. IDS_HELP_LINE2 "\n"
  9. IDS_HELP_LINE3 "Description:\n"
  10. IDS_HELP_LINE4 " This tool displays operating system configuration information for\n"
  11. IDS_HELP_LINE5 " a local or remote machine, including service pack levels.\n"
  12. IDS_HELP_LINE6 "\n"
  13. IDS_HELP_LINE7 "Parameter List:\n"
  14. IDS_HELP_LINE8 " /S system Specifies the remote system to connect to.\n\n"
  15. IDS_HELP_LINE9 " /U [domain\\]user Specifies the user context under which\n"
  16. IDS_HELP_LINE10 " the command should execute.\n\n"
  17. IDS_HELP_LINE11 " /P [password] Specifies the password for the given\n"
  18. IDS_HELP_LINE12 " user context. Prompts for input if omitted.\n\n"
  19. IDS_HELP_LINE13 " /FO format Specifies the format in which the output\n"
  20. IDS_HELP_LINE14 " is to be displayed.\n"
  21. IDS_HELP_LINE15 " Valid values: ""TABLE"", ""LIST"", ""CSV"".\n\n"
  22. IDS_HELP_LINE16 " /NH Specifies that the ""Column Header"" should\n"
  23. IDS_HELP_LINE17 " not be displayed in the output.\n"
  24. IDS_HELP_LINE18 " Valid only for ""TABLE"" and ""CSV"" formats.\n\n"
  25. IDS_HELP_LINE19 " /? Displays this help message.\n"
  26. IDS_HELP_LINE20 "\n"
  27. IDS_HELP_LINE21 "Examples:\n"
  28. IDS_HELP_LINE22 " SYSTEMINFO\n"
  29. IDS_HELP_LINE23 " SYSTEMINFO /?\n"
  30. IDS_HELP_LINE24 " SYSTEMINFO /S system\n"
  31. IDS_HELP_LINE25 " SYSTEMINFO /S system /U user\n"
  32. IDS_HELP_LINE26 " SYSTEMINFO /S system /U domain\user /P password /FO TABLE\n"
  33. IDS_HELP_LINE27 " SYSTEMINFO /S system /FO LIST\n"
  34. IDS_HELP_LINE28 " SYSTEMINFO /S system /FO CSV /NH\n"
  35. END
  36. STRINGTABLE DISCARDABLE
  37. BEGIN
  38. IDS_OVALUES_FORMAT "list|table|csv"
  39. IDS_TEXT_FORMAT_LIST "list"
  40. IDS_TEXT_FORMAT_TABLE "table"
  41. IDS_TEXT_FORMAT_CSV "csv"
  42. IDS_MSG_OSINFO "Loading Operating System Information ..."
  43. IDS_MSG_COMPINFO "Loading Computer Information ..."
  44. IDS_MSG_PERFINFO "Loading System Performance Information ..."
  45. IDS_MSG_PROCESSORINFO "Loading Processor Information ..."
  46. IDS_MSG_BIOSINFO "Loading BIOS Information ..."
  47. IDS_MSG_INPUTLOCALEINFO "Loading Input Locale Information ..."
  48. IDS_MSG_TZINFO "Loading TimeZone Information ..."
  49. IDS_MSG_PAGEFILEINFO "Loading Pagefile Information ..."
  50. IDS_MSG_HOTFIXINFO "Loading Hotfix Information ..."
  51. IDS_MSG_NICINFO "Loading Network Card Information ..."
  52. IDS_MSG_PROFILEINFO "Loading Profile Information ..."
  53. IDS_VALUE_STANDALONEWORKSTATION "Standalone Workstation"
  54. IDS_VALUE_MEMBERWORKSTATION "Member Workstation"
  55. IDS_VALUE_STANDALONESERVER "Standalone Server"
  56. IDS_VALUE_MEMBERSERVER "Member Server"
  57. IDS_VALUE_BACKUPDOMAINCONTROLLER "Additional/Backup Domain Controller"
  58. IDS_VALUE_PRIMARYDOMAINCONTROLLER "Primary Domain Controller"
  59. IDS_VALUE_YES "Yes"
  60. IDS_VALUE_NO "No"
  61. IDS_VALUE_DISCONNECTED "Disconnected"
  62. IDS_VALUE_CONNECTING "Connecting ..."
  63. IDS_VALUE_CONNECTED "Connected"
  64. IDS_VALUE_DISCONNECTING "Disconnecting ..."
  65. IDS_VALUE_HWNOTPRESENT "Hardware not present"
  66. IDS_VALUE_HWDISABLED "Hardware disabled"
  67. IDS_VALUE_HWMALFUNCTION "Hardware malfunction"
  68. IDS_VALUE_MEDIADISCONNECTED "Media disconnected"
  69. IDS_VALUE_AUTHENTICATING "Authenticating ..."
  70. IDS_VALUE_AUTHSUCCEEDED "Authentication succeeded"
  71. IDS_VALUE_AUTHFAILED "Authentication failed"
  72. IDS_FMT_KILOBYTES "%s K"
  73. IDS_FMT_UPTIME "%d Days, %d Hours, %d Minutes, %d Seconds"
  74. IDS_FMT_OSVERSION "%s Build %s"
  75. IDS_FMT_MEGABYTES "%s MB"
  76. IDS_FMT_PROCESSOR_TOTAL "%d Processor(s) Installed."
  77. IDS_FMT_PROCESSOR_INFO "[%02d]: %s %s ~%d Mhz"
  78. IDS_FMT_NIC_TOTAL "%d NIC(s) Installed."
  79. IDS_FMT_NIC_INFO "[%02d]: %s"
  80. IDS_FMT_CONNECTION " Connection Name: %s"
  81. IDS_FMT_NIC_STATUS " Status: %s"
  82. IDS_FMT_DHCP_STATUS " DHCP Enabled: %s"
  83. IDS_FMT_DHCP_SERVER " DHCP Server: %s"
  84. IDS_FMT_IPADDRESS_TOTAL " IP address(es)"
  85. IDS_FMT_IPADDRESS_INFO " [%02d]: %s"
  86. IDS_FMT_HOTFIX_INFO "[%02d]: %s"
  87. IDS_FMT_HOTFIX_TOTAL "%d Hotfix(s) Installed."
  88. END
  89. STRINGTABLE DISCARDABLE
  90. BEGIN
  91. IDS_COLHEAD_HOSTNAME "Host Name"
  92. IDS_COLHEAD_OS_NAME "OS Name"
  93. IDS_COLHEAD_OS_VERSION "OS Version"
  94. IDS_COLHEAD_OS_MANUFACTURER "OS Manufacturer"
  95. IDS_COLHEAD_OS_CONFIG "OS Configuration"
  96. IDS_COLHEAD_OS_BUILDTYPE "OS Build Type"
  97. IDS_COLHEAD_REG_OWNER "Registered Owner"
  98. IDS_COLHEAD_REG_ORG "Registered Organization"
  99. IDS_COLHEAD_PRODUCT_ID "Product ID"
  100. IDS_COLHEAD_INSTALL_DATE "Original Install Date"
  101. IDS_COLHEAD_SYSTEM_UPTIME "System Up Time"
  102. IDS_COLHEAD_SYSTEM_MANUFACTURER "System Manufacturer"
  103. IDS_COLHEAD_SYSTEM_MODEL "System Model"
  104. IDS_COLHEAD_SYSTEM_TYPE "System Type"
  105. IDS_COLHEAD_PROCESSOR "Processor(s)"
  106. IDS_COLHEAD_BIOS_VERSION "BIOS Version"
  107. IDS_COLHEAD_WINDOWS_DIRECTORY "Windows Directory"
  108. IDS_COLHEAD_SYSTEM_DIRECTORY "System Directory"
  109. IDS_COLHEAD_BOOT_DEVICE "Boot Device"
  110. IDS_COLHEAD_SYSTEM_LOCALE "System Locale"
  111. IDS_COLHEAD_INPUT_LOCALE "Input Locale"
  112. IDS_COLHEAD_TIME_ZONE "Time Zone"
  113. IDS_COLHEAD_TOTAL_PHYSICAL_MEMORY "Total Physical Memory"
  114. IDS_COLHEAD_AVAILABLE_PHYSICAL_MEMORY "Available Physical Memory"
  115. IDS_COLHEAD_VIRTUAL_MEMORY_MAX "Page File: Max Size"
  116. IDS_COLHEAD_VIRTUAL_MEMORY_AVAILABLE "Page File: Available"
  117. IDS_COLHEAD_VIRTUAL_MEMORY_INUSE "Page File: In Use"
  118. IDS_COLHEAD_PAGEFILE_LOCATION "Page File Location(s)"
  119. IDS_COLHEAD_DOMAIN "Domain"
  120. IDS_COLHEAD_LOGON_SERVER "Logon Server"
  121. IDS_COLHEAD_HOTFIX "Hotfix(s)"
  122. IDS_COLHEAD_NETWORK_CARD "Network Card(s)"
  123. IDS_COLWIDTH_HOSTNAME "30"
  124. IDS_COLWIDTH_OS_NAME "30"
  125. IDS_COLWIDTH_OS_VERSION "30"
  126. IDS_COLWIDTH_OS_MANUFACTURER "40"
  127. IDS_COLWIDTH_OS_CONFIG "40"
  128. IDS_COLWIDTH_OS_BUILDTYPE "20"
  129. IDS_COLWIDTH_REG_OWNER "50"
  130. IDS_COLWIDTH_REG_ORG "50"
  131. IDS_COLWIDTH_PRODUCT_ID "30"
  132. IDS_COLWIDTH_INSTALL_DATE "25"
  133. IDS_COLWIDTH_SYSTEM_UPTIME "30"
  134. IDS_COLWIDTH_SYSTEM_MANUFACTURER "30"
  135. IDS_COLWIDTH_SYSTEM_MODEL "20"
  136. IDS_COLWIDTH_SYSTEM_TYPE "25"
  137. IDS_COLWIDTH_PROCESSOR "45"
  138. IDS_COLWIDTH_BIOS_VERSION "30"
  139. IDS_COLWIDTH_WINDOWS_DIRECTORY "20"
  140. IDS_COLWIDTH_SYSTEM_DIRECTORY "20"
  141. IDS_COLWIDTH_BOOT_DEVICE "35"
  142. IDS_COLWIDTH_SYSTEM_LOCALE "35"
  143. IDS_COLWIDTH_INPUT_LOCALE "35"
  144. IDS_COLWIDTH_TIME_ZONE "50"
  145. IDS_COLWIDTH_TOTAL_PHYSICAL_MEMORY "25"
  146. IDS_COLWIDTH_AVAILABLE_PHYSICAL_MEMORY "25"
  147. IDS_COLWIDTH_VIRTUAL_MEMORY_MAX "25"
  148. IDS_COLWIDTH_VIRTUAL_MEMORY_AVAILABLE "25"
  149. IDS_COLWIDTH_VIRTUAL_MEMORY_INUSE "25"
  150. IDS_COLWIDTH_PAGEFILE_LOCATION "30"
  151. IDS_COLWIDTH_DOMAIN "20"
  152. IDS_COLWIDTH_LOGON_SERVER "20"
  153. IDS_COLWIDTH_HOTFIX "20"
  154. IDS_COLWIDTH_NETWORK_CARD "100"
  155. END
  156. STRINGTABLE DISCARDABLE
  157. BEGIN
  158. IDS_ERROR_INVALID_USAGE_REQUEST "Invalid syntax.\nType ""SYSTEMINFO /?"" for usage.\n"
  159. IDS_ERROR_USERNAME_BUT_NOMACHINE "Invalid syntax. /U can be specified only when /S is specified.\nType ""SYSTEMINFO /?"" for usage.\n"
  160. IDS_ERROR_PASSWORD_BUT_NOUSERNAME "Invalid syntax. /P can be specified only when /U is specified.\nType ""SYSTEMINFO /?"" for usage.\n"
  161. IDS_ERROR_COM_ERROR "%s Error Code: 0x%08lx was returned\n"
  162. IDS_ERROR_USERNAME_EMPTY "Invalid syntax. User name cannot be empty.\n"
  163. IDS_ERROR_SERVERNAME_EMPTY "Invalid syntax. System name cannot be empty.\n"
  164. IDS_ERROR_NH_NOTSUPPORTED "Invalid syntax. /NH option is allowed only for ""TABLE"" and ""CSV"" formats.\nType ""SYSTEMINFO /?"" for usage.\n"
  165. END
  166. //
  167. // Version resources
  168. //
  169. #include <ntverp.h>
  170. #define VER_FILETYPE VFT_APP
  171. #define VER_FILESUBTYPE VFT2_UNKNOWN
  172. #define VER_FILEDESCRIPTION_STR "Displays system information"
  173. #define VER_INTERNALNAME_STR "systeminfo.exe"
  174. #define VER_ORIGINALFILENAME_STR "sysinfo.exe"
  175. #include <common.ver>