Partial implementation of the Shell32 call Win32DeleteFile(), required
[wine] / dlls / shell32 / shpolicy.c
1 /*
2  * shpolicy.c - Data for shell/system policies.
3  *
4  * Created 1999 by Ian Schmidt <ischmidt@cfl.rr.com>
5  *
6  * Some of these policies can be tweaked via the System Policy
7  * Editor which came with the Win95 Migration Guide, although
8  * there doesn't appear to be an updated Win98 version that
9  * would handle the many new policies introduced since then.
10  * You could easily write one with the information in 
11  * this file...
12  * 
13  * Up to date as of SHELL32 v4.72 (Win98, Win95 with MSIE 5)
14  */
15
16 #include <stdlib.h>
17 #include <string.h>
18
19 #include "wine/winuser16.h"
20 #include "shpolicy.h"
21
22 /* application strings */
23
24 static char strExplorer[] = {"Explorer"};
25 static char strActiveDesk[] = {"ActiveDesktop"};
26 static char strWinOldApp[] = {"WinOldApp"};
27
28 /* key strings */
29
30 static char strNoFileURL[] = {"NoFileUrl"};
31 static char strNoFolderOptions[] = {"NoFolderOptions"};
32 static char strNoChangeStartMenu[] = {"NoChangeStartMenu"};
33 static char strNoWindowsUpdate[] = {"NoWindowsUpdate"};
34 static char strNoSetActiveDesktop[] = {"NoSetActiveDesktop"};
35 static char strNoForgetSoftwareUpdate[] = {"NoForgetSoftwareUpdate"};
36 static char strNoMSAppLogo[] = {"NoMSAppLogo5ChannelNotify"};
37 static char strForceCopyACLW[] = {"ForceCopyACLWithFile"};
38 static char strNoResolveTrk[] = {"NoResolveTrack"};
39 static char strNoResolveSearch[] = {"NoResolveSearch"};
40 static char strNoEditComponent[] = {"NoEditingComponents"};
41 static char strNoMovingBand[] = {"NoMovingBands"};
42 static char strNoCloseDragDrop[] = {"NoCloseDragDropBands"};
43 static char strNoCloseComponent[] = {"NoClosingComponents"};
44 static char strNoDelComponent[] = {"NoDeletingComponents"};
45 static char strNoAddComponent[] = {"NoAddingComponents"};
46 static char strNoComponent[] = {"NoComponents"};
47 static char strNoChangeWallpaper[] = {"NoChangingWallpaper"};
48 static char strNoHTMLWallpaper[] = {"NoHTMLWallpaper"};
49 static char strNoCustomWebView[] = {"NoCustomizeWebView"};
50 static char strClassicShell[] = {"ClassicShell"};
51 static char strClearRecentDocs[] = {"ClearRecentDocsOnExit"};
52 static char strNoFavoritesMenu[] = {"NoFavoritesMenu"};
53 static char strNoActiveDesktopChanges[] = {"NoActiveDesktopChanges"};
54 static char strNoActiveDesktop[] = {"NoActiveDesktop"};
55 static char strNoRecentDocMenu[] = {"NoRecentDocsMenu"};
56 static char strNoRecentDocHistory[] = {"NoRecentDocsHistory"};
57 static char strNoInetIcon[] = {"NoInternetIcon"};
58 static char strNoStngsWizard[] = {"NoSettingsWizards"};
59 static char strNoLogoff[] = {"NoLogoff"};
60 static char strNoNetConDis[] = {"NoNetConnectDisconnect"};
61 static char strNoContextMenu[] = {"NoViewContextMenu"};
62 static char strNoTryContextMenu[] = {"NoTrayContextMenu"};
63 static char strNoWebMenu[] = {"NoWebMenu"};
64 static char strLnkResolveIgnoreLnkInfo[] = {"LinkResolveIgnoreLinkInfo"};
65 static char strNoCommonGroups[] = {"NoCommonGroups"};
66 static char strEnforceShlExtSecurity[] = {"EnforceShellExtensionSecurity"};
67 static char strNoRealMode[] = {"NoRealMode"};
68 static char strMyDocsOnNet[] = {"MyDocsOnNet"};
69 static char strNoStartMenuSubfolder[] = {"NoStartMenuSubFolders"};
70 static char strNoAddPrinters[] = {"NoAddPrinter"};
71 static char strNoDeletePrinters[] = {"NoDeletePrinter"};
72 static char strNoPrintTab[] = {"NoPrinterTabs"};
73 static char strRestrictRun[] = {"RestrictRun"};
74 static char strNoStartBanner[] = {"NoStartBanner"};
75 static char strNoNetworkNeighborhood[] = {"NoNetHood"};
76 static char strNoDriveTypeAtRun[] = {"NoDriveTypeAutoRun"};
77 static char strNoDrivesAutoRun[] = {"NoDriveAutoRun"};
78 static char strNoDrives[] = {"NoDrives"};
79 static char strNoFind[] = {"NoFind"};
80 static char strNoDesktop[] = {"NoDesktop"};
81 static char strNoSetTaskBar[] = {"NoSetTaskbar"};
82 static char strNoSetFld[] = {"NoSetFolders"};
83 static char strNoFileMenu[] = {"NoFileMenu"};
84 static char strNoSavSetng[] = {"NoSaveSettings"};
85 static char strNoClose[] = {"NoClose"};
86 static char strNoRun[] = {"NoRun"};
87
88 /* policy data array */
89
90 POLICYDATA sh32_policy_table[] = 
91 {
92   {
93     0x1,
94     strExplorer,
95     strNoRun,
96     SHELL_NO_POLICY
97   },
98   {
99     0x2,
100     strExplorer,
101     strNoClose,
102     SHELL_NO_POLICY
103   },
104   {
105     0x4,
106     strExplorer,
107     strNoSavSetng,
108     SHELL_NO_POLICY
109   },
110   {
111     0x8,
112     strExplorer,
113     strNoFileMenu,
114     SHELL_NO_POLICY
115   },
116   {
117     0x10,
118     strExplorer,
119     strNoSetFld,
120     SHELL_NO_POLICY
121   },
122   {
123     0x20,
124     strExplorer,
125     strNoSetTaskBar,
126     SHELL_NO_POLICY
127   },
128   {
129     0x40,
130     strExplorer,
131     strNoDesktop,
132     SHELL_NO_POLICY
133   },
134   {
135     0x80,
136     strExplorer,
137     strNoFind,
138     SHELL_NO_POLICY
139   },
140   {
141     0x100,
142     strExplorer,
143     strNoDrives,
144     SHELL_NO_POLICY
145   },
146   {
147     0x200,
148     strExplorer,
149     strNoDrivesAutoRun,
150     SHELL_NO_POLICY
151   },
152   {
153     0x400,
154     strExplorer,
155     strNoDriveTypeAtRun,
156     SHELL_NO_POLICY
157   },
158   {
159     0x800,
160     strExplorer,
161     strNoNetworkNeighborhood,
162     SHELL_NO_POLICY
163   },
164   {
165     0x1000,
166     strExplorer,
167     strNoStartBanner,
168     SHELL_NO_POLICY
169   },
170   {
171     0x2000,
172     strExplorer,
173     strRestrictRun,
174     SHELL_NO_POLICY
175   },
176   {
177     0x4000,
178     strExplorer,
179     strNoPrintTab,
180     SHELL_NO_POLICY
181   },
182   {
183     0x8000,
184     strExplorer,
185     strNoDeletePrinters,
186     SHELL_NO_POLICY
187   },
188   {
189     0x10000,
190     strExplorer,
191     strNoAddPrinters,
192     SHELL_NO_POLICY
193   },
194   {
195     0x20000,
196     strExplorer,
197     strNoStartMenuSubfolder,
198     SHELL_NO_POLICY
199   },
200   {
201     0x40000,
202     strExplorer,
203     strMyDocsOnNet,
204     SHELL_NO_POLICY
205   },
206   {
207     0x80000,
208     strWinOldApp,
209     strNoRealMode,
210     SHELL_NO_POLICY
211   },
212   {
213     0x100000,
214     strExplorer,
215     strEnforceShlExtSecurity,
216     SHELL_NO_POLICY
217   },
218   {
219     0x200000,
220     strExplorer,
221     strLnkResolveIgnoreLnkInfo,
222     SHELL_NO_POLICY
223   },
224   {
225     0x400000,
226     strExplorer,
227     strNoCommonGroups,
228     SHELL_NO_POLICY
229   },
230   {
231     0x1000000,
232     strExplorer,
233     strNoWebMenu,
234     SHELL_NO_POLICY
235   },
236   {
237     0x2000000,
238     strExplorer,
239     strNoTryContextMenu,
240     SHELL_NO_POLICY
241   },
242   {
243     0x4000000,
244     strExplorer,
245     strNoContextMenu,
246     SHELL_NO_POLICY
247   },
248   {
249     0x8000000,
250     strExplorer,
251     strNoNetConDis,
252     SHELL_NO_POLICY
253   },
254   {
255     0x10000000,
256     strExplorer,
257     strNoLogoff,
258     SHELL_NO_POLICY
259   },
260   {
261     0x20000000,
262     strExplorer,
263     strNoStngsWizard,
264     SHELL_NO_POLICY
265   },
266   {
267     0x40000001,
268     strExplorer,
269     strNoInetIcon,
270     SHELL_NO_POLICY
271   },
272   {
273     0x40000002,
274     strExplorer,
275     strNoRecentDocHistory,
276     SHELL_NO_POLICY
277   },
278   {
279     0x40000003,
280     strExplorer,
281     strNoRecentDocMenu,
282     SHELL_NO_POLICY
283   },
284   {
285     0x40000004,
286     strExplorer,
287     strNoActiveDesktop,
288     SHELL_NO_POLICY
289   },
290   {
291     0x40000005,
292     strExplorer,
293     strNoActiveDesktopChanges,
294     SHELL_NO_POLICY
295   },
296   {
297     0x40000006,
298     strExplorer,
299     strNoFavoritesMenu,
300     SHELL_NO_POLICY
301   },
302   {
303     0x40000007,
304     strExplorer,
305     strClearRecentDocs,
306     SHELL_NO_POLICY
307   },
308   {
309     0x40000008,
310     strExplorer,
311     strClassicShell,
312     SHELL_NO_POLICY
313   },
314   {
315     0x40000009,
316     strExplorer,
317     strNoCustomWebView,
318     SHELL_NO_POLICY
319   },
320   {
321     0x40000010,
322     strActiveDesk,
323     strNoHTMLWallpaper,
324     SHELL_NO_POLICY
325   },
326   {
327     0x40000011,
328     strActiveDesk,
329     strNoChangeWallpaper,
330     SHELL_NO_POLICY
331   },
332   {
333     0x40000012,
334     strActiveDesk,
335     strNoComponent,
336     SHELL_NO_POLICY
337   },
338   {
339     0x40000013,
340     strActiveDesk,
341     strNoAddComponent,
342     SHELL_NO_POLICY
343   },
344   {
345     0x40000014,
346     strActiveDesk,
347     strNoDelComponent,
348     SHELL_NO_POLICY
349   },
350   {
351     0x40000015,
352     strActiveDesk,
353     strNoCloseComponent,
354     SHELL_NO_POLICY
355   },
356   {
357     0x40000016,
358     strActiveDesk,
359     strNoCloseDragDrop,
360     SHELL_NO_POLICY
361   },
362   {
363     0x40000017,
364     strActiveDesk,
365     strNoMovingBand,
366     SHELL_NO_POLICY
367   },
368   {
369     0x40000018,
370     strActiveDesk,
371     strNoEditComponent,
372     SHELL_NO_POLICY
373   },
374   {
375     0x40000019,
376     strExplorer,
377     strNoResolveSearch,
378     SHELL_NO_POLICY
379   },
380   {
381     0x4000001a,
382     strExplorer,
383     strNoResolveTrk,
384     SHELL_NO_POLICY
385   },
386   {
387     0x4000001b,
388     strExplorer,
389     strForceCopyACLW,
390     SHELL_NO_POLICY
391   },
392   {
393     0x4000001c,
394     strExplorer,
395     strNoMSAppLogo,
396     SHELL_NO_POLICY
397   },
398   {
399     0x4000001d,
400     strExplorer,
401     strNoForgetSoftwareUpdate,
402     SHELL_NO_POLICY
403   },
404   {
405     0x4000001e,
406     strExplorer,
407     strNoSetActiveDesktop,
408     SHELL_NO_POLICY
409   },
410   {
411     0x4000001f,
412     strExplorer,
413     strNoWindowsUpdate,
414     SHELL_NO_POLICY
415   },
416   {
417     0x40000020,
418     strExplorer,
419     strNoChangeStartMenu,
420     SHELL_NO_POLICY
421   },
422   {
423     0x40000021,
424     strExplorer,
425     strNoFolderOptions,
426     SHELL_NO_POLICY
427   },
428   {
429     0x50000024,
430     strExplorer,
431     strNoFileURL,
432     SHELL_NO_POLICY
433   }
434 };