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.

246 lines
13 KiB

  1. #include "resource.h"
  2. #include "windows.h"
  3. #include "cmdlineres.h"
  4. #include "cmdline.rc"
  5. /////////////////////////////////////////////////////////////////////////////
  6. // String Table
  7. //
  8. STRINGTABLE DISCARDABLE
  9. BEGIN
  10. IDS_FAILURE "FAILURE: "
  11. IDS_ERROR_DISCONNECT "ERROR: Could not disconnect the open file ""%s"".\n"
  12. IDS_INVALID_SYNTAX "Invalid syntax.\nType ""%s /?"" for usage.\n"
  13. IDS_AUTHENTICATION_FAILURE
  14. "ERROR: The current or specified user name and password were not valid or authorized to make the connection.\n"
  15. IDS_INVALID_SERVER_NAME "Invalid server name.\n"
  16. IDS_HEADER_NOT_ALLOWED "ERROR: Invalid Syntax. /NH option is allowed only for TABLE and CSV formats.\n"
  17. IDS_ERROR_USERNAME_BUT_NOMACHINE
  18. "ERROR: Invalid Syntax. /U option can be specified only when /S option is specified.\n"
  19. IDS_ERROR_PASSWORD_BUT_NOUSERNAME
  20. "ERROR: Invalid Syntax. /P option can be specified only when /U option is specified.\n"
  21. IDS_NO_ID_ACC_OF "ERROR: Invalid Syntax. No /ID or /A or /O parameter present.\n"
  22. IDS_ERROR_ID "ERROR: Invalid ID.\n"
  23. IDS_ID_SHOW_ERROR "ERROR: "
  24. IDS_INTERNAL_FAILURE "ERROR: Unable to retrive data.\n"
  25. IDS_ACCESS_DENIED "ERROR: Access is denied.\n"
  26. IDS_INVALID_CREDENTIALS "ERROR: Could not connect to the specified system with the given credentials or Invalid credentials specified\n"
  27. IDS_SERVER_EMPTY "ERROR: Invalid syntax. System name cannot be empty.\n"
  28. IDS_USERNAME_EMPTY "ERROR: Invalid syntax. User name cannot be empty.\n"
  29. IDS_INVALID_OS "ERROR: The Target system must be running Windows XP or above.\n"
  30. IDS_ACCESSBY_EMPTY "ERROR: Invalid syntax. Accessed by cannot be empty.\n"
  31. IDS_OPEN_FILE_EMPTY "ERROR: Invalid syntax. File name cannot be empty.\n"
  32. IDS_ERROR_SYSTEM_INFO "ERROR: Unable to get system type Information.\n"
  33. IDS_ERROR_VERSION_MISMATCH "ERROR: The target system must be running a 32 bit OS.\n"
  34. IDS_REMOTE_NOT_SUPPORTED "ERROR: Remote Open files is not supported for 64 bit machines.\n"
  35. IDS_ERROR_VERSION_MISMATCH1 "ERROR: The target system must be running a 64 bit OS.\n"
  36. IDS_REMOTE_NOT_SUPPORTED1 "ERROR: Remote Open files is not supported for 32 bit machines.\n"
  37. END
  38. STRINGTABLE DISCARDABLE
  39. BEGIN
  40. IDS_SUCCESS "SUCCESS: "
  41. IDS_NO_OPENFILES "INFO: No shared open files found.\n"
  42. IDS_NO_D_OPENFILES "INFO: There are no shared open files found with the specified criteria.\n"
  43. END
  44. STRINGTABLE DISCARDABLE
  45. BEGIN
  46. IDS_FILE_ARCHIVE " Archive"
  47. IDS_FILE_COMPRESSED " Compressed"
  48. IDS_FILE_ENCRYPTED " Encrypted"
  49. IDS_FILE_HIDDEN " Hidden"
  50. IDS_FILE_NORMAL " Normal"
  51. IDS_FILE_OFFLINE " Offline"
  52. IDS_FILE_READONLY " Readonly"
  53. IDS_FILE_DIRECTORY " Directory"
  54. END
  55. STRINGTABLE DISCARDABLE
  56. BEGIN
  57. IDS_UTILITY_NAME "OPENFILES"
  58. IDS_OPENMODE_OPTION "read|write|read/write|*"
  59. IDS_STRING_HOSTNAME "Hostname"
  60. IDS_STRING_ID "ID"
  61. IDS_STRING_ACCESSED_BY "Accessed By"
  62. IDS_STRING_TYPE "Type"
  63. IDS_STRING_LOCK "#Locks"
  64. IDS_STRING_OPEN_MODE "Open Mode"
  65. IDS_STRING_OPEN_FILE "Open File (Path\\executable)"
  66. IDS_STRING_WINDOWS "Windows"
  67. IDS_STRING_UNKNOWN "Unknown"
  68. IDS_READ "Read"
  69. IDS_WRITE "Write"
  70. IDS_READ_WRITE "Write + Read"
  71. IDS_FORMAT_OPTIONS "list|csv|table"
  72. IDS_LIST "LIST"
  73. IDS_CSV "CSV"
  74. IDS_READ_SLASH_WRITE "Read/Write"
  75. IDS_WRITE_SLASH_READ "Write/Read"
  76. IDS_MAC_OS "Macintosh"
  77. IDS_LOCAL_OPEN_FILES "\nFiles Opened Locally:\n"
  78. IDS_LOCAL_OPEN_FILES_SP1 "---------------------\n\n"
  79. IDS_SHARED_OPEN_FILES "\n\nFiles Opened Remotely via local share points:\n"
  80. IDS_LOCAL_OPEN_FILES_SP2 "---------------------------------------------\n"
  81. IDS_WAIT "Please wait. Getting data ..."
  82. IDS_STRING_PROCESS_ID "ProcessID"
  83. IDS_STRING_PROCESS_NAME "Process Name"
  84. IDS_FILE_TYPE "Type"
  85. IDS_LOCAL_OPTION "on|off"
  86. IDS_LOCAL_ON "ON"
  87. IDS_LOCAL_OFF "OFF"
  88. END
  89. STRINGTABLE DISCARDABLE
  90. BEGIN
  91. IDS_ID_SHOW_WARNING "WARNING: "
  92. IDS_LOCAL_SYSTEM "WARNING: Ignoring the user credentials for the local connection.\n"
  93. IDS_LOCAL_NEEDS_TO_SET "\nINFO: The system global flag 'maintain objects list' needs to be enabled to see local opened files. See Openfiles /? for more information.\n"
  94. IDS_LOCAL_FLG_SET "\nSUCCESS: The system global flag 'maintain objects list' is enabled.\n This will take effect after the system is restarted.\n"
  95. IDS_LOCAL_FLG_RESET "\nSUCCESS: The system global flag 'maintain objects list' is disabled..\n This will take effect after the system is restarted.\n"
  96. IDS_LOCAL_FLG_ALREADY_SET "\nINFO: The system global flag 'maintain objects list' is currently enabled.\n"
  97. IDS_LOCAL_FLG_ALREADY_RESET "\nINFO: The system global flag 'maintain objects list' is currently disabled.\n"
  98. END
  99. STRINGTABLE DISCARDABLE
  100. BEGIN
  101. IDS_HELP_LINE1 "\nOPENFILES /Disconnect [/S system [/U username [/P [password]]]]\n"
  102. IDS_HELP_LINE2 " {[/ID id] [/A accessedby] [/O openmode]}\n"
  103. IDS_HELP_LINE3 " [/OP openfile]\n\n"
  104. IDS_HELP_LINE5 "Description:\n"
  105. IDS_HELP_LINE6 " Enables an administrator to disconnect files and folders that have\n"
  106. IDS_HELP_LINE7 " been opened remotely through a shared folder.\n\n"
  107. IDS_HELP_LINE8 "Parameter List:\n"
  108. IDS_HELP_LINE9 " /S system Specifies the remote system to connect to.\n\n"
  109. IDS_HELP_LINE10 " /U [domain\]user Specifies the user context under which the\n"
  110. IDS_HELP_LINE11 " command should execute.\n\n"
  111. IDS_HELP_LINE12 " /P [password] Specifies the password for the given user\n"
  112. IDS_HELP_LINE13 " context. Prompts for input if omitted.\n\n"
  113. END
  114. STRINGTABLE DISCARDABLE
  115. BEGIN
  116. IDS_HELP_LINE14 " /ID open file ID Specifies to disconnect open files by file ID.\n"
  117. IDS_HELP_LINE15 " The ""*"" wildcard may be used.\n\n"
  118. IDS_HELP_LINE16 " /A username Specifies to disconnect all open files by\n"
  119. IDS_HELP_LINE17 " ""accessed by"" value. The ""*"" wildcard\n"
  120. IDS_HELP_LINE18 " may be used.\n\n"
  121. IDS_HELP_LINE19 " /O open mode Specifies to disconnect all open files by\n"
  122. IDS_HELP_LINE20 " ""openmode"" value. Valid values are Read,\n"
  123. IDS_HELP_LINE21 " Write or Read/Write. The ""*"" wildcard\n"
  124. IDS_HELP_LINE22 " may be used."
  125. IDS_HELP_LINE23 " "
  126. IDS_HELP_LINE24 " "
  127. END
  128. STRINGTABLE DISCARDABLE
  129. BEGIN
  130. IDS_HELP_LINE25 "\n\n"
  131. IDS_HELP_LINE26 " /OP open file Specifies to disconnect all open file\n"
  132. IDS_HELP_LINE27 " connections created by a specific ""open\n"
  133. IDS_HELP_LINE28 " file"" name. The ""*"" wildcard may be used.\n\n"
  134. IDS_HELP_LINE29 " /? Displays this help/usage.\n\n"
  135. IDS_HELP_LINE30 "Examples:\n"
  136. IDS_HELP_LINE31 " OPENFILES /Disconnect /?\n"
  137. IDS_HELP_LINE32 " OPENFILES /Disconnect /ID 1\n"
  138. IDS_HELP_LINE33 " OPENFILES /Disconnect /A username\n"
  139. IDS_HELP_LINE34 " OPENFILES /Disconnect /O Read/Write\n"
  140. IDS_HELP_LINE35 " OPENFILES /Disconnect /OP ""c:\\My Documents\\somedoc.doc"" /ID 234\n"
  141. IDS_HELP_LINE36 " OPENFILES /Disconnect /S system /U username /ID 5\n"
  142. IDS_HELP_LINE_END " OPENFILES /Disconnect /S system /U username /P password /ID *\n"
  143. END
  144. STRINGTABLE DISCARDABLE
  145. BEGIN
  146. IDS_SUCCESS_DISCONNECT "SUCCESS: The connection to the open file ""%s"" has successfully been terminated.\n"
  147. END
  148. STRINGTABLE DISCARDABLE
  149. BEGIN
  150. IDS_HELP_MAIN1 "\nOPENFILES /parameter [arguments]\n\n"
  151. IDS_HELP_MAIN2 "Description:\n"
  152. IDS_HELP_MAIN3 " Enables an administrator to list or disconnect files and folders\n"
  153. IDS_HELP_MAIN4 " that have been opened on a system.\n\n"
  154. IDS_HELP_MAIN5 "Parameter List:\n"
  155. IDS_HELP_MAIN6 " /Disconnect Disconnects one or more open files.\n\n"
  156. IDS_HELP_MAIN7 " /Query Displays files opened locally or from shared folders.\n\n"
  157. IDS_HELP_MAIN8 " /Local Enables / Disables the display of local open files.\n"
  158. IDS_HELP_MAIN9 " Note: Enabling this flag adds performance overhead.\n\n"
  159. IDS_HELP_MAIN10 "Examples:\n"
  160. IDS_HELP_MAIN11 " OPENFILES /Disconnect /?\n"
  161. IDS_HELP_MAIN12 " OPENFILES /Query /?\n"
  162. IDS_HELP_MAIN_END " OPENFILES /Local /?\n"
  163. END
  164. STRINGTABLE DISCARDABLE
  165. BEGIN
  166. IDS_HELP_QUERY1 "\nOPENFILES /Query [/S system [/U username [/P [password]]]]\n"
  167. IDS_HELP_QUERY2 " [/FO format] [/NH] [/V]\n\n"
  168. IDS_HELP_QUERY3 "Description:\n"
  169. IDS_HELP_QUERY4 " Enables an administrator to display a list of files and folders that\n"
  170. IDS_HELP_QUERY5 " have been opened on a system.\n\n"
  171. IDS_HELP_QUERY6 "Parameter List:\n"
  172. IDS_HELP_QUERY7 " /S system Specifies the remote system to connect to.\n\n"
  173. IDS_HELP_QUERY8 " /U [domain\]user Specifies the user context under which\n"
  174. IDS_HELP_QUERY9 " the command should execute.\n\n"
  175. END
  176. STRINGTABLE DISCARDABLE
  177. BEGIN
  178. IDS_HELP_QUERY10 " /P [password] Specifies the password for the given user\n"
  179. IDS_HELP_QUERY11 " context. Prompts for input if omitted.\n\n"
  180. IDS_HELP_QUERY12 " /FO format Specifies the format in which the output is\n"
  181. IDS_HELP_QUERY13 " to be displayed.\n"
  182. IDS_HELP_QUERY14 " Valid values: ""TABLE"",""LIST"",""CSV"".\n\n"
  183. IDS_HELP_QUERY15 " /NH Specifies that the ""Column Header"" should\n"
  184. IDS_HELP_QUERY16 " not be displayed in the output.\n"
  185. IDS_HELP_QUERY17 " Valid only for ""TABLE"" and ""CSV"" formats.\n\n"
  186. IDS_HELP_QUERY18 " /V Specifies that the detailed information\n"
  187. IDS_HELP_QUERY19 " should be displayed in the output.\n\n"
  188. IDS_HELP_QUERY20 " /? Displays this help/usage.\n\n"
  189. IDS_HELP_QUERY21 "Examples:\n"
  190. IDS_HELP_QUERY22 " OPENFILES /?\n"
  191. IDS_HELP_QUERY23 " OPENFILES /Query\n"
  192. IDS_HELP_QUERY24 " OPENFILES /Query /FO csv /NH\n"
  193. IDS_HELP_QUERY25 " OPENFILES /Query /FO LIST /V\n"
  194. IDS_HELP_QUERY_END " OPENFILES /Query /S system /U username /P password /NH \n"
  195. END
  196. STRINGTABLE DISCARDABLE
  197. BEGIN
  198. IDS_NOACCESS "No Access."
  199. IDS_GIVEN_CREDENTIAL " with the given credentials.\n"
  200. IDS_NA "N/A"
  201. IDS_DOT_EOL ".\n"
  202. IDS_TYPE_Q_HELP "Type ""%s /Query /?"" for usage.\n"
  203. IDS_TYPE_D_HELP "Type ""%s /Disconnect /?"" for usage.\n"
  204. IDS_CANNOT_READ_REGISTRY "cannot read registry value ""SYSTEM\\CurrentControlSet\\Control\\Session Manager\\GlobalFlag"""
  205. IDS_CANNOT_WRITE_REGISTRY "cannot write registry value ""SYSTEM\\CurrentControlSet\\Control\\Session Manager\\GlobalFlag"""
  206. END
  207. STRINGTABLE DISCARDABLE
  208. BEGIN
  209. IDS_HELP_LOCAL1 "\nOPENFILES /Local [ ON | OFF ]\n\n"
  210. IDS_HELP_LOCAL2 "Description:\n"
  211. IDS_HELP_LOCAL3 " Enables an administrator to enable or disable the system global flag\n"
  212. IDS_HELP_LOCAL4 " 'maintain objects list' which tracks local file handles. Changes made\n"
  213. IDS_HELP_LOCAL5 " by this switch will take effect only after restarting the system.\n"
  214. IDS_HELP_LOCAL6 " Note: Enabling this flag adds performance overhead.\n\n"
  215. IDS_HELP_LOCAL7 "Examples:\n"
  216. IDS_HELP_LOCAL8 " OPENFILES /Local\n"
  217. IDS_HELP_LOCAL9 " OPENFILES /Local ON\n"
  218. IDS_HELP_LOCAL_END " OPENFILES /Local OFF\n"
  219. END
  220. //
  221. // Version resources
  222. //
  223. #include <ntverp.h>
  224. #define VER_FILETYPE VFT_APP
  225. #define VER_FILESUBTYPE VFT2_UNKNOWN
  226. #define VER_FILEDESCRIPTION_STR "Open Files"
  227. #define VER_INTERNALNAME_STR "OpenFiles.exe"
  228. #define VER_ORIGINALFILENAME_STR "OpnFiles.exe"
  229. #include <common.ver>