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 <ntverp.h>
  3. #include "gptext.h"
  4. #define VER_FILETYPE VFT_APP
  5. #define VER_FILESUBTYPE VFT2_UNKNOWN
  6. #define VER_FILEDESCRIPTION_STR "GPTExt"
  7. #define VER_INTERNALNAME_STR "gptext\0"
  8. #define VER_ORIGINALFILENAME_STR "gptext.dll"
  9. #include "common.ver"
  10. IDI_POLICY ICON policy.ico
  11. IDI_POLICY2 ICON policy2.ico
  12. IDI_POLICY3 ICON policy3.ico
  13. IDI_DOCUMENT ICON document.ico
  14. IDI_SCRIPT ICON script.ico
  15. IDI_FILTER ICON filter.ico
  16. IDB_16x16 BITMAP "icons16.bmp"
  17. IDB_32x32 BITMAP "icons32.bmp"
  18. STRINGTABLE
  19. BEGIN
  20. IDS_SCRIPTS_NAME "Scripts"
  21. IDS_SCRIPTS_NAME_MACHINE "Scripts (Startup/Shutdown)"
  22. IDS_SCRIPTS_NAME_USER "Scripts (Logon/Logoff)"
  23. IDS_NAME "Name"
  24. IDS_STATE "State"
  25. IDS_SETTING "Setting"
  26. IDS_PARAMETERS "Parameters"
  27. IDS_ENABLED "Enabled"
  28. IDS_DISABLED "Disabled"
  29. IDS_NOTCONFIGURED "Not configured"
  30. IDS_LOGON "Logon"
  31. IDS_LOGOFF "Logoff"
  32. IDS_STARTUP "Startup"
  33. IDS_SHUTDOWN "Shutdown"
  34. IDS_BROWSEFILTER "All Files#*.*##"
  35. IDS_BROWSE "Browse"
  36. IDS_SCRIPT_EDIT "Edit Script"
  37. IDS_SCRIPT_FILTER "Script Files#*.bat;*.cmd;*.vbs;*.js;*.exe#All Files#*.*##"
  38. IDS_POLICY_NAME "Administrative Templates"
  39. IDS_POLICY_NAME_MACHINE "Administrative Templates (Computers)"
  40. IDS_POLICY_NAME_USER "Administrative Templates (Users)"
  41. IDS_TEMPLATES "&Add/Remove Templates..."
  42. IDS_TEMPLATESDESC "Manage administrative templates"
  43. IDS_SIZE "Size"
  44. IDS_MODIFIED "Modified"
  45. IDS_POLICYFILTER "Policy Templates#*.adm##"
  46. IDS_POLICYTITLE "Policy Templates"
  47. IDS_NONE "(None)"
  48. //
  49. // Dev note: If you are adding new adm files to the system and you want
  50. // them automatically loaded by the Administrative Templates snapin,
  51. // all you have to do is add the filename to **both** lists below (semi-colon seperated).
  52. //
  53. IDS_DEFAULTTEMPLATES "system.adm;inetres.adm;conf.adm;wmplayer.adm;wuau.adm"
  54. IDS_ADDITIONALTTEMPLATES "wmplayer.adm;wuau.adm"
  55. IDS_LISTBOX_SHOW "Show..."
  56. IDS_VALUE "Value"
  57. IDS_VALUENAME "Value Name"
  58. IDS_VALUENAMENOTUNIQUE "The name you entered has already been used. You need to enter a unique name."
  59. IDS_EMPTYVALUENAME "You need to enter a name."
  60. IDS_VALUEDATANOTUNIQUE "The value you entered has already been used. You need to enter a unique value."
  61. IDS_EMPTYVALUEDATA "You need to enter a value."
  62. IDS_FILTERING "Filtering..."
  63. IDS_FILTERINGDESC "Displays filtering options."
  64. IDS_GPONAME "GPO Name"
  65. IDS_MULTIPLEGPOS "(Merged GPOs)"
  66. IDS_DESCTEXT "%d scripts (processed from top to bottom)"
  67. IDS_LASTEXECUTED "Last Executed"
  68. IDS_SAVEFAILED "The Scripts component is unable to save the changes due to error %d."
  69. IDS_DISPLAYPROPERTIES "Display <A HREF = javascript:external.ExecuteSelectionMenuItem('_PROPERTIES')>Properties </A>"
  70. IDS_EXTRAREGSETTINGS "Extra Registry Settings"
  71. IDS_STRINGTOOLONG "The following entry in the [strings] section is too long and has been truncated.\n\n%s"
  72. IDS_WORDTOOLONG "The following keyword is too long:\n\n%s"
  73. IDS_ErrOUTOFMEMORY "There is not enough memory available. Quit one or more applications and try again."
  74. IDS_ParseErr_UNEXPECTED_KEYWORD "Unexpected keyword"
  75. IDS_ParseErr_UNEXPECTED_EOF "Unexpected end of file"
  76. IDS_ParseErr_DUPLICATE_KEYNAME "Key name specified more than once. Likely causes are: 1) the KEYNAME tag is defined multiple times in this category 2) this KEYNAME is already defined in another category with the same name \
  77. 3) this KEYNAME is already defined in another category with the same name in a different adm file."
  78. IDS_ParseErr_DUPLICATE_VALUENAME "Value name specified more than once"
  79. IDS_ParseErr_DUPLICATE_ITEMNAME "Item name specified more than once"
  80. IDS_ParseErr_DUPLICATE_ACTIONLIST "More than one action list was specified"
  81. IDS_ParseErr_NO_KEYNAME "There was no key name specified for this entry or any of its parents"
  82. IDS_ParseErr_NO_VALUENAME "There was no value name specified"
  83. IDS_ParseErr_NO_VALUE "There was no value specified"
  84. IDS_ParseErr_NO_ITEMNAME "There was no item name specified"
  85. IDS_ParseErr_NOT_NUMERIC "Expected a numeric value"
  86. IDS_ParseErr_STRING_NOT_FOUND "The corresponding string was not found in the [strings] section"
  87. IDS_ParseErr_UNMATCHED_DIRECTIVE "An unmatched interpreter directive was found"
  88. IDS_ParseErr_DUPLICATE_HELP "Help string specified more than once"
  89. IDS_ParseErr_DUPLICATE_CLIENTEXT "CLIENTEXT string specified more than once"
  90. IDS_ParseErr_INVALID_CLIENTEXT "GUID specified in CLIENTEXT is invalid. Format should be: {4765724D-ACCE-11d2-9A8F-0000F87571E3}"
  91. IDS_ParseErr_DUPLICATE_SUPPORTED "Supported string specified more than once"
  92. IDS_ParseErr_MISSINGVALUEON_OR_OFF "Missing either a VALUEON or VALUEOFF keyword. Policies using the unnamed registry value must have both VALUEON and VALUEOFF defined."
  93. IDS_ParseFmt_MSG_FORMAT "The following error occurred in %s on line %lu:\r\nError %lu %s\r\n\r\n"
  94. IDS_ParseFmt_FOUND "Found: %s\r\n"
  95. IDS_ParseFmt_EXPECTED "Expected: %s\r\n"
  96. IDS_ParseFmt_FATAL "\r\nThe file can not be loaded.\r\n"
  97. IDS_ENTRYREQUIRED "You need to enter something for ""%s"" This field cannot be left blank."
  98. IDS_INVALIDNUM "You need to enter a number for ""%s"" This field has invalid characters or the number is too large."
  99. IDS_NUMBERTOOLARGE "%lu is greater than the maximum allowed value of %lu. %lu will be saved instead of %lu."
  100. IDS_NUMBERTOOSMALL "%d is less than the minimum allowed value of %d. %d will be saved instead of %d."
  101. IDS_POLICYCHANGEDFAILED "The Group Policy snapin was unable to save your changes due to the following error:\r\n\r\n %s"
  102. IDS_INVALIDADMFILE "%s is not a valid template file. Only files that end with the .adm file extension can be added to this Group Policy Object."
  103. IDS_IPSEC_NAME "IP Security"
  104. IDS_WIRELESS_NAME "Wireless Group Policy"
  105. IDS_PSCHED_NAME "QoS Packet Scheduler"
  106. IDS_LOGON_DESC "A user logon script"
  107. IDS_LOGOFF_DESC "A user logoff script"
  108. IDS_STARTUP_DESC "A computer startup script"
  109. IDS_SHUTDOWN_DESC "A computer shutdown script"
  110. IDS_SCRIPTS_DESC "Group Policy scripts"
  111. IDS_SCRIPTS_USER_DESC "Administrators use this extension to specify scripts that are run when the user logs on or off the computer. Scripts run in the user's context."
  112. IDS_SCRIPTS_COMPUTER_DESC "Administrators use this extension to specify scripts that are to run during computer startup or shutdown. Scripts run in the Local System context."
  113. IDS_SCRIPTS_LOGON "Contains user logon scripts."
  114. IDS_SCRIPTS_LOGOFF "Contains user logoff scripts."
  115. IDS_SCRIPTS_STARTUP "Contains computer startup scripts."
  116. IDS_SCRIPTS_SHUTDOWN "Contains computer shutdown scripts."
  117. IDS_POLICY_DESC "The Group Policy Administrative Templates node contains all registry-based policy information. "
  118. IDS_RSOP_ADMFAILED "The latest versions of the ADM files below are not available. This can be due to insufficient permissions or unavailable network resources. The local copy of these ADM files will be used."
  119. IDS_FAILED_RSOPFMT "%.100s\r\nLocation - ""%.300s""\r\nError - %.100s"
  120. IDS_BINARYDATA "(Binary data)"
  121. IDS_UNKNOWNDATA "(Unknown data format)"
  122. IDS_EXSETROOT_DESC "This node contains registry settings that do not correspond to an Administrative Template policy (e.g. they did not originate from a .adm file). These settings may have been defined by a different snap-in."
  123. IDS_EXSET_DESC "This registry setting does not correspond to an Administrative Template policy (e.g. they did not originate from a .adm file). It may have been defined by a different snap-in."
  124. IDS_PREFERENCE "\r\n\r\nNote: This registry setting is not stored in a policies key and thus considered a preference. Therefore if the Group Policy Object that implements this setting is ever removed, this setting will remain."
  125. IDS_SUPPORTEDDESC "<BR>\n<BR>\nRequirements:<BR>\n"
  126. IDS_NOSUPPORTINFO "Policies with no Requirements information"
  127. END
  128. IDD_SCRIPT DIALOG DISCARDABLE 0, 0, 252, 218
  129. STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
  130. CAPTION "Scripts"
  131. FONT 8, "MS Shell Dlg"
  132. BEGIN
  133. ICON IDI_SCRIPT, -1, 7, 7, 18, 20
  134. LTEXT "%s Scripts for %s",IDC_SCRIPT_TITLE,46,12,197,16
  135. CONTROL "",-1,"Static",SS_BLACKFRAME | SS_SUNKEN,7,34,238,1
  136. CONTROL "",IDC_SCRIPT_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS |
  137. LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,43,181,108
  138. PUSHBUTTON "&Up",IDC_SCRIPT_UP,195,55,50,14
  139. PUSHBUTTON "Do&wn",IDC_SCRIPT_DOWN,195,69,50,14
  140. PUSHBUTTON "A&dd...",IDC_SCRIPT_ADD,195,101,50,14
  141. PUSHBUTTON "&Edit...",IDC_SCRIPT_EDIT,195,119,50,14
  142. PUSHBUTTON "&Remove",IDC_SCRIPT_REMOVE,195,137,50,14
  143. CONTROL "",-1,"Static",SS_BLACKFRAME | SS_SUNKEN,7,167,238,1
  144. LTEXT "To view the script files stored in this Group Policy Object, press the button below.",
  145. -1,7,173,197,16
  146. PUSHBUTTON "&Show Files...",IDC_SCRIPT_SHOW,7,195,80,14
  147. END
  148. IDD_SCRIPT_EDIT DIALOGEX 22, 34, 252, 100
  149. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  150. EXSTYLE WS_EX_CONTEXTHELP
  151. CAPTION "Add a Script"
  152. FONT 8, "MS Shell Dlg"
  153. BEGIN
  154. LTEXT "Script &Name:", -1, 8, 11, 145, 8
  155. EDITTEXT IDC_SCRIPT_NAME, 8, 23, 177, 12, ES_AUTOHSCROLL
  156. LTEXT "Script &Parameters:", -1, 8, 46, 147, 8
  157. EDITTEXT IDC_SCRIPT_ARGS, 8, 58, 177, 12, ES_AUTOHSCROLL
  158. PUSHBUTTON "&Browse...", IDC_SCRIPT_BROWSE, 194, 22, 50, 14
  159. DEFPUSHBUTTON "OK", IDOK, 138, 82, 50, 14
  160. PUSHBUTTON "Cancel", IDCANCEL, 195, 82, 50, 14
  161. END
  162. IDD_POLICY DIALOGEX DISCARDABLE 0, 0, 252, 218
  163. STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
  164. CAPTION "Setting"
  165. FONT 8, "MS Shell Dlg"
  166. BEGIN
  167. ICON IDI_POLICY2, IDC_POLICYICON, 7, 8, 16, 16
  168. LTEXT "", IDC_POLICY, 20, 10, 225, 8, SS_ENDELLIPSIS | SS_NOPREFIX
  169. CONTROL "", -1, "Static", SS_BLACKFRAME | SS_SUNKEN, 7, 25, 238, 1
  170. AUTORADIOBUTTON "Not &Configured", IDC_NOCONFIG, 7, 34, 238, 10, WS_GROUP | WS_TABSTOP
  171. AUTORADIOBUTTON "&Enabled", IDC_ENABLED, 7, 46, 238, 10
  172. AUTORADIOBUTTON "&Disabled", IDC_DISABLED, 7, 58, 238, 10
  173. CONTROL "",IDC_POLICY_SETTINGS,"ClipClass",WS_TABSTOP | WS_VISIBLE |
  174. WS_CHILD | WS_VSCROLL | WS_HSCROLL, 7, 70, 238, 115, WS_EX_CLIENTEDGE
  175. LTEXT "Supported on:", IDC_SUPPORTEDTITLE, 7, 187, 50, 8
  176. LTEXT "", IDC_SUPPORTED, 60, 187, 178, 8, SS_ENDELLIPSIS | SS_NOPREFIX
  177. PUSHBUTTON "&Previous Setting",IDC_POLICY_PREVIOUS,7,199,75,14, WS_GROUP | WS_TABSTOP
  178. PUSHBUTTON "&Next Setting",IDC_POLICY_NEXT,86,199,75,14
  179. END
  180. IDD_POLICY_HELP DIALOG DISCARDABLE 0, 0, 252, 218
  181. STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
  182. CAPTION "Explain"
  183. FONT 8, "MS Shell Dlg"
  184. BEGIN
  185. LTEXT "",IDC_POLICY_TITLE,7,7,235,10, SS_ENDELLIPSIS | SS_NOPREFIX
  186. PUSHBUTTON "&Previous Setting",IDC_POLICY_PREVIOUS,7,199,75,14
  187. PUSHBUTTON "&Next Setting",IDC_POLICY_NEXT,86,199,75,14
  188. EDITTEXT IDC_POLICY_HELP,7,19,238,176,ES_READONLY | ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL
  189. END
  190. IDD_POLICY_PRECEDENCE DIALOG DISCARDABLE 0, 0, 252, 218
  191. STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
  192. CAPTION "Precedence"
  193. FONT 8, "MS Shell Dlg"
  194. BEGIN
  195. LTEXT "",IDC_POLICY_TITLE,7,7,235,10, SS_ENDELLIPSIS | SS_NOPREFIX
  196. LTEXT "GPOs higher in the list have the highest priority",-1,7,187,238,10
  197. PUSHBUTTON "&Previous Setting",IDC_POLICY_PREVIOUS,7,199,75,14
  198. PUSHBUTTON "&Next Setting",IDC_POLICY_NEXT,86,199,75,14
  199. CONTROL "",IDC_POLICY_PRECEDENCE,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
  200. LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,19,238,164
  201. END
  202. IDD_TEMPLATES DIALOG 42, 63, 288, 150
  203. STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  204. CAPTION "Add/Remove Templates"
  205. FONT 8, "MS Shell Dlg"
  206. BEGIN
  207. LTEXT "&Current Policy Templates:", IDC_TEMPLATE_TEXT, 8, 8, 248, 8
  208. CONTROL "", IDC_TEMPLATELIST, WC_LISTVIEW, LVS_REPORT |
  209. LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,
  210. 8, 20, 270, 100
  211. PUSHBUTTON "&Add...", IDC_ADDTEMPLATES, 8, 130, 50, 14
  212. PUSHBUTTON "&Remove", IDC_REMOVETEMPLATES, 66, 130, 50, 14, WS_DISABLED
  213. DEFPUSHBUTTON "C&lose", IDCLOSE, 229, 130, 50, 14
  214. END
  215. IDD_POLICY_LBADD DIALOG 6, 18, 260, 46
  216. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  217. CAPTION "Add Item"
  218. FONT 8, "MS Shell Dlg"
  219. BEGIN
  220. LTEXT "&Enter the item to be added:", -1, 7, 7, 180, 8
  221. EDITTEXT IDC_POLICY_VALUEDATA, 7, 19, 180, 12, ES_AUTOHSCROLL
  222. PUSHBUTTON "OK", IDOK, 203, 7, 50, 14
  223. PUSHBUTTON "Cancel", IDCANCEL, 203, 24, 50, 14
  224. EDITTEXT IDC_POLICY_VALUENAME, 0,0,1,1, ES_AUTOHSCROLL, WS_DISABLED
  225. END
  226. IDD_POLICY_LBADD2 DIALOG 6, 18, 260, 77
  227. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  228. CAPTION "Add Item"
  229. FONT 8, "MS Shell Dlg"
  230. BEGIN
  231. LTEXT "Enter the &name of the item to be added:", -1, 7, 7, 180, 8
  232. EDITTEXT IDC_POLICY_VALUENAME, 7, 19, 180, 12, ES_AUTOHSCROLL
  233. LTEXT "Enter the &value of the item to be added:", -1, 7, 42, 180, 8
  234. EDITTEXT IDC_POLICY_VALUEDATA, 7, 54, 180, 12, ES_AUTOHSCROLL
  235. PUSHBUTTON "OK", IDOK, 203, 7, 50, 14
  236. PUSHBUTTON "Cancel", IDCANCEL, 203, 24, 50, 14
  237. END
  238. IDD_POLICY_SHOWLISTBOX DIALOGEX 6, 18, 377, 163
  239. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  240. CAPTION "Show Contents"
  241. FONT 8, "MS Shell Dlg"
  242. BEGIN
  243. CONTROL "",IDC_POLICY_LISTBOX,"SysListView32",WS_TABSTOP | WS_VSCROLL |
  244. LVS_REPORT | LVS_SORTASCENDING, 6, 18, 302, 140, WS_EX_CLIENTEDGE
  245. LTEXT "",IDC_POLICY_TITLE, 6, 6, 171, 8
  246. DEFPUSHBUTTON "OK", IDOK, 317, 7, 54, 14
  247. PUSHBUTTON "Cancel", IDCANCEL, 317, 24, 54, 14
  248. PUSHBUTTON "&Add...", IDC_POLICY_ADD, 317, 64, 54, 14
  249. PUSHBUTTON "&Remove",IDC_POLICY_REMOVE, 317, 81, 54, 14
  250. END
  251. IDD_POLICY_FILTERING DIALOGEX 6, 18, 252, 213
  252. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  253. EXSTYLE WS_EX_CONTEXTHELP
  254. CAPTION "Filtering"
  255. FONT 8, "MS Shell Dlg"
  256. BEGIN
  257. ICON IDI_FILTER, IDC_FILTERING_ICON, 7, 7, 18, 20
  258. LTEXT "These options allow you to filter the Administrative Templates policies.", IDC_STATIC,
  259. 46, 10, 195, 16
  260. CONTROL "", -1, "Static", SS_BLACKFRAME | SS_SUNKEN, 7, 33, 238, 1
  261. AUTOCHECKBOX "&Filter by Requirements information", IDC_SUPPORTEDOPTION, 7, 42, 230, 10
  262. LTEXT "Select the &items to be displayed:", IDC_SUPPORTEDONTITLE, 20, 56 222, 8
  263. CONTROL "",IDC_FILTERLIST,"SysListView32",WS_TABSTOP | WS_VSCROLL |
  264. LVS_REPORT | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER, 20, 66, 222, 70, WS_EX_CLIENTEDGE
  265. PUSHBUTTON "&Select All", IDC_SELECTALL, 20, 139, 50, 14
  266. PUSHBUTTON "&Deselect All", IDC_DESELECTALL, 75, 139, 50, 14
  267. AUTOCHECKBOX "Only show &configured policy settings", IDC_SHOWCONFIG, 7, 163, 230, 10
  268. AUTOCHECKBOX "Only show &policy settings that can be fully managed", IDC_SHOWPOLICIES, 7, 175, 230, 10
  269. PUSHBUTTON "OK", IDOK, 71, 193, 50, 14
  270. PUSHBUTTON "Cancel", IDCANCEL, 131, 193, 50, 14
  271. END
  272. IDD_ERROR_ADMTEMPLATES DIALOGEX 45, 48, 275, 141
  273. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_EX_TOPMOST
  274. CAPTION "Administrative Templates"
  275. FONT 8, "MS Shell Dlg"
  276. BEGIN
  277. ICON IDI_POLICY, IDC_ERROR_ICON, 8, 11, 18, 20
  278. LTEXT "", IDC_ERRORTEXT, 40, 11, 165, 36
  279. GROUPBOX "Details:", IDC_DETAILSBORDER, 8, 52, 262, 81
  280. EDITTEXT IDC_DETAILSTEXT, 14, 62, 250, 65, ES_MULTILINE |
  281. ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL | ES_AUTOHSCROLL | WS_HSCROLL
  282. DEFPUSHBUTTON "&Close", IDCLOSE, 219, 9, 50, 14
  283. END