aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/WindowsInstallerStandard.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Data/WindowsInstallerStandard.cs')
-rw-r--r--src/WixToolset.Data/WindowsInstallerStandard.cs444
1 files changed, 0 insertions, 444 deletions
diff --git a/src/WixToolset.Data/WindowsInstallerStandard.cs b/src/WixToolset.Data/WindowsInstallerStandard.cs
deleted file mode 100644
index 1060d11b..00000000
--- a/src/WixToolset.Data/WindowsInstallerStandard.cs
+++ /dev/null
@@ -1,444 +0,0 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset.Data
4{
5 using System.Collections.Generic;
6 using System.Reflection;
7 using System.Xml;
8 using WixToolset.Data.Rows;
9
10 /// <summary>
11 /// Represents the Windows Installer standard objects.
12 /// </summary>
13 public static class WindowsInstallerStandard
14 {
15 private static readonly object lockObject = new object();
16
17 private static TableDefinitionCollection tableDefinitions;
18 private static WixActionRowCollection standardActions;
19
20 private static HashSet<string> standardActionNames;
21 private static HashSet<string> standardDirectories;
22 private static HashSet<string> standardProperties;
23
24
25 /// <summary>
26 /// Gets the table definitions stored in this assembly.
27 /// </summary>
28 /// <returns>Table definition collection for tables stored in this assembly.</returns>
29 public static TableDefinitionCollection GetTableDefinitions()
30 {
31 lock (lockObject)
32 {
33 if (null == WindowsInstallerStandard.tableDefinitions)
34 {
35 using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Data.Data.tables.xml")))
36 {
37 tableDefinitions = TableDefinitionCollection.Load(reader);
38 }
39 }
40 }
41
42 return WindowsInstallerStandard.tableDefinitions;
43 }
44
45 /// <summary>
46 /// Gets the standard actions stored in this assembly.
47 /// </summary>
48 /// <returns>Collection of standard actions in this assembly.</returns>
49 public static WixActionRowCollection GetStandardActions()
50 {
51 lock (lockObject)
52 {
53 if (null == standardActions)
54 {
55 using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Data.Data.actions.xml")))
56 {
57 standardActions = WixActionRowCollection.Load(reader);
58 }
59 }
60 }
61
62 return standardActions;
63 }
64
65
66 /// <summary>
67 /// Gets (and loads if not yet loaded) the list of standard MSI directories.
68 /// </summary>
69 /// <value>The list of standard MSI directories.</value>
70 public static HashSet<string> GetStandardDirectories()
71 {
72 lock (lockObject)
73 {
74 if (null == standardDirectories)
75 {
76 LoadStandardDirectories();
77 }
78 }
79
80 return standardDirectories;
81 }
82
83 /// <summary>
84 /// Find out if an action is a standard action.
85 /// </summary>
86 /// <param name="actionName">Name of the action.</param>
87 /// <returns>true if the action is standard, false otherwise.</returns>
88 public static bool IsStandardAction(string actionName)
89 {
90 lock (lockObject)
91 {
92 if (null == standardActionNames)
93 {
94 standardActionNames = new HashSet<string>();
95 standardActionNames.Add("AllocateRegistrySpace");
96 standardActionNames.Add("AppSearch");
97 standardActionNames.Add("BindImage");
98 standardActionNames.Add("CCPSearch");
99 standardActionNames.Add("CostFinalize");
100 standardActionNames.Add("CostInitialize");
101 standardActionNames.Add("CreateFolders");
102 standardActionNames.Add("CreateShortcuts");
103 standardActionNames.Add("DeleteServices");
104 standardActionNames.Add("DisableRollback");
105 standardActionNames.Add("DuplicateFiles");
106 standardActionNames.Add("ExecuteAction");
107 standardActionNames.Add("FileCost");
108 standardActionNames.Add("FindRelatedProducts");
109 standardActionNames.Add("ForceReboot");
110 standardActionNames.Add("InstallAdminPackage");
111 standardActionNames.Add("InstallExecute");
112 standardActionNames.Add("InstallExecuteAgain");
113 standardActionNames.Add("InstallFiles");
114 standardActionNames.Add("InstallFinalize");
115 standardActionNames.Add("InstallInitialize");
116 standardActionNames.Add("InstallODBC");
117 standardActionNames.Add("InstallServices");
118 standardActionNames.Add("InstallSFPCatalogFile");
119 standardActionNames.Add("InstallValidate");
120 standardActionNames.Add("IsolateComponents");
121 standardActionNames.Add("LaunchConditions");
122 standardActionNames.Add("MigrateFeatureStates");
123 standardActionNames.Add("MoveFiles");
124 standardActionNames.Add("MsiConfigureServices");
125 standardActionNames.Add("MsiPublishAssemblies");
126 standardActionNames.Add("MsiUnpublishAssemblies");
127 standardActionNames.Add("PatchFiles");
128 standardActionNames.Add("ProcessComponents");
129 standardActionNames.Add("PublishComponents");
130 standardActionNames.Add("PublishFeatures");
131 standardActionNames.Add("PublishProduct");
132 standardActionNames.Add("RegisterClassInfo");
133 standardActionNames.Add("RegisterComPlus");
134 standardActionNames.Add("RegisterExtensionInfo");
135 standardActionNames.Add("RegisterFonts");
136 standardActionNames.Add("RegisterMIMEInfo");
137 standardActionNames.Add("RegisterProduct");
138 standardActionNames.Add("RegisterProgIdInfo");
139 standardActionNames.Add("RegisterTypeLibraries");
140 standardActionNames.Add("RegisterUser");
141 standardActionNames.Add("RemoveDuplicateFiles");
142 standardActionNames.Add("RemoveEnvironmentStrings");
143 standardActionNames.Add("RemoveExistingProducts");
144 standardActionNames.Add("RemoveFiles");
145 standardActionNames.Add("RemoveFolders");
146 standardActionNames.Add("RemoveIniValues");
147 standardActionNames.Add("RemoveODBC");
148 standardActionNames.Add("RemoveRegistryValues");
149 standardActionNames.Add("RemoveShortcuts");
150 standardActionNames.Add("ResolveSource");
151 standardActionNames.Add("RMCCPSearch");
152 standardActionNames.Add("ScheduleReboot");
153 standardActionNames.Add("SelfRegModules");
154 standardActionNames.Add("SelfUnregModules");
155 standardActionNames.Add("SetODBCFolders");
156 standardActionNames.Add("StartServices");
157 standardActionNames.Add("StopServices");
158 standardActionNames.Add("UnpublishComponents");
159 standardActionNames.Add("UnpublishFeatures");
160 standardActionNames.Add("UnregisterClassInfo");
161 standardActionNames.Add("UnregisterComPlus");
162 standardActionNames.Add("UnregisterExtensionInfo");
163 standardActionNames.Add("UnregisterFonts");
164 standardActionNames.Add("UnregisterMIMEInfo");
165 standardActionNames.Add("UnregisterProgIdInfo");
166 standardActionNames.Add("UnregisterTypeLibraries");
167 standardActionNames.Add("ValidateProductID");
168 standardActionNames.Add("WriteEnvironmentStrings");
169 standardActionNames.Add("WriteIniValues");
170 standardActionNames.Add("WriteRegistryValues");
171 }
172 }
173
174 return standardActionNames.Contains(actionName);
175 }
176
177 /// <summary>
178 /// Find out if a directory is a standard directory.
179 /// </summary>
180 /// <param name="directoryName">Name of the directory.</param>
181 /// <returns>true if the directory is standard, false otherwise.</returns>
182 public static bool IsStandardDirectory(string directoryName)
183 {
184 lock (lockObject)
185 {
186 if (null == standardDirectories)
187 {
188 LoadStandardDirectories();
189 }
190 }
191
192 return standardDirectories.Contains(directoryName);
193 }
194
195 /// <summary>
196 /// Find out if a property is a standard property.
197 /// References:
198 /// Title: Property Reference [Windows Installer]:
199 /// URL: http://msdn.microsoft.com/library/en-us/msi/setup/property_reference.asp
200 /// </summary>
201 /// <param name="propertyName">Name of the property.</param>
202 /// <returns>true if a property is standard, false otherwise.</returns>
203 public static bool IsStandardProperty(string propertyName)
204 {
205 lock (lockObject)
206 {
207 if (null == standardProperties)
208 {
209 standardProperties = new HashSet<string>();
210 standardProperties.Add("~"); // REG_MULTI_SZ/NULL marker
211 standardProperties.Add("ACTION");
212 standardProperties.Add("ADDDEFAULT");
213 standardProperties.Add("ADDLOCAL");
214 standardProperties.Add("ADDDSOURCE");
215 standardProperties.Add("AdminProperties");
216 standardProperties.Add("AdminUser");
217 standardProperties.Add("ADVERTISE");
218 standardProperties.Add("AFTERREBOOT");
219 standardProperties.Add("AllowProductCodeMismatches");
220 standardProperties.Add("AllowProductVersionMajorMismatches");
221 standardProperties.Add("ALLUSERS");
222 standardProperties.Add("Alpha");
223 standardProperties.Add("ApiPatchingSymbolFlags");
224 standardProperties.Add("ARPAUTHORIZEDCDFPREFIX");
225 standardProperties.Add("ARPCOMMENTS");
226 standardProperties.Add("ARPCONTACT");
227 standardProperties.Add("ARPHELPLINK");
228 standardProperties.Add("ARPHELPTELEPHONE");
229 standardProperties.Add("ARPINSTALLLOCATION");
230 standardProperties.Add("ARPNOMODIFY");
231 standardProperties.Add("ARPNOREMOVE");
232 standardProperties.Add("ARPNOREPAIR");
233 standardProperties.Add("ARPPRODUCTIONICON");
234 standardProperties.Add("ARPREADME");
235 standardProperties.Add("ARPSIZE");
236 standardProperties.Add("ARPSYSTEMCOMPONENT");
237 standardProperties.Add("ARPULRINFOABOUT");
238 standardProperties.Add("ARPURLUPDATEINFO");
239 standardProperties.Add("AVAILABLEFREEREG");
240 standardProperties.Add("BorderSize");
241 standardProperties.Add("BorderTop");
242 standardProperties.Add("CaptionHeight");
243 standardProperties.Add("CCP_DRIVE");
244 standardProperties.Add("ColorBits");
245 standardProperties.Add("COMPADDLOCAL");
246 standardProperties.Add("COMPADDSOURCE");
247 standardProperties.Add("COMPANYNAME");
248 standardProperties.Add("ComputerName");
249 standardProperties.Add("CostingComplete");
250 standardProperties.Add("Date");
251 standardProperties.Add("DefaultUIFont");
252 standardProperties.Add("DISABLEADVTSHORTCUTS");
253 standardProperties.Add("DISABLEMEDIA");
254 standardProperties.Add("DISABLEROLLBACK");
255 standardProperties.Add("DiskPrompt");
256 standardProperties.Add("DontRemoveTempFolderWhenFinished");
257 standardProperties.Add("EnableUserControl");
258 standardProperties.Add("EXECUTEACTION");
259 standardProperties.Add("EXECUTEMODE");
260 standardProperties.Add("FASTOEM");
261 standardProperties.Add("FILEADDDEFAULT");
262 standardProperties.Add("FILEADDLOCAL");
263 standardProperties.Add("FILEADDSOURCE");
264 standardProperties.Add("IncludeWholeFilesOnly");
265 standardProperties.Add("Installed");
266 standardProperties.Add("INSTALLLEVEL");
267 standardProperties.Add("Intel");
268 standardProperties.Add("Intel64");
269 standardProperties.Add("IsAdminPackage");
270 standardProperties.Add("LeftUnit");
271 standardProperties.Add("LIMITUI");
272 standardProperties.Add("ListOfPatchGUIDsToReplace");
273 standardProperties.Add("ListOfTargetProductCode");
274 standardProperties.Add("LOGACTION");
275 standardProperties.Add("LogonUser");
276 standardProperties.Add("Manufacturer");
277 standardProperties.Add("MEDIAPACKAGEPATH");
278 standardProperties.Add("MediaSourceDir");
279 standardProperties.Add("MinimumRequiredMsiVersion");
280 standardProperties.Add("MsiAMD64");
281 standardProperties.Add("MSIAPRSETTINGSIDENTIFIER");
282 standardProperties.Add("MSICHECKCRCS");
283 standardProperties.Add("MSIDISABLERMRESTART");
284 standardProperties.Add("MSIENFORCEUPGRADECOMPONENTRULES");
285 standardProperties.Add("MSIFASTINSTALL");
286 standardProperties.Add("MsiFileToUseToCreatePatchTables");
287 standardProperties.Add("MsiHiddenProperties");
288 standardProperties.Add("MSIINSTALLPERUSER");
289 standardProperties.Add("MSIINSTANCEGUID");
290 standardProperties.Add("MsiLogFileLocation");
291 standardProperties.Add("MsiLogging");
292 standardProperties.Add("MsiNetAssemblySupport");
293 standardProperties.Add("MSINEWINSTANCE");
294 standardProperties.Add("MSINODISABLEMEDIA");
295 standardProperties.Add("MsiNTProductType");
296 standardProperties.Add("MsiNTSuiteBackOffice");
297 standardProperties.Add("MsiNTSuiteDataCenter");
298 standardProperties.Add("MsiNTSuiteEnterprise");
299 standardProperties.Add("MsiNTSuiteSmallBusiness");
300 standardProperties.Add("MsiNTSuiteSmallBusinessRestricted");
301 standardProperties.Add("MsiNTSuiteWebServer");
302 standardProperties.Add("MsiNTSuitePersonal");
303 standardProperties.Add("MsiPatchRemovalList");
304 standardProperties.Add("MSIPATCHREMOVE");
305 standardProperties.Add("MSIRESTARTMANAGERCONTROL");
306 standardProperties.Add("MsiRestartManagerSessionKey");
307 standardProperties.Add("MSIRMSHUTDOWN");
308 standardProperties.Add("MsiRunningElevated");
309 standardProperties.Add("MsiUIHideCancel");
310 standardProperties.Add("MsiUIProgressOnly");
311 standardProperties.Add("MsiUISourceResOnly");
312 standardProperties.Add("MsiSystemRebootPending");
313 standardProperties.Add("MsiWin32AssemblySupport");
314 standardProperties.Add("NOCOMPANYNAME");
315 standardProperties.Add("NOUSERNAME");
316 standardProperties.Add("OLEAdvtSupport");
317 standardProperties.Add("OptimizePatchSizeForLargeFiles");
318 standardProperties.Add("OriginalDatabase");
319 standardProperties.Add("OutOfDiskSpace");
320 standardProperties.Add("OutOfNoRbDiskSpace");
321 standardProperties.Add("ParentOriginalDatabase");
322 standardProperties.Add("ParentProductCode");
323 standardProperties.Add("PATCH");
324 standardProperties.Add("PATCH_CACHE_DIR");
325 standardProperties.Add("PATCH_CACHE_ENABLED");
326 standardProperties.Add("PatchGUID");
327 standardProperties.Add("PATCHNEWPACKAGECODE");
328 standardProperties.Add("PATCHNEWSUMMARYCOMMENTS");
329 standardProperties.Add("PATCHNEWSUMMARYSUBJECT");
330 standardProperties.Add("PatchOutputPath");
331 standardProperties.Add("PatchSourceList");
332 standardProperties.Add("PhysicalMemory");
333 standardProperties.Add("PIDKEY");
334 standardProperties.Add("PIDTemplate");
335 standardProperties.Add("Preselected");
336 standardProperties.Add("PRIMARYFOLDER");
337 standardProperties.Add("PrimaryVolumePath");
338 standardProperties.Add("PrimaryVolumeSpaceAvailable");
339 standardProperties.Add("PrimaryVolumeSpaceRemaining");
340 standardProperties.Add("PrimaryVolumeSpaceRequired");
341 standardProperties.Add("Privileged");
342 standardProperties.Add("ProductCode");
343 standardProperties.Add("ProductID");
344 standardProperties.Add("ProductLanguage");
345 standardProperties.Add("ProductName");
346 standardProperties.Add("ProductState");
347 standardProperties.Add("ProductVersion");
348 standardProperties.Add("PROMPTROLLBACKCOST");
349 standardProperties.Add("REBOOT");
350 standardProperties.Add("REBOOTPROMPT");
351 standardProperties.Add("RedirectedDllSupport");
352 standardProperties.Add("REINSTALL");
353 standardProperties.Add("REINSTALLMODE");
354 standardProperties.Add("RemoveAdminTS");
355 standardProperties.Add("REMOVE");
356 standardProperties.Add("ReplacedInUseFiles");
357 standardProperties.Add("RestrictedUserControl");
358 standardProperties.Add("RESUME");
359 standardProperties.Add("RollbackDisabled");
360 standardProperties.Add("ROOTDRIVE");
361 standardProperties.Add("ScreenX");
362 standardProperties.Add("ScreenY");
363 standardProperties.Add("SecureCustomProperties");
364 standardProperties.Add("ServicePackLevel");
365 standardProperties.Add("ServicePackLevelMinor");
366 standardProperties.Add("SEQUENCE");
367 standardProperties.Add("SharedWindows");
368 standardProperties.Add("ShellAdvtSupport");
369 standardProperties.Add("SHORTFILENAMES");
370 standardProperties.Add("SourceDir");
371 standardProperties.Add("SOURCELIST");
372 standardProperties.Add("SystemLanguageID");
373 standardProperties.Add("TARGETDIR");
374 standardProperties.Add("TerminalServer");
375 standardProperties.Add("TextHeight");
376 standardProperties.Add("Time");
377 standardProperties.Add("TRANSFORMS");
378 standardProperties.Add("TRANSFORMSATSOURCE");
379 standardProperties.Add("TRANSFORMSSECURE");
380 standardProperties.Add("TTCSupport");
381 standardProperties.Add("UILevel");
382 standardProperties.Add("UpdateStarted");
383 standardProperties.Add("UpgradeCode");
384 standardProperties.Add("UPGRADINGPRODUCTCODE");
385 standardProperties.Add("UserLanguageID");
386 standardProperties.Add("USERNAME");
387 standardProperties.Add("UserSID");
388 standardProperties.Add("Version9X");
389 standardProperties.Add("VersionDatabase");
390 standardProperties.Add("VersionMsi");
391 standardProperties.Add("VersionNT");
392 standardProperties.Add("VersionNT64");
393 standardProperties.Add("VirtualMemory");
394 standardProperties.Add("WindowsBuild");
395 standardProperties.Add("WindowsVolume");
396 }
397 }
398
399 return standardProperties.Contains(propertyName);
400 }
401
402 /// <summary>
403 /// Sets up a hashtable with the set of standard MSI directories
404 /// </summary>
405 private static void LoadStandardDirectories()
406 {
407 lock (lockObject)
408 {
409 if (null == standardDirectories)
410 {
411 standardDirectories = new HashSet<string>();
412 standardDirectories.Add("TARGETDIR");
413 standardDirectories.Add("AdminToolsFolder");
414 standardDirectories.Add("AppDataFolder");
415 standardDirectories.Add("CommonAppDataFolder");
416 standardDirectories.Add("CommonFilesFolder");
417 standardDirectories.Add("DesktopFolder");
418 standardDirectories.Add("FavoritesFolder");
419 standardDirectories.Add("FontsFolder");
420 standardDirectories.Add("LocalAppDataFolder");
421 standardDirectories.Add("MyPicturesFolder");
422 standardDirectories.Add("PersonalFolder");
423 standardDirectories.Add("ProgramFilesFolder");
424 standardDirectories.Add("ProgramMenuFolder");
425 standardDirectories.Add("SendToFolder");
426 standardDirectories.Add("StartMenuFolder");
427 standardDirectories.Add("StartupFolder");
428 standardDirectories.Add("System16Folder");
429 standardDirectories.Add("SystemFolder");
430 standardDirectories.Add("TempFolder");
431 standardDirectories.Add("TemplateFolder");
432 standardDirectories.Add("WindowsFolder");
433 standardDirectories.Add("CommonFiles64Folder");
434 standardDirectories.Add("ProgramFiles64Folder");
435 standardDirectories.Add("System64Folder");
436 standardDirectories.Add("NetHoodFolder");
437 standardDirectories.Add("PrintHoodFolder");
438 standardDirectories.Add("RecentFolder");
439 standardDirectories.Add("WindowsVolume");
440 }
441 }
442 }
443 }
444}