Source code of Windows XP (NT5)
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.

325 lines
10 KiB

  1. #include "netsh.h"
  2. #include "strdefs.h"
  3. STRINGTABLE
  4. {
  5. MSG_NULL, ""
  6. MSG_OKAY, "Ok.\n"
  7. //
  8. // Error messages
  9. //
  10. ERROR_INVALID_SYNTAX, "\
  11. The syntax supplied for this command is not valid. Check help for the correct syntax.\n"
  12. ERROR_PROTOCOL_NOT_IN_TRANSPORT, "\
  13. First, add the protocol to the transport, and then add it to the interface.\n"
  14. ERROR_NO_CHANGE, "\
  15. No change was made.\n"
  16. ERROR_CMD_NOT_FOUND, "\
  17. The following command was not found: %1!s!.\n"
  18. ERROR_ENTRY_PT_NOT_FOUND, "\
  19. The following entry point is not available in the helper: %1!s!.\n"
  20. ERROR_DLL_LOAD_FAILED, "\
  21. The following helper DLL cannot be loaded: %1!s!.\n"
  22. ERROR_INIT_DISPLAY, "\
  23. The netsh console cannot be initialized for display.\n"
  24. ERROR_TAG_ALREADY_PRESENT, "\
  25. Two or more arguments in the command have the same name.\n"
  26. ERROR_INVALID_OPTION_TAG, "\
  27. '%1!s!' is not a valid argument for this command.\n"
  28. ERROR_INVALID_OPTION_VALUE, "\
  29. '%1!s!' is not an acceptable value for '%2!s!'.\n"
  30. ERROR_NO_TAG, "\
  31. Expected a value for '%1!s!'\n"
  32. ERROR_MISSING_OPTION, "\
  33. One or more essential parameters were not entered.\n\
  34. Verify the required parameters, and reenter them.\n"
  35. ERROR_TRANSPORT_NOT_PRESENT, "\
  36. The requested transport is not available.\n"
  37. ERROR_HELPER_ALREADY_REGISTERED, "\
  38. This helper has already been registered.\n"
  39. ERROR_CONTEXT_ALREADY_REGISTERED, "\
  40. This context has already been registered.\n"
  41. HLP_GROUP_ADD, "Adds a configuration entry to a list of entries.\n"
  42. HLP_GROUP_DELETE, "Deletes a configuration entry from a list of entries.\n"
  43. HLP_GROUP_SET, "Updates configuration settings.\n"
  44. HLP_GROUP_SHOW, "Displays information.\n"
  45. HLP_HELP1, "Displays a list of commands.\n"
  46. HLP_HELP1_EX, "\
  47. \nUsage: %1!s!\n\
  48. \nRemarks:\
  49. \n Displays a list of commands.\n"
  50. HLP_DUMP, "Displays a configuration script.\n"
  51. HLP_DUMP_EX, "\
  52. \nUsage: %1!s!\n\
  53. \nRemarks:\
  54. \n Creates a script that contains the current configuration. If saved to a\
  55. \n file, this script can be used to restore altered configuration settings.\
  56. \n"
  57. MSG_ALIAS_NOT_FOUND, "The following alias was not found: %1!s!.\n"
  58. MSG_CMD_FAILED, "The command cannot be executed.\n"
  59. MSG_NOT_ENOUGH_MEMORY, "There is not enough memory available to complete this action.\n"
  60. MSG_DLL_LOAD_FAILED, "The following helper DLL cannot be loaded: %1!s!.\n"
  61. MSG_DLL_START_FAILED, "Initialization Function %1!s! in %2!s! failed to start with error code %3!d!\n"
  62. MSG_OPEN_FAILED, "Windows cannot open the file named %1!s!.\n"
  63. MSG_COMMIT_ERROR, "The commit call to %1!s! cannot be completed.\n"
  64. MSG_NETSH_USAGE, "\
  65. \nUsage: %1!s! [-a AliasFile] [-c Context] [-r RemoteMachine] \
  66. \n [Command | -f ScriptFile]\n"
  67. MSG_HELP_FOOTER, "\n\
  68. To view help for a command, type the command, followed by a space, and then\
  69. \n type %1!s!.\n"
  70. MSG_GLOBAL_COMMANDS, "\nGlobal commands:\n"
  71. MSG_INHERITED_COMMANDS, "\n\
  72. Commands inherited from the %1!s! context:\n"
  73. MSG_LOCAL_COMMANDS, "\nCommands in this context:\n"
  74. MSG_INVALID_TOPLEVEL_CMD "\n\
  75. Invalid Top Level command name: %1!s!\n"
  76. MSG_INVALID_CMD_GROUP "\n\
  77. Invalid command group name: %1!s!\n"
  78. MSG_INVALID_CMD "\n\
  79. Invalid command name: %1!s!\n"
  80. HLP_ADD_HELPER, "Installs a helper DLL.\n"
  81. HLP_DEL_HELPER, "Removes a helper DLL.\n"
  82. MSG_HELPER_HELP, "Changes to the `%2!s!%3!s!%1!s!' context.\n"
  83. MSG_SHELL_CMD_HELP_HEADER, "\n\
  84. The following commands are available:\n"
  85. MSG_WARN_COULDNOTVERCHECKHOST, "\n\
  86. WARNING: Could not obtain host information from machine: [%1!s!]. Some commands may not be available.\n"
  87. MSG_SUBCONTEXT_LIST, "\n\
  88. The following sub-contexts are available:\n"
  89. HLP_ALIAS, "Adds an alias.\n"
  90. HLP_ALIAS_EX, "\n\
  91. Usage : %1!s! [alias-name] [string1 string 2 ...]\n\n\
  92. \t If no arguments are specified, all aliases will be displayed.\n\
  93. \t If alias-name is specified, then the equivalent string for it\n\
  94. \t will be displayed (if found).\n\
  95. \t If one or more strings are specified, then alias-name is set to \n\
  96. \t these strings.\n\n"
  97. HLP_UNALIAS, "Deletes an alias.\n"
  98. HLP_UNALIAS_EX, "\n\
  99. Usage : %1!s! alias-name\n\n\
  100. \t Deletes alias alias-name.\n\n"
  101. HLP_UPLEVEL, "Goes up one context level.\n"
  102. HLP_UPLEVEL_EX, "\n\
  103. Usage : %1!s!\n\n\
  104. \t Goes up one context level.\n\n"
  105. HLP_PUSHD, "Pushes current context on stack.\n"
  106. HLP_PUSHD_EX, "\n\
  107. Usage : %1!s!\n\n\
  108. \t Pushes current context on stack.\n\n"
  109. HLP_POPD, "Pops a context from the stack.\n"
  110. HLP_POPD_EX, "\n\
  111. Usage : %1!s!\n\n\
  112. \t Pops a context from the stack.\n\n"
  113. HLP_COMMIT, "Sets the current mode to online.\n"
  114. HLP_COMMIT_EX, "\n\
  115. Usage: %1!s!\n\n\
  116. Remarks:\
  117. \n Sets the current mode to online. Changes made while in online mode are\
  118. \n immediately reflected in the running configuration. If changes are\
  119. \n made while in offline mode, they are reflected in the running\
  120. \n configuration when the mode is switched back to online.\n"
  121. HLP_UNCOMMIT, "Sets the current mode to offline.\n"
  122. HLP_UNCOMMIT_EX, "\n\
  123. Usage: %1!s!\n\n\
  124. Remarks:\
  125. \n Sets the current mode to offline. Changes made while in offline mode\
  126. \n are saved and made in the running configuration when the mode is\
  127. \n switched back to online.\n"
  128. HLP_SAVE, "Commits changes made while in offline mode.\n"
  129. HLP_SAVE_EX, "\n\
  130. Usage: %1!s!\n\n\
  131. Remarks:\
  132. \n Commits changes to the running configuration that were made while in\
  133. \n offline mode. No action is taken for this command while in online\
  134. \n mode.\n"
  135. HLP_LOAD, "Runs a script file.\n"
  136. HLP_LOAD_EX, "\n\
  137. Usage: %1!s! <ScriptFile>\n\n\
  138. Remarks:\
  139. \n Loads the script file and runs it.\n"
  140. HLP_SET_FILE, "Copy the console output to a file.\n"
  141. HLP_SET_FILE_EX, "\n\
  142. Usage: %1!s! [ mode= ] { open [ name= ] <filename> | append [ name = ] \n\
  143. <filename> | close }\n\n\
  144. Parameters:\n\
  145. \n Tag Value \
  146. \n mode - One of the following values:\
  147. \n open: Creates a new file or overwrites an existing file and \
  148. \n streams the console output to the file \
  149. \n append: Opens an existing file and streams the console \
  150. \n output to the end of the existing file \
  151. \n close: Stops streaming and closes a file \
  152. \n name - Name of the file (full path optional)\
  153. \n\
  154. Remarks:\
  155. \n Copy the console output to a file.\n\
  156. Example:\
  157. \n %1!s! open c:\logfiles\logfile.txt \
  158. \n The above command creates a file and logs all output to it.\n"
  159. HLP_SET_MODE, "Sets the current mode to online or offline.\n"
  160. HLP_SET_MODE_EX, "\n\
  161. Usage: %1!s! [ mode= ] { online | offline }\n\n\
  162. Parameters:\n\
  163. \n Tag Value\
  164. \n mode - One of the following values:\
  165. \n online: Commit changes immediately\
  166. \n offline: Delay commit until explicitly requested\n\n\
  167. Remarks:\
  168. \n Sets the current mode to online or offline.\n"
  169. HLP_SET_MACHINE, "Sets the current machine on which to operate.\n"
  170. HLP_SET_MACHINE_EX, "\n\
  171. Usage: %1!s! [[name=]<string>]\n\n\
  172. Parameters:\n\
  173. \n Tag Value\
  174. \n name - Name of the machine on which to operate\n\n\
  175. Remarks:\
  176. \n Sets the current machine on which to operate. If a machine name\
  177. \n is not specified, the local machine is used.\n"
  178. HLP_SHOW_ALIAS, "Lists all defined aliases.\n"
  179. HLP_SHOW_ALIAS_EX, "\n\
  180. Usage: %1!s!\n\
  181. Remarks:\
  182. \n Lists all defined aliases.\n"
  183. HLP_SHOW_HELPER, "Lists all the top-level helpers.\n"
  184. HLP_SHOW_HELPER_EX, "\n\
  185. Usage: %1!s!\n\
  186. Remarks:\
  187. \n Lists all the top-level helpers.\n"
  188. MSG_SHOW_HELPER_HDR, "\
  189. Helper GUID DLL Filename Command\n\
  190. -------------------------------------- ------------ -------\n"
  191. MSG_SHOW_HELPER_INFO, "%1!s! %2!-12s! "
  192. MSG_SHOW_HELPER_INFO1, " "
  193. MSG_SHOW_HELPER_INFO2, "%1!s!\n"
  194. MSG_SHOW_HELPER_DLL_HDR, "\nThe following DLLs could not be loaded:\n"
  195. MSG_SHOW_HELPER_ORPHAN_HDR, "\n\
  196. The following helpers could not be started:\n\n\
  197. GUID of Orphaned Helper DLL Filename GUID of Missing Parent\n\
  198. -------------------------------------- ------------ ----------------------\n"
  199. MSG_SHOW_HELPER_ORPHAN_INFO, "%1!s! %2!-12s! %3!s!\n"
  200. HLP_SHOW_MODE, "Shows the current mode.\n"
  201. HLP_SHOW_MODE_EX, "\n\
  202. \t Shows the current mode (offline or online).\n\n"
  203. HLP_ADD_HELPER_EX, "\n\
  204. Usage: %1!s! <DllFileName>\n\n\
  205. Remarks:\
  206. \n Installs the specified helper DLL in netsh.\n\n\
  207. Example:\
  208. \n %1!s! ipmontr.dll\n\
  209. \n The above command installs ipmontr.dll in netsh."
  210. HLP_DEL_HELPER_EX, "\n\
  211. Usage: %1!s! <DllFileName>\n\n\
  212. Remarks:\
  213. \n Removes the specified helper DLL from netsh. Note that after a helper\
  214. \n is removed, it is no longer supported by netsh.\n"
  215. HLP_FLUSH, "Discards changes made while in offline mode.\n"
  216. HLP_FLUSH_EX, "\n\
  217. Usage: %1!s!\n\n\
  218. Remarks:\
  219. \n Discards changes made while in the offline mode. This does not affect\
  220. \n changes made while in online mode.\n"
  221. HLP_EXIT, "Exits the program.\n"
  222. HLP_EXIT_EX, "\n\
  223. \t Exits the program.\n\n"
  224. EMSG_INSTALL_KEY_FAILED, "Error creating key for %1!s! in the registry.\n"
  225. EMSG_UNINSTALL_KEY_FAILED, "Error deleting key for %1!s! in the registry.\n"
  226. EMSG_ALIASING_KEYWORD, "Cannot redefine a built-in command.\n"
  227. EMSG_REMOTE_CONNECT_FAILED, "Could not connect to %1!s!.\n"
  228. EMSG_INCOMPLETE_COMMAND, "\
  229. The command is incomplete. The possible completions are:\n\n"
  230. EMSG_DLL_FN_NOT_FOUND, "\
  231. The function %1!s! was not found in %2!s!.\n"
  232. }
  233. #include <windows.h>
  234. #include <ntverp.h>
  235. #define VER_FILETYPE VFT_APP
  236. #define VER_FILESUBTYPE VFT2_UNKNOWN
  237. #define VER_FILEDESCRIPTION_STR "Network Command Shell"
  238. #define VER_INTERNALNAME_STR "netsh.exe"
  239. #define VER_ORIGINALFILENAME_STR "netsh.exe"
  240. #include "common.ver" // NT5.0 version file.