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.

315 lines
18 KiB

  1. #include <windows.h>
  2. #include "resource.h"
  3. #include "cmdlineres.h"
  4. #include "cmdline.rc"
  5. /////////////////////////////////////////////////////////////////////////////
  6. //
  7. // String Table
  8. //
  9. // Strings for the help display
  10. STRINGTABLE DISCARDABLE
  11. BEGIN
  12. IDS_HELP_1 "\nGPRESULT [/S system [/U username [/P [password]]]] [/SCOPE scope]\n"
  13. IDS_HELP_2 " [/USER targetusername] [/V | /Z]\n"
  14. IDS_HELP_3 "\n"
  15. IDS_HELP_4 "Description:\n"
  16. IDS_HELP_5 " This command line tool displays the Resultant Set of Policy (RSoP)\n"
  17. IDS_HELP_6 " information for a target user and computer.\n"
  18. IDS_HELP_7 "\n"
  19. IDS_HELP_8 "Parameter List:\n"
  20. IDS_HELP_9 " /S system Specifies the remote system to connect to.\n\n"
  21. IDS_HELP_10 ""
  22. IDS_HELP_11 " /U [domain\]user Specifies the user context under which\n"
  23. IDS_HELP_12 " the command should execute.\n\n"
  24. IDS_HELP_13 " /P [password] Specifies the password for the given user\n"
  25. IDS_HELP_14 " context. Prompts for input if omitted.\n\n"
  26. IDS_HELP_15 " /SCOPE scope Specifies whether the user or the\n"
  27. IDS_HELP_16 " computer settings needs to be displayed.\n"
  28. IDS_HELP_17 " Valid values: ""USER"", ""COMPUTER"".\n\n"
  29. IDS_HELP_18 ""
  30. IDS_HELP_19 " /USER [domain\]user Specifies the user name for which the\n"
  31. IDS_HELP_20 " RSOP data is to be displayed.\n\n"
  32. IDS_HELP_21 " /V Specifies that verbose information should\n"
  33. IDS_HELP_22 " be displayed. Verbose information provides\n"
  34. IDS_HELP_23 " additional detailed settings that have\n"
  35. IDS_HELP_24 " been applied with a precedence of 1.\n\n"
  36. IDS_HELP_25 " /Z Specifies that the super-verbose\n"
  37. IDS_HELP_26 " information should be displayed. Super-\n"
  38. IDS_HELP_27 " verbose information provides additional\n"
  39. IDS_HELP_28 " detailed settings that have been applied\n"
  40. IDS_HELP_29 " with a precedence of 1 and higher. This\n"
  41. IDS_HELP_30 " allows you to see if a setting was set in\n"
  42. IDS_HELP_31 " multiple places. See the Group Policy\n"
  43. IDS_HELP_32 " online help topic for more information.\n\n"
  44. IDS_HELP_33 " /? Displays this help message.\n\n"
  45. IDS_HELP_34 "NOTE: If you run GPRESULT without parameters, it returns the RSoP data\n"
  46. IDS_HELP_35 " for the current logged-on user on the computer it was run on.\n"
  47. IDS_HELP_36 "\nExamples:\n"
  48. IDS_HELP_37 " GPRESULT\n"
  49. IDS_HELP_38 " GPRESULT /USER targetusername /V\n"
  50. IDS_HELP_39 " GPRESULT /S system /USER targetusername /SCOPE COMPUTER /Z\n"
  51. IDS_HELP_40 " GPRESULT /S system /U username /P password /SCOPE USER /V\n"
  52. END
  53. // General strings
  54. STRINGTABLE DISCARDABLE
  55. BEGIN
  56. IDS_INFO "INFO: "
  57. IDS_ERROR "ERROR: "
  58. IDS_WARNING "WARNING: "
  59. IDS_DASH "-"
  60. IDS_NEWLINE_TAB "\n "
  61. IDS_LAST_CHAR " : "
  62. IDS_NEWLINE "\n"
  63. IDS_NEWLINE1 "\n "
  64. IDS_NEWLINE2 "\n "
  65. IDS_NEWLINETAB "\n "
  66. IDS_NEWLINE_TABTHREE "\n "
  67. IDS_COMMA ", "
  68. END
  69. // Strings for warning messages
  70. STRINGTABLE DISCARDABLE
  71. BEGIN
  72. IDS_WARN_LOCAL "Ignoring the user credentials for the local system."
  73. END
  74. // Strings for Information messages
  75. STRINGTABLE DISCARDABLE
  76. BEGIN
  77. IDS_USER_NO_RSOP "The user ""%s"" does not have RSOP data.\n"
  78. IDS_USER_NO_RSOP1 "The user does not have RSOP data.\n"
  79. END
  80. // Strings for Error messages
  81. STRINGTABLE DISCARDABLE
  82. BEGIN
  83. IDS_ERROR_USERNAME_BUT_NOMACHINE "Invalid Syntax. /U can be specified only when /S is specified.\n"
  84. IDS_ERROR_PASSWORD_BUT_NOUSERNAME "Invalid Syntax. /P can be specified only when /U is specified.\n"
  85. IDS_ERROR_COM_ERROR "%s Error Code: 0x%08lx was returned.\n"
  86. IDS_ERROR_USERNAME_EMPTY "Invalid Syntax. User name cannot be empty.\n"
  87. IDS_ERROR_SERVERNAME_EMPTY "Invalid Syntax. Server name cannot be empty.\n"
  88. IDS_ERROR_NO_OPTIONS "Invalid Syntax.\nType ""GPRESULT /?"" for usage.\n"
  89. IDS_ERROR_USAGE "Invalid Syntax. No options can be specified along with '/?'.\n"
  90. IDS_TYPE_USAGE "Type ""GPRESULT /?"" for usage.\n"
  91. IDS_ERROR_TARGET_EMPTY "Invalid Syntax. Target user name cannot be empty.\n"
  92. IDS_USER_NOT_VALID "The specified user name is not valid.\n"
  93. IDS_NO_USER "The /USER value is not valid.\n"
  94. IDS_METHOD_FAILED "Access Denied.\n"
  95. IDS_ERROR_VERBOSE_SYNTAX "Invalid Syntax. /Z cannot be specified when /V is specified.\n"
  96. END
  97. // Strings for data display
  98. STRINGTABLE DISCARDABLE
  99. BEGIN
  100. IDS_LEGAL_INFO1 "Microsoft (R) Windows (R) Operating System Group Policy Result tool v2.0\n"
  101. IDS_LEGAL_INFO2 "Copyright (C) Microsoft Corp. 1981-2001\n"
  102. IDS_CREATED_ON "\nCreated On %s at %s\n\n"
  103. IDS_GPO_USER "\n\nUSER SETTINGS"
  104. IDS_GPO_COMPUTER "\n\nCOMPUTER SETTINGS"
  105. IDS_GPO_TITLE "\rRSOP data for %s on %s : Logging Mode"
  106. IDS_LAST_TIME_OP "%s at %s"
  107. IDS_DOMAIN_NAME "Domain Name: "
  108. IDS_DOMAIN_TYPE "Domain Type: "
  109. IDS_TERMINAL_SERVER_MODE "Terminal Server Mode: "
  110. IDS_USER_DOMAIN_NAME "Domain Name: "
  111. IDS_USER_DOMAIN_TYPE "Domain Type: "
  112. IDS_SITE_NAME "Site Name: "
  113. IDS_OS_TYPE "\nOS Type: "
  114. IDS_OS_VERSION "\nOS Version: "
  115. IDS_OS_CONFIG "\nOS Configuration: "
  116. IDS_LOCAL_PROFILE "Local Profile: "
  117. IDS_ROAMING_PROFILE "Roaming Profile: "
  118. IDS_LINK_SPEED "Connected over a slow link?: "
  119. IDS_GPO_DISPLAY "\n Applied Group Policy Objects"
  120. IDS_GPO_FILTERED "\n The following GPOs were not applied because they were filtered out"
  121. IDS_GPO_FILTER_ID " WMI Filter: "
  122. IDS_FILTERING "\n Filtering: "
  123. IDS_COMPUTER_RESULT "\n Resultant Set Of Policies for Computer"
  124. IDS_USER_RESULT "\n Resultant Set Of Policies for User"
  125. IDS_SW_SETTINGS "Software Installations"
  126. IDS_WS_SS_AP_PP "Account Policies"
  127. IDS_WS_SS_AP_ALP "Account Lockout Policies"
  128. IDS_WS_SS_LP_AP "Audit Policy"
  129. IDS_WS_SS_LP_URA "User Rights"
  130. IDS_WS_SS_LP_SO "Security Options"
  131. IDS_WS_SSU "Startup Scripts"
  132. IDS_WS_SSD "Shutdown Scripts"
  133. IDS_WS_SS_EL "Event Log Settings"
  134. IDS_WS_SS_RG "Restricted Groups"
  135. IDS_WS_SS_SS "System Services"
  136. IDS_WS_SS_REG "Registry Settings"
  137. IDS_WS_SS_FS "File System Settings"
  138. IDS_WS_SS_PKP "Public Key Policies"
  139. IDS_ADTS_RAS "RAS Fix Policy"
  140. IDS_ADTS_ERS "Administrative Templates"
  141. IDS_USERFR "Folder Redirection"
  142. IDS_IEPOLICY "Internet Explorer Browser User Interface"
  143. IDS_FAVLINKORITEM "Internet Explorer URLs"
  144. IDS_IE_SECURITY "Internet Explorer Security"
  145. IDS_IE_PROGRAMS "Internet Explorer Programs"
  146. IDS_PROXY "Internet Explorer Connection"
  147. IDS_GPO "\n GPO: "
  148. IDS_POLICY "\n Policy: "
  149. IDS_COMPUTER_SETTING "\n Computer Setting: "
  150. IDS_NAME "\n Name: "
  151. IDS_PARAMETERS "\n Parameters: "
  152. IDS_LASTEXECUTED "\n LastExecuted: "
  153. IDS_SETTING "\n Setting: "
  154. IDS_FR_SETTING "\n KeyName: "
  155. IDS_STATE "\n State: "
  156. IDS_VALUE "\n Value: "
  157. IDS_VALUENAME "\n ValueName: "
  158. IDS_AUTOINSTALL "\n AutoInstall: "
  159. IDS_ORIGIN "\n Origin: "
  160. IDS_OBJECTNAME "\n ObjectName: "
  161. IDS_GROUPNAME "\n Groupname: "
  162. IDS_MEMBERS "\n Members: "
  163. IDS_SERVICENAME "\n ServiceName: "
  164. IDS_STARTUP "\n Startup: "
  165. IDS_PERMISSION "\n Permission: "
  166. IDS_MEMBEROF "\n Memberof: "
  167. IDS_INSTALLATIONTYPE " InstallationType: "
  168. IDS_GRANTTYPE "\n Grant Type: "
  169. IDS_MOVETYPE "\n Move Type: "
  170. IDS_REDIRECTINGGROUP "\n Redirecting Group: "
  171. IDS_REDIRECTEDPATH "\n Redirected Path: "
  172. IDS_POLICYREMOVAL "\n Policy Removal: "
  173. IDS_HOMEPAGEURL "\n Home page URL: "
  174. IDS_SEARCHBARURL "\n Search page URL: "
  175. IDS_HELPPAGEURL "\n Online support page URL: "
  176. IDS_BITMAPNAME "\n Large Animated Bitmap Name: "
  177. IDS_LOGOBITMAPNAME "\n Large Custom Logo Bitmap Name: "
  178. IDS_TITLEBARTEXT "\n Title BarText: "
  179. IDS_USERAGENTTEXT "\n UserAgent Text: "
  180. IDS_TOOL_BUTTONS "\n Delete existing toolbar buttons: "
  181. IDS_URL "\n URL: "
  182. IDS_AVAILABLE "\n Make Available Offline: "
  183. IDS_VIEWABLESITES "\n Always Viewable Sites: "
  184. IDS_PASSWORDOVERRIDE "\n Password Override Enabled: "
  185. IDS_ZONE_SETTING "\n Import the current Security Zones Settings: "
  186. IDS_PROGRAM_SETTING "\n Import the current Program Settings: "
  187. IDS_CONTENT_SETTING "\n Import the current Content Ratings Settings: "
  188. IDS_AUTH_SETTING "\n Import current Authenticode Security Information: "
  189. IDS_TRUST_PUB "\n Enable trusted publisher lockdown: "
  190. IDS_HTTP_PROXY "\n HTTP Proxy Server: "
  191. IDS_SECURE_PROXY "\n Secure Proxy Server: "
  192. IDS_FTP_PROXY "\n FTP Proxy Server: "
  193. IDS_GOPHER_PROXY "\n Gopher Proxy Server: "
  194. IDS_SOCKS_PROXY "\n Socks Proxy Server: "
  195. IDS_AUTO_CONFIG_ENABLE "\n Auto Config Enable: "
  196. IDS_ENABLE_PROXY "\n Enable Proxy: "
  197. IDS_USE_SAME_PROXY "\n Use same Proxy: "
  198. IDS_APP_NAME "\n Name: "
  199. IDS_APP_VERSION "\n Version: "
  200. IDS_DEPLOY_STATE "\n Deployment State: "
  201. IDS_APP_SRC "\n Source: "
  202. IDS_LOG_NAME "\n Log Name: "
  203. IDS_USER_SG " The user is a part of the following security groups"
  204. IDS_SYS_SG " The computer is a part of the following security groups"
  205. IDS_USER_PRIV " The user has the following security privileges"
  206. IDS_THRESHOLD_LINK_SPEED "Group Policy slow link threshold: "
  207. IDS_LAST_TIME "Last time Group Policy was applied: "
  208. IDS_APPLIED_FROM "Group Policy was applied from: "
  209. IDS_WS_SLOGON "Logon Scripts"
  210. IDS_WS_SLOGOFF "Logoff Scripts"
  211. IDS_NO_PERMISSIONS "Access is denied. You do not have permissions to view the RSoP data.\n"
  212. IDS_ERROR_SESSION_CONFLICT "Another instance is running simultaneously in another session. Please try again.\n"
  213. IDS_MUTEX_FAILED "Creation of Mutex failed.\n"
  214. END
  215. // Strings for data values
  216. STRINGTABLE DISCARDABLE
  217. BEGIN
  218. IDS_NO_AUDITING "No Auditing"
  219. IDS_AUTOMATIC "Automatic"
  220. IDS_MANUAL "Manual"
  221. IDS_DISABLED "disabled"
  222. IDS_PUBLISHED "Published"
  223. IDS_ASSIGNED "Assigned"
  224. IDS_TRUE "True"
  225. IDS_FALSE "False"
  226. IDS_ARP "ARP List item"
  227. IDS_APPLICATION "Applied Application"
  228. IDS_REMOVED "Removed Package"
  229. IDS_NOPOLICY "no policy"
  230. IDS_BASIC "basic"
  231. IDS_ADVANCED "advanced"
  232. IDS_MAXIMUM "maximum"
  233. IDS_YES "Yes"
  234. IDS_NO "No"
  235. IDS_VALUE_STANDALONEWORKSTATION "Standalone Workstation"
  236. IDS_VALUE_MEMBERWORKSTATION "Member Workstation"
  237. IDS_VALUE_STANDALONESERVER "Standalone Server"
  238. IDS_VALUE_MEMBERSERVER "Member Server"
  239. IDS_VALUE_BACKUPDOMAINCONTROLLER "Additional/Backup Domain Controller"
  240. IDS_VALUE_PRIMARYDOMAINCONTROLLER "Primary Domain Controller"
  241. IDS_STRING_COMPUTER "Computer"
  242. IDS_STRING_USER "User"
  243. IDS_NULL_SID "Null SID"
  244. IDS_EVERYONE "Everyone"
  245. IDS_LOCAL "Local"
  246. IDS_CREATOR_OWNER "Creator Owner ID"
  247. IDS_CREATOR_GROUP "Creator Group ID"
  248. IDS_SYSTEM "System"
  249. IDS_SECURITY "Security"
  250. IDS_APP_LOG "Application"
  251. IDS_ENABLED "Enabled"
  252. IDS_NOT_ENABLED "Not Enabled"
  253. IDS_NOT_EXECUTED "This script has not yet been executed."
  254. IDS_EXCLUSIVE "Exclusive Rights"
  255. IDS_NOTEXCLUSIVE "Not Exclusive Rights"
  256. IDS_MOVED "Contents of Local Directory moved"
  257. IDS_NOTMOVED "Contents of Local Directory not moved"
  258. IDS_LEAVEFOLDER "Leave folder in existing location"
  259. IDS_REDIRECT "Redirect the folder back to user profile location"
  260. IDS_W2K_DOMAIN "Windows 2000"
  261. IDS_LOCAL_COMP "<Local Computer>"
  262. IDS_NT4_DOMAIN "WindowsNT 4"
  263. IDS_MS_409 "ms-409"
  264. IDS_WMI_DENIED "Denied (WMI Filter)\n"
  265. IDS_LINK_DISABLED "Disabled (Link)\n"
  266. IDS_GPO_DISABLED "Disabled (GPO)\n"
  267. IDS_ACCESS_DENIED "Denied (Security)\n"
  268. IDS_VERSION_ZERO "Not Applied (Empty)\n"
  269. IDS_NOT_APPLIED "Not Applied (Unknown Reason)\n"
  270. IDS_TS_REMOTEADMIN "Remote Administration"
  271. IDS_TS_APPSERVER "Application Server"
  272. IDS_TS_NONE "None"
  273. END
  274. // Strings for status messages
  275. STRINGTABLE DISCARDABLE
  276. BEGIN
  277. IDS_STARTED_RETRIEVAL "Retrieving RSOP data ..."
  278. IDS_CONNECT_CIMV2 "Connecting to the CIMV2 namespace ..."
  279. IDS_USER_DATA "Getting the user data ..."
  280. IDS_CONNECT_RSOP "Connecting to the RSOP namespace ..."
  281. IDS_GET_SID "Getting the SID information ..."
  282. IDS_GET_NAME "Getting the user name ..."
  283. IDS_GET_PROFILE "Getting the local profile for ..."
  284. IDS_GET_COMMON "Getting the common information ..."
  285. IDS_GET_DOMAIN "Getting the domain information ..."
  286. IDS_GET_OSINFO "Getting the OS information ..."
  287. IDS_GET_SITE "Getting the site information ..."
  288. IDS_GET_PROVIDER "Getting the RSOP provider ..."
  289. IDS_GET_METHOD "Getting the RSOP method ..."
  290. IDS_PUT_SID "Putting the SID ..."
  291. IDS_CREATE_SESSION "Creating the RSOP session for %s ..."
  292. IDS_DISPLAY_DATA "Starting the display of data ..."
  293. IDS_WAIT "Waiting for other instances to complete their method execution ..."
  294. END
  295. //
  296. // Version resources
  297. //
  298. #include <ntverp.h>
  299. #define VER_FILETYPE VFT_APP
  300. #define VER_FILESUBTYPE VFT2_UNKNOWN
  301. #define VER_FILEDESCRIPTION_STR "Query Group Policy RSOP Data"
  302. #define VER_INTERNALNAME_STR "gpresult.exe"
  303. #define VER_ORIGINALFILENAME_STR "gprslt.exe"
  304. #include <common.ver>