cmtraceopen-parser 0.1.1

Parse ConfigMgr/SCCM, Intune, CBS, DISM, Panther, MSI, and PSADT logs with format auto-detection, severity classification, and Windows error-code lookup. Pure Rust, no I/O, native + wasm32.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
/// Embedded error code database derived from CMTrace binary analysis.
/// Contains common Windows, SCCM, Intune, and Windows Update error codes.
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum ErrorCategory {
    Windows,
    WindowsUpdate,
    Bits,
    ConfigMgr,
    Intune,
    DeliveryOpt,
    AppInstall,
    Certificate,
    Network,
    Security,
    Registry,
    FileSystem,
    Msi,
    Psadt,
}

impl ErrorCategory {
    pub fn label(&self) -> &'static str {
        match self {
            Self::Windows => "Windows",
            Self::WindowsUpdate => "Windows Update",
            Self::Bits => "BITS",
            Self::ConfigMgr => "ConfigMgr",
            Self::Intune => "Intune",
            Self::DeliveryOpt => "Delivery Optimization",
            Self::AppInstall => "App Install",
            Self::Certificate => "Certificate",
            Self::Network => "Network",
            Self::Security => "Security",
            Self::Registry => "Registry",
            Self::FileSystem => "File System",
            Self::Msi => "Windows Installer (MSI)",
            Self::Psadt => "PSADT",
        }
    }
}

#[derive(Debug, Clone)]
pub struct ErrorCode {
    pub code: u32,
    pub description: &'static str,
    pub category: ErrorCategory,
}

pub static ERROR_CODES: &[ErrorCode] = &[
    // ==========================================
    // Windows / HRESULT errors
    // ==========================================
    ErrorCode { code: 0x00000000, description: "S_OK - The operation completed successfully", category: ErrorCategory::Windows },
    ErrorCode { code: 0x00000001, description: "S_FALSE - The operation completed with a non-critical warning", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80004001, description: "E_NOTIMPL - Not implemented", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80004002, description: "E_NOINTERFACE - No such interface supported", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80004003, description: "E_POINTER - Invalid pointer", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80004004, description: "E_ABORT - Operation aborted", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80004005, description: "E_FAIL - Unspecified failure", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80004006, description: "CO_E_INIT_TLS - Thread local storage failure", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80004015, description: "CO_E_WRONGOSFORAPP - Application not found", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8000FFFF, description: "E_UNEXPECTED - Unexpected failure", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80010105, description: "RPC_E_SERVERFAULT - The server threw an exception", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80010108, description: "RPC_E_DISCONNECTED - The object invoked has disconnected from its clients", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8001010D, description: "RPC_E_SERVERCALL_RETRYLATER - The callee (server) is not available and disappeared; all connections are invalid", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800401F0, description: "CO_E_NOTINITIALIZED - COM not initialized", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80040154, description: "REGDB_E_CLASSNOTREG - Class not registered", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80040201, description: "CACHE_E_NOCACHE_UPDATED - No cache updated", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070001, description: "ERROR_INVALID_FUNCTION - Incorrect function", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070002, description: "ERROR_FILE_NOT_FOUND - The system cannot find the file specified", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070003, description: "ERROR_PATH_NOT_FOUND - The system cannot find the path specified", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070004, description: "ERROR_TOO_MANY_OPEN_FILES - The system cannot open the file", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070005, description: "E_ACCESSDENIED - Access is denied", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070006, description: "ERROR_INVALID_HANDLE - The handle is invalid", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070007, description: "ERROR_ARENA_TRASHED - The storage control blocks were destroyed", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070008, description: "ERROR_NOT_ENOUGH_MEMORY - Not enough storage is available", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007000A, description: "ERROR_BAD_ENVIRONMENT - The environment is incorrect", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007000B, description: "ERROR_BAD_FORMAT - An attempt was made to load a program with an incorrect format", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007000D, description: "ERROR_INVALID_DATA - The data is invalid", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007000E, description: "E_OUTOFMEMORY - Not enough memory resources to complete this operation", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007000F, description: "ERROR_INVALID_DRIVE - The system cannot find the drive specified", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070011, description: "ERROR_NOT_SAME_DEVICE - The system cannot move the file to a different disk drive", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070012, description: "ERROR_NO_MORE_FILES - There are no more files", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070015, description: "ERROR_NOT_READY - The device is not ready", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007001D, description: "ERROR_WRITE_FAULT - The system cannot write to the specified device", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007001E, description: "ERROR_READ_FAULT - The system cannot read from the specified device", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007001F, description: "ERROR_GEN_FAILURE - A device attached to the system is not functioning", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070020, description: "ERROR_SHARING_VIOLATION - The process cannot access the file because it is being used by another process", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070021, description: "ERROR_LOCK_VIOLATION - The process cannot access the file because another process has locked a portion of the file", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070026, description: "ERROR_HANDLE_EOF - Reached the end of the file", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070027, description: "ERROR_HANDLE_DISK_FULL - The disk is full", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070032, description: "ERROR_NOT_SUPPORTED - The request is not supported", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070033, description: "ERROR_REM_NOT_LIST - Windows cannot find the network path", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070035, description: "ERROR_BAD_NETPATH - The network path was not found", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070037, description: "ERROR_DEV_NOT_EXIST - The specified network resource or device is no longer available", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007003B, description: "ERROR_UNEXP_NET_ERR - An unexpected network error occurred", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070040, description: "ERROR_NETNAME_DELETED - The specified network name is no longer available", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070041, description: "ERROR_NETWORK_ACCESS_DENIED - Network access is denied", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070043, description: "ERROR_BAD_NET_NAME - The network name cannot be found", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070050, description: "ERROR_FILE_EXISTS - The file exists", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070052, description: "ERROR_DUP_NAME - Duplicate name on the network", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070056, description: "ERROR_INVALID_PASSWORD - The specified network password is not correct", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070057, description: "E_INVALIDARG - One or more arguments are invalid", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007006D, description: "ERROR_BROKEN_PIPE - The pipe has been ended", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007006E, description: "ERROR_OPEN_FAILED - The system cannot open the device or file specified", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007006F, description: "ERROR_BUFFER_OVERFLOW - The file name is too long", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070070, description: "ERROR_DISK_FULL - There is not enough space on the disk", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070078, description: "ERROR_CALL_NOT_IMPLEMENTED - This function is not supported on this system", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070079, description: "ERROR_SEM_TIMEOUT - The semaphore timeout period has expired", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007007A, description: "ERROR_INSUFFICIENT_BUFFER - The data area passed to a system call is too small", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007007B, description: "ERROR_INVALID_NAME - The filename, directory name, or volume label syntax is incorrect", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007007E, description: "ERROR_MOD_NOT_FOUND - The specified module could not be found", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007007F, description: "ERROR_PROC_NOT_FOUND - The specified procedure could not be found", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070091, description: "ERROR_DIR_NOT_EMPTY - The directory is not empty", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007009E, description: "ERROR_NOT_LOCKED - The segment is already unlocked", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800700A1, description: "ERROR_BAD_PATHNAME - The specified path is invalid", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800700AA, description: "ERROR_BUSY - The requested resource is in use", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800700B7, description: "ERROR_ALREADY_EXISTS - Cannot create a file when that file already exists", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800700C1, description: "ERROR_BAD_EXE_FORMAT - Not a valid Win32 application", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800700CB, description: "ERROR_ENVVAR_NOT_FOUND - The system could not find the environment option that was entered", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800700CE, description: "ERROR_FILENAME_EXCED_RANGE - The file name or extension is too long", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800700E1, description: "ERROR_VIRUS_INFECTED - Operation did not complete successfully because the file contains a virus", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800700EA, description: "ERROR_MORE_DATA - More data is available", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070102, description: "WAIT_TIMEOUT - The wait operation timed out", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070103, description: "NO_MORE_ITEMS - No more data is available", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007010B, description: "ERROR_DIRECTORY - The directory name is invalid", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007013D, description: "ERROR_MR_MID_NOT_FOUND - The system cannot find message text for message number", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007015E, description: "ERROR_FAIL_NOACTION_REBOOT - No action was taken because a system reboot is required", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800701E7, description: "ERROR_INVALID_ADDRESS - Attempt to access invalid address", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800701F4, description: "ERROR_USER_PROFILE_LOAD - User profile cannot be loaded", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070216, description: "ERROR_ARITHMETIC_OVERFLOW - Arithmetic result exceeded 32 bits", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007023C, description: "ERROR_CONTROL_C_EXIT - Application terminated as a result of CTRL+C", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070241, description: "ERROR_INVALID_IMAGE_HASH - The hash for the image cannot be found in the system catalogs", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800702E4, description: "ERROR_ELEVATION_REQUIRED - The requested operation requires elevation", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800703E5, description: "ERROR_IO_PENDING - Overlapped I/O operation is in progress", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800703E6, description: "ERROR_NOACCESS - Invalid access to memory location", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007041D, description: "ERROR_SERVICE_REQUEST_TIMEOUT - The service did not respond to the start or control request in a timely fashion", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070422, description: "ERROR_SERVICE_DISABLED - The service is disabled", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070424, description: "ERROR_SERVICE_DOES_NOT_EXIST - The specified service does not exist", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007042B, description: "ERROR_PROCESS_ABORTED - The process terminated unexpectedly", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007042C, description: "ERROR_SERVICE_DEPENDENCY_FAIL - The dependency service or group failed to start", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007046A, description: "ERROR_NOT_ENOUGH_SERVER_MEMORY - Not enough server storage is available to process this command", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070490, description: "E_ELEMENT_NOT_FOUND - Element not found", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800704C3, description: "ERROR_SESSION_CREDENTIAL_CONFLICT - Multiple connections to a server using more than one user name not allowed", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800704C7, description: "ERROR_CANCELLED - The operation was canceled by the user", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800704CF, description: "ERROR_NETWORK_UNREACHABLE - The network location cannot be reached", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800704DD, description: "ERROR_NOT_LOGGED_ON - The user is not logged on", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800704EC, description: "ERROR_ACCESS_DISABLED_BY_POLICY - This program is blocked by group policy", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070522, description: "ERROR_PRIVILEGE_NOT_HELD - A required privilege is not held by the client", category: ErrorCategory::Windows },
    ErrorCode { code: 0x8007052E, description: "ERROR_LOGON_FAILURE - Logon failure: unknown user name or bad password", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070570, description: "ERROR_FILE_CORRUPT - The file or directory is corrupted and unreadable", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070574, description: "ERROR_LOGON_FAILURE_MUTUAL_AUTH - Logon Failure: The target account name is incorrect", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800705B4, description: "ERROR_TIMEOUT - This operation returned because the timeout period expired", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800705DC, description: "ERROR_EVENTLOG_CANT_START - The event log file is corrupted", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070643, description: "ERROR_INSTALL_FAILURE - Fatal error during installation", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070652, description: "ERROR_INSTALL_ALREADY_RUNNING - Another installation is already in progress", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800706BA, description: "RPC_S_SERVER_UNAVAILABLE - The RPC server is unavailable", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800706BE, description: "RPC_S_CALL_FAILED - The remote procedure call failed", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070775, description: "ERROR_INVALID_DATATYPE - The specified data type is invalid", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800706D9, description: "RPC_S_NO_BINDINGS - There are no bindings", category: ErrorCategory::Windows },
    ErrorCode { code: 0x800706BB, description: "RPC_S_SERVER_TOO_BUSY - The RPC server is too busy to complete this operation", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070BC2, description: "ERROR_SUCCESS_REBOOT_REQUIRED - A restart is required to complete the install", category: ErrorCategory::Windows },
    ErrorCode { code: 0x80070BC9, description: "ERROR_FAIL_REBOOT_REQUIRED - A restart is required to complete the uninstall", category: ErrorCategory::Windows },

    // ==========================================
    // Windows Update Agent
    // ==========================================
    // WUA success codes
    ErrorCode { code: 0x00240001, description: "WU_S_SERVICE_STOP - Windows Update Agent was stopped successfully", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x00240002, description: "WU_S_SELFUPDATE - Windows Update Agent updated itself", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x00240005, description: "WU_S_REBOOT_REQUIRED - The system needs to be rebooted to complete installation", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x00240006, description: "WU_S_ALREADY_INSTALLED - The update to be installed is already installed", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x00240008, description: "WU_S_ALREADY_DOWNLOADED - The update to be downloaded has already been downloaded", category: ErrorCategory::WindowsUpdate },
    // WUA error codes
    ErrorCode { code: 0x80240001, description: "WU_E_NO_SERVICE - Windows Update Agent was unable to provide the service", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240002, description: "WU_E_MAX_CAPACITY_REACHED - Maximum capacity of the service was exceeded", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240003, description: "WU_E_UNKNOWN_ID - An ID that was not recognized", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240004, description: "WU_E_NOT_INITIALIZED - The object could not be initialized", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240005, description: "WU_E_RANGEOVERLAP - The update handler requested a byte range overlapping a previously requested range", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240006, description: "WU_E_TOOMANYRANGES - Too many byte ranges requested", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240007, description: "WU_E_INVALIDINDEX - Invalid index into the update list", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240008, description: "WU_E_ITEMNOTFOUND - The key for the item queried could not be found", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240009, description: "WU_E_OPERATIONINPROGRESS - Another conflicting operation was in progress", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024000A, description: "WU_E_COULDNOTCANCEL - Cancellation of the operation was not allowed", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024000B, description: "WU_E_CALL_CANCELLED - Operation was cancelled", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024000C, description: "WU_E_NOOP - No operation was required", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024000D, description: "WU_E_XML_MISSINGDATA - XML is missing required data", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024000E, description: "WU_E_XML_INVALID - XML is not valid", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024000F, description: "WU_E_CYCLE_DETECTED - Circular update relationships were detected", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240010, description: "WU_E_TOO_DEEP_RELATION - Update relationships too deep to evaluate", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240011, description: "WU_E_INVALID_RELATIONSHIP - Invalid update relationship", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240012, description: "WU_E_REG_VALUE_INVALID - Invalid registry value", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240013, description: "WU_E_DUPLICATE_ITEM - Duplicate item in list", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240016, description: "WU_E_INSTALL_NOT_ALLOWED - Install not allowed", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240017, description: "WU_E_NOT_APPLICABLE - The update is not applicable to this computer", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240018, description: "WU_E_NO_USERTOKEN - Failed to use the BITS service", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240019, description: "WU_E_EXCLUSIVE_INSTALL_CONFLICT - An exclusive update cannot be installed with other updates", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024001A, description: "WU_E_POLICY_NOT_SET - A policy value was not set", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024001B, description: "WU_E_SELFUPDATE_IN_PROGRESS - Self-update in progress", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024001D, description: "WU_E_INVALID_UPDATE - An update contains invalid metadata", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024001E, description: "WU_E_SERVICE_STOP - Service stop required", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024001F, description: "WU_E_NO_CONNECTION - No network connection was available", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240020, description: "WU_E_NO_INTERACTIVE_USER - Operation cannot continue without user interaction", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240021, description: "WU_E_TIME_OUT - Operation did not complete because it timed out", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240022, description: "WU_E_ALL_UPDATES_FAILED - Operation failed for all updates", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240024, description: "WU_E_NO_UPDATE - There are no updates", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240025, description: "WU_E_USER_ACCESS_DISABLED - Group policy has disabled user access", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240026, description: "WU_E_INVALID_UPDATE_TYPE - The type of update is invalid", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240027, description: "WU_E_URL_TOO_LONG - The URL exceeded the maximum length", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240028, description: "WU_E_UNINSTALL_NOT_ALLOWED - The update could not be uninstalled", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240029, description: "WU_E_INVALID_PRODUCT_LICENSE - Search may have missed some updates due to expired product license", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024002A, description: "WU_E_MISSING_HANDLER - A component required to detect updates was missing", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024002B, description: "WU_E_LEGACYSERVER - An operation did not complete because it requires a newer version of server", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024002C, description: "WU_E_BIN_SOURCE_ABSENT - A delta-compressed update could not be installed because it required the source", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024002D, description: "WU_E_SOURCE_ABSENT - A full-file update could not be installed because it required the source", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024002E, description: "WU_E_WU_DISABLED - Access to an unmanaged server is not allowed", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024002F, description: "WU_E_CALL_CANCELLED_BY_POLICY - Operation did not complete because DisableWindowsUpdateAccess policy was set", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240030, description: "WU_E_INVALID_PROXY_SERVER - The format of the proxy list was invalid", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240031, description: "WU_E_INVALID_FILE - The file is in the wrong format", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240032, description: "WU_E_INVALID_CRITERIA - The search criteria string was invalid", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240033, description: "WU_E_EULA_UNAVAILABLE - License terms could not be downloaded", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240035, description: "WU_E_UPDATE_NOT_PROCESSED - The update was not processed", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240036, description: "WU_E_INVALID_OPERATION - The objects current state does not allow the operation", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240037, description: "WU_E_NOT_SUPPORTED - The functionality is not supported", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240038, description: "WU_E_WINHTTP_INVALID_FILE - The downloaded file has an unexpected content type", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240039, description: "WU_E_TOO_MANY_RESYNC - Agent is asked by server to resync too many times", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240040, description: "WU_E_NO_SERVER_CORE_SUPPORT - WUA API method does not run on Server Core installation", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240041, description: "WU_E_SYSPREP_IN_PROGRESS - Service is not available while sysprep is running", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240042, description: "WU_E_UNKNOWN_SERVICE - The update service is no longer registered with AU", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240043, description: "WU_E_NO_UI_SUPPORT - There is no support for WUA UI", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240044, description: "WU_E_PER_MACHINE_UPDATE_ACCESS_DENIED - Only administrators can perform this operation on per-machine updates", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80240FFF, description: "WU_E_UNEXPECTED - An operation failed due to reasons not covered by another error code", category: ErrorCategory::WindowsUpdate },
    // WU download/install manager errors
    ErrorCode { code: 0x80242000, description: "WU_E_UH_REMOTEUNAVAILABLE - A request for a remote update handler could not be completed", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80242002, description: "WU_E_UH_UNEXPECTEDCBSRESPONSE - The update handler received an unexpected response from CBS", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80242005, description: "WU_E_UH_WRONGHANDLER - The wrong update handler was called", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80242006, description: "WU_E_UH_INVALIDMETADATA - The update handler metadata is invalid", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80242007, description: "WU_E_UH_INSTALLERHUNG - An operation could not be completed because the installer exceeded the time limit", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80242008, description: "WU_E_UH_OPERATIONCANCELLED - An operation being done by the update handler was cancelled", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80242009, description: "WU_E_UH_BADHANDLERXML - The handler metadata XML is invalid", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024200B, description: "WU_E_UH_INSTALLERFAILURE - The update handler failed to install the update", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024200C, description: "WU_E_UH_FALLBACKTOSELFCONTAINED - The update handler should download self-contained content", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024200D, description: "WU_E_UH_NEEDANOTHERDOWNLOAD - The update handler needs to download a different payload", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024200E, description: "WU_E_UH_NOTIFYFAILURE - Update handler notification failure", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80243001, description: "WU_E_INSTALLATION_RESULTS_UNKNOWN_VERSION - Unknown version of installation results", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80243002, description: "WU_E_INSTALLATION_RESULTS_INVALID_DATA - Invalid data in installation results", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80243003, description: "WU_E_INSTALLATION_RESULTS_NOT_FOUND - Installation results not found", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80243FFD, description: "WU_E_NON_UI_MODE - Unable to show UI when in non-UI mode", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80243FFE, description: "WU_E_WUCLTUI_UNSUPPORTED_VERSION - Unsupported version of WU client UI", category: ErrorCategory::WindowsUpdate },
    // WUA SOAP/HTTP errors
    ErrorCode { code: 0x80244000, description: "WU_E_PT_SOAPCLIENT_BASE - SOAPCLIENT_ERRORs base", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244001, description: "WU_E_PT_SOAPCLIENT_INITIALIZE - SOAP client initialization failed", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244002, description: "WU_E_PT_SOAPCLIENT_OUTOFMEMORY - SOAP client out of memory", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244004, description: "WU_E_PT_SOAPCLIENT_CONNECT - Cannot connect to the server", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244005, description: "WU_E_PT_SOAPCLIENT_SEND - SOAP message could not be sent", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244006, description: "WU_E_PT_SOAPCLIENT_SERVER - Server error", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244007, description: "WU_E_PT_SOAPCLIENT_SOAPFAULT - SOAP fault", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244010, description: "WU_E_PT_EXCEEDED_MAX_SERVER_TRIPS - The number of round trips to the server exceeded the maximum limit", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244016, description: "WU_E_PT_HTTP_STATUS_BAD_REQUEST - HTTP 400 - Bad request", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244017, description: "WU_E_PT_HTTP_STATUS_DENIED - HTTP 401 - Unauthorized", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244018, description: "WU_E_PT_HTTP_STATUS_FORBIDDEN - HTTP 403 - Forbidden", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244019, description: "WU_E_PT_HTTP_STATUS_NOT_FOUND - HTTP 404 - Not found", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024401B, description: "WU_E_PT_HTTP_STATUS_PROXY_AUTH_REQ - HTTP 407 - Proxy auth required", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024401C, description: "WU_E_PT_HTTP_STATUS_REQUEST_TIMEOUT - HTTP 408 - Request timeout", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244022, description: "WU_E_PT_HTTP_STATUS_SERVICE_UNAVAIL - HTTP 503 - Service unavailable", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024402C, description: "WU_E_PT_WINHTTP_NAME_NOT_RESOLVED - WinHTTP name not resolved", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80244FFF, description: "WU_E_PT_UNEXPECTED - Communication error not covered by another WU_E_PT code", category: ErrorCategory::WindowsUpdate },
    // WUA Automatic Updates
    ErrorCode { code: 0x8024A000, description: "WU_E_AU_NOSERVICE - Automatic Updates was unable to service incoming requests", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024A002, description: "WU_E_AU_NONLEGACYSERVER - The old version of the Automatic Updates client has stopped because the WSUS server has been upgraded", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024A003, description: "WU_E_AU_LEGACYCLIENTDISABLED - The old version of the Automatic Updates client was disabled", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024A004, description: "WU_E_AU_PAUSED - Automatic Updates was unable to process incoming requests because it was paused", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x8024A005, description: "WU_E_AU_NO_REGISTERED_SERVICE - No unmanaged service is registered with AU", category: ErrorCategory::WindowsUpdate },
    // WU CBS (Component-Based Servicing) errors
    ErrorCode { code: 0x80245001, description: "WU_E_REDIRECTOR_LOAD_XML - The redirector XML document could not be loaded", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80245002, description: "WU_E_REDIRECTOR_S_FALSE - The redirector XML document is missing some required information", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80245003, description: "WU_E_REDIRECTOR_ID_SMALLER - The redirectorId in the downloaded redirector cab is less than in the cached cab", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80246001, description: "WU_E_DM_URLNOTAVAILABLE - A download manager operation could not be completed because the requested file does not have a URL", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80246002, description: "WU_E_DM_INCORRECTFILEHASH - A download manager operation could not be completed because the file digest was not recognized", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80246003, description: "WU_E_DM_UNKNOWNALGORITHM - A download manager operation could not be completed because the file metadata requested an unrecognized hash algorithm", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80246005, description: "WU_E_DM_NONETWORK - A download manager operation could not be completed because the network connection was unavailable", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80246008, description: "WU_E_DM_FAILTOCONNECTTOBITS - A download manager operation failed because the download manager was unable to connect the Background Intelligent Transfer Service", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80248000, description: "WU_E_DS_SHUTDOWN - An operation failed because Windows Update Agent is shutting down", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80248001, description: "WU_E_DS_INUSE - An operation failed because the data store was in use", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80248002, description: "WU_E_DS_INVALID - The current and expected states of the data store do not match", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80248003, description: "WU_E_DS_TABLEMISSING - The data store is missing a table", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80248004, description: "WU_E_DS_TABLEINCORRECT - The data store contains a table with unexpected columns", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80248005, description: "WU_E_DS_INVALIDTABLENAME - A table could not be opened because the table is not in the data store", category: ErrorCategory::WindowsUpdate },
    ErrorCode { code: 0x80248007, description: "WU_E_DS_NODATA - The information requested is not in the data store", category: ErrorCategory::WindowsUpdate },

    // ==========================================
    // BITS (Background Intelligent Transfer Service)
    // ==========================================
    ErrorCode { code: 0x80200001, description: "BG_E_NOT_FOUND - The requested job was not found", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200002, description: "BG_E_INVALID_STATE - The requested action is not allowed in the current job state", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200003, description: "BG_E_EMPTY - The job is empty", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200004, description: "BG_E_FILE_NOT_AVAILABLE - The file is not available", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200005, description: "BG_E_FILE_NOT_AVAILABLE - A file in the job is not available", category: ErrorCategory::Bits },
    ErrorCode { code: 0x8020000A, description: "BG_E_TOO_MANY_FILES - No more files can be added to this job", category: ErrorCategory::Bits },
    ErrorCode { code: 0x8020000B, description: "BG_E_LOCAL_FILE_CHANGED - Local file changed during transfer", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200010, description: "BG_E_NETWORK_DISCONNECTED - BITS is unable to contact the server", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200011, description: "BG_E_STRING_TOO_LONG - A string parameter was too long", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200013, description: "BG_E_INSUFFICIENT_HTTP_SUPPORT - The server does not support the necessary HTTP protocol", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200014, description: "BG_E_INSUFFICIENT_RANGE_SUPPORT - The server does not support the necessary HTTP byte range", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200015, description: "BG_E_ERROR_INFORMATION_UNAVAILABLE - Error information is not available", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200016, description: "BG_E_NETWORK_DISCONNECTED - Network disconnected", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200017, description: "BG_E_MISSING_FILE_SIZE - Server did not return the file size", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200018, description: "BG_E_INSUFFICIENT_HTTP_SUPPORT - Server does not support HTTP features required for BITS", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200019, description: "BG_E_INSUFFICIENT_RANGE_SUPPORT - Server does not support the necessary range protocol", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200020, description: "BG_E_CONNECTION_CLOSED - Connection was closed because of a redirect", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200022, description: "BG_E_HTTP_ERROR_403 - The server requires HTTP authentication", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200023, description: "BG_E_HTTP_ERROR_403 - HTTP 403 Forbidden", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200024, description: "BG_E_HTTP_ERROR_404 - HTTP 404 Not Found", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200025, description: "BG_E_HTTP_ERROR_407 - HTTP 407 Proxy Authentication Required", category: ErrorCategory::Bits },
    ErrorCode { code: 0x80200049, description: "BG_E_HTTP_ERROR_503 - HTTP 503 Service Unavailable", category: ErrorCategory::Bits },

    // ==========================================
    // ConfigMgr / SCCM
    // ==========================================
    ErrorCode { code: 0x80040600, description: "CCM_E_CONTENT_NOT_FOUND - Content not found on distribution point", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80040601, description: "CCM_E_BAD_SITE_CODE - Invalid site code", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80040602, description: "CCM_E_NOT_CONNECTED - Not connected to management point", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80040690, description: "CCM_E_NO_MANAGEMENT_POINT - Could not discover management point", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80040692, description: "CCM_E_TIMEOUT - CCM operation timed out", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80040693, description: "CCM_E_LOW_WUA_VERSION - Low WUA version", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80040700, description: "E_UPDDEPLOY_APPLY_NOT_ALLOWED - Install not allowed", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80040701, description: "E_UPDDEPLOY_DOWNLOAD_NOT_ALLOWED - Download not allowed", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80040702, description: "E_ASSIGNMENT_POLICY_NOT_FOUND - Assignment policy not available", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80040703, description: "E_ANOTHER_JOB_IN_PROGRESS - Only one job is allowed at a time", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80040704, description: "E_HARDREBOOT_PENDING - Hard reboot pending", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80040708, description: "E_UPDDEPLOY_APPLY_NOT_REQUIRED - Software Updates install not required", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80041001, description: "WMI_E_FAILED - WMI generic failure", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80041002, description: "WMI_E_NOT_FOUND - WMI object not found", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80041003, description: "WMI_E_ACCESS_DENIED - WMI access denied", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80041006, description: "WMI_E_OUT_OF_MEMORY - WMI out of memory", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80041007, description: "SCCM_E_DEPENDENCYNOTMET - Dependency not met", category: ErrorCategory::ConfigMgr },
    ErrorCode { code: 0x80041010, description: "SCCM_E_INVALIDPROPERTY - Invalid property", category: ErrorCategory::ConfigMgr },

    // ==========================================
    // Delivery Optimization
    // ==========================================
    ErrorCode { code: 0x80D01001, description: "DO_E_DOWNLOAD_NOT_FOUND - Download not found", category: ErrorCategory::DeliveryOpt },
    ErrorCode { code: 0x80D02002, description: "DO_E_DOWNLOAD_CANCELLED - Download was cancelled", category: ErrorCategory::DeliveryOpt },
    ErrorCode { code: 0x80D02003, description: "DO_E_UNKNOWN_PROPERTY_ID - Unknown property ID", category: ErrorCategory::DeliveryOpt },
    ErrorCode { code: 0x80D02004, description: "DO_E_READ_ONLY_PROPERTY - Property is read-only", category: ErrorCategory::DeliveryOpt },
    ErrorCode { code: 0x80D02005, description: "DO_E_NO_DOWNLOAD_SOURCES - No download sources available", category: ErrorCategory::DeliveryOpt },
    ErrorCode { code: 0x80D02011, description: "DO_E_BLOCKED_BY_COST_TRANSFER_POLICY - Download blocked by cost transfer policy", category: ErrorCategory::DeliveryOpt },
    ErrorCode { code: 0x80D06005, description: "DO_E_BLOCKED_BY_POLICY - Download blocked by policy", category: ErrorCategory::DeliveryOpt },
    ErrorCode { code: 0x80D06802, description: "DO_E_BLOCKED_BY_NO_NETWORK - Download blocked because there is no network", category: ErrorCategory::DeliveryOpt },

    // ==========================================
    // App Install — MSI exit codes
    // ==========================================
    ErrorCode { code: 1601, description: "ERROR_INSTALL_SERVICE_FAILURE - The Windows Installer service could not be accessed", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1602, description: "ERROR_INSTALL_USEREXIT - The user cancels installation", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1603, description: "ERROR_INSTALL_FAILURE - Fatal error occurred during installation", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1604, description: "ERROR_INSTALL_SUSPEND - Installation suspended, incomplete", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1605, description: "ERROR_UNKNOWN_PRODUCT - This action is only valid for products that are currently installed", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1606, description: "ERROR_UNKNOWN_FEATURE - Feature ID not registered", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1607, description: "ERROR_UNKNOWN_COMPONENT - Component ID not registered", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1608, description: "ERROR_UNKNOWN_PROPERTY - This is an unknown property", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1609, description: "ERROR_INVALID_HANDLE_STATE - Handle is in an invalid state", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1610, description: "ERROR_BAD_CONFIGURATION - The configuration data for this product is corrupt", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1612, description: "ERROR_INSTALL_SOURCE_ABSENT - The installation source for this product is not available", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1613, description: "ERROR_INSTALL_PACKAGE_VERSION - This installation package cannot be installed by the Windows Installer service", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1618, description: "ERROR_INSTALL_ALREADY_RUNNING - Another installation is already in progress", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1619, description: "ERROR_INSTALL_PACKAGE_OPEN_FAILED - This installation package could not be opened", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1620, description: "ERROR_INSTALL_PACKAGE_INVALID - This installation package could not be opened (invalid package)", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1621, description: "ERROR_INSTALL_UI_FAILURE - There was an error starting the Windows Installer service user interface", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1622, description: "ERROR_INSTALL_LOG_FAILURE - Error opening installation log file", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1623, description: "ERROR_INSTALL_LANGUAGE_UNSUPPORTED - This language of this installation package is not supported by your system", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1624, description: "ERROR_INSTALL_TRANSFORM_FAILURE - Error applying transforms", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1625, description: "ERROR_INSTALL_PACKAGE_REJECTED - This installation is forbidden by system policy", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1626, description: "ERROR_FUNCTION_NOT_CALLED - Function could not be executed", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1627, description: "ERROR_FUNCTION_FAILED - Function failed during execution", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1628, description: "ERROR_INVALID_TABLE - Invalid or unknown table specified", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1629, description: "ERROR_DATATYPE_MISMATCH - Data supplied is of wrong type", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1630, description: "ERROR_UNSUPPORTED_TYPE - Data of this type is not supported", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1631, description: "ERROR_CREATE_FAILED - The Windows Installer service failed to start", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1632, description: "ERROR_INSTALL_TEMP_UNWRITABLE - The Temp folder is either full or inaccessible", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1633, description: "ERROR_INSTALL_PLATFORM_UNSUPPORTED - This installation package is not supported on this platform", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1635, description: "ERROR_PATCH_PACKAGE_OPEN_FAILED - This patch package could not be opened", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1636, description: "ERROR_PATCH_PACKAGE_INVALID - This patch package could not be opened (invalid)", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1637, description: "ERROR_PATCH_PACKAGE_UNSUPPORTED - This patch package cannot be processed by the Windows Installer service", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1638, description: "ERROR_PRODUCT_VERSION - Another version of this product is already installed", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1639, description: "ERROR_INVALID_COMMAND_LINE - Invalid command line argument", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1640, description: "ERROR_INSTALL_REMOTE_DISALLOWED - Only administrators have permission to add, remove, or configure server software during a Terminal Services remote session", category: ErrorCategory::AppInstall },
    ErrorCode { code: 1641, description: "ERROR_SUCCESS_REBOOT_INITIATED - The requested operation completed successfully. The system will be restarted", category: ErrorCategory::AppInstall },
    ErrorCode { code: 3010, description: "ERROR_SUCCESS_REBOOT_REQUIRED - A restart is required to complete the install", category: ErrorCategory::AppInstall },
    // PSADT exit codes
    ErrorCode { code: 60001, description: "PSADT_GENERAL_FAILURE - PSADT general failure", category: ErrorCategory::AppInstall },
    ErrorCode { code: 60002, description: "PSADT_MISSING_FILE - PSADT missing file", category: ErrorCategory::AppInstall },
    ErrorCode { code: 60003, description: "PSADT_REQUIRES_ADMIN - PSADT requires admin but not elevated", category: ErrorCategory::AppInstall },
    ErrorCode { code: 60004, description: "PSADT_FAILED_LOAD_ASSEMBLY - PSADT failed to load assembly", category: ErrorCategory::AppInstall },
    ErrorCode { code: 60005, description: "PSADT_DISPLAY_ERROR - PSADT error displaying installation prompt", category: ErrorCategory::AppInstall },
    ErrorCode { code: 60007, description: "PSADT_EXPORT_TASK_FAILED - PSADT failed to export scheduled task XML", category: ErrorCategory::AppInstall },
    ErrorCode { code: 60008, description: "PSADT_MODULE_LOAD_FAILED - PSADT module failed to load", category: ErrorCategory::AppInstall },
    ErrorCode { code: 60009, description: "PSADT_NO_USER - PSADT no logged-on user detected", category: ErrorCategory::AppInstall },
    ErrorCode { code: 60012, description: "PSADT_USER_DEFERRED - PSADT user selected defer/postpone", category: ErrorCategory::AppInstall },
    ErrorCode { code: 70001, description: "PSADT_USER_DECLINED - PSADT user selected No when prompted to close app", category: ErrorCategory::AppInstall },
    // HRESULT-wrapped MSI/AppInstall errors (from original DB)
    ErrorCode { code: 0x80070641, description: "ERROR_INSTALL_SERVICE_FAILURE - The Windows Installer Service could not be accessed", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80070642, description: "ERROR_INSTALL_USEREXIT - User cancelled installation", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80070644, description: "ERROR_INSTALL_SUSPEND - Installation suspended", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80070645, description: "ERROR_UNKNOWN_PRODUCT - Unknown product", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80070660, description: "ERROR_INSTALL_REMOTE_DISALLOWED - Remote installations are not allowed", category: ErrorCategory::AppInstall },
    // MSIX/AppX errors
    ErrorCode { code: 0x80073CF0, description: "ERROR_INSTALL_OPEN_PACKAGE_FAILED - The package could not be opened", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80073CF3, description: "ERROR_INSTALL_RESOLVE_DEPENDENCY_FAILED - Package failed dependency validation", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80073CF6, description: "ERROR_INSTALL_OUT_OF_DISK_SPACE - Not enough disk space for package", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80073CF9, description: "ERROR_INSTALL_CANCEL - Package installation was canceled", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80073CFB, description: "ERROR_INSTALL_FAILED - Package already installed, reinstallation blocked", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80073CFF, description: "ERROR_INSTALL_POLICY_FAILURE - To install this app, sideloading must be enabled", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80073D02, description: "ERROR_INSTALL_PREREQUISITE_FAILED - Package prerequisites not met", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80073D06, description: "ERROR_PACKAGES_IN_USE - Package in use, cannot update", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x80073D0A, description: "ERROR_DEPLOYMENT_BLOCKED_BY_POLICY - Deployment blocked by policy", category: ErrorCategory::AppInstall },
    // WinGet
    ErrorCode { code: 0x8A150001, description: "APPINSTALLER_CLI_ERROR_INTERNAL - Internal error", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x8A150002, description: "APPINSTALLER_CLI_ERROR_INVALID_CL - Invalid command line", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x8A150003, description: "APPINSTALLER_CLI_ERROR_COMMAND_FAILED - Command failed", category: ErrorCategory::AppInstall },
    ErrorCode { code: 0x8A150014, description: "APPINSTALLER_CLI_ERROR_NO_APPLICABLE_INSTALLER - No applicable installer found", category: ErrorCategory::AppInstall },

    // ==========================================
    // Windows Installer (MSI) error codes 1000-3010
    // ==========================================
    ErrorCode { code: 1101, description: "MSI 1101 - Could not open file stream", category: ErrorCategory::Msi },
    ErrorCode { code: 1259, description: "MSI 1259 - This error code is not available", category: ErrorCategory::Msi },
    ErrorCode { code: 1301, description: "MSI 1301 - Cannot create the file. A directory with this name already exists", category: ErrorCategory::Msi },
    ErrorCode { code: 1302, description: "MSI 1302 - Please insert the disk", category: ErrorCategory::Msi },
    ErrorCode { code: 1303, description: "MSI 1303 - The Installer has insufficient privileges to access this directory", category: ErrorCategory::Msi },
    ErrorCode { code: 1304, description: "MSI 1304 - Error writing to file", category: ErrorCategory::Msi },
    ErrorCode { code: 1305, description: "MSI 1305 - Error reading from file. Verify that the file exists and that you can access it", category: ErrorCategory::Msi },
    ErrorCode { code: 1306, description: "MSI 1306 - Another application has exclusive access to the file. Please shut down all other applications", category: ErrorCategory::Msi },
    ErrorCode { code: 1307, description: "MSI 1307 - There is not enough disk space remaining to install this file", category: ErrorCategory::Msi },
    ErrorCode { code: 1308, description: "MSI 1308 - Source file not found", category: ErrorCategory::Msi },
    ErrorCode { code: 1309, description: "MSI 1309 - Error attempting to read from the source install database", category: ErrorCategory::Msi },
    ErrorCode { code: 1310, description: "MSI 1310 - Error attempting to create the destination file", category: ErrorCategory::Msi },
    ErrorCode { code: 1311, description: "MSI 1311 - Could not locate source file cabinet", category: ErrorCategory::Msi },
    ErrorCode { code: 1312, description: "MSI 1312 - Cannot create the directory. A file with this name already exists", category: ErrorCategory::Msi },
    ErrorCode { code: 1313, description: "MSI 1313 - The volume does not contain a recognized file system", category: ErrorCategory::Msi },
    ErrorCode { code: 1314, description: "MSI 1314 - The specified path is unavailable", category: ErrorCategory::Msi },
    ErrorCode { code: 1315, description: "MSI 1315 - Unable to write to the specified folder", category: ErrorCategory::Msi },
    ErrorCode { code: 1316, description: "MSI 1316 - A network error occurred while attempting to read from the file", category: ErrorCategory::Msi },
    ErrorCode { code: 1317, description: "MSI 1317 - An error occurred while attempting to create the directory", category: ErrorCategory::Msi },
    ErrorCode { code: 1318, description: "MSI 1318 - A network error occurred while attempting to create the directory", category: ErrorCategory::Msi },
    ErrorCode { code: 1319, description: "MSI 1319 - A network error occurred while attempting to open the source file cabinet", category: ErrorCategory::Msi },
    ErrorCode { code: 1320, description: "MSI 1320 - The specified path is too long", category: ErrorCategory::Msi },
    ErrorCode { code: 1321, description: "MSI 1321 - The Installer has insufficient privileges to modify this file", category: ErrorCategory::Msi },
    ErrorCode { code: 1322, description: "MSI 1322 - A portion of the folder path is invalid. It is either empty or exceeds the length allowed", category: ErrorCategory::Msi },
    ErrorCode { code: 1323, description: "MSI 1323 - The folder path contains words that are not valid in folder paths", category: ErrorCategory::Msi },
    ErrorCode { code: 1324, description: "MSI 1324 - The folder path contains an invalid character", category: ErrorCategory::Msi },
    ErrorCode { code: 1325, description: "MSI 1325 - No items were found that match the search criteria", category: ErrorCategory::Msi },
    ErrorCode { code: 1326, description: "MSI 1326 - The file cannot be installed because the file is protected by Windows File Protection", category: ErrorCategory::Msi },
    ErrorCode { code: 1327, description: "MSI 1327 - Invalid Drive", category: ErrorCategory::Msi },
    ErrorCode { code: 1328, description: "MSI 1328 - Error applying patch to file", category: ErrorCategory::Msi },
    ErrorCode { code: 1329, description: "MSI 1329 - A file that is required cannot be installed because the cabinet file is not digitally signed", category: ErrorCategory::Msi },
    ErrorCode { code: 1330, description: "MSI 1330 - A file that is required cannot be installed because the cabinet file has an invalid digital signature", category: ErrorCategory::Msi },
    ErrorCode { code: 1331, description: "MSI 1331 - Cannot correctly copy a file. The file may be corrupt", category: ErrorCategory::Msi },
    ErrorCode { code: 1332, description: "MSI 1332 - Could not initialize cabinet file server. The required file may be missing", category: ErrorCategory::Msi },
    ErrorCode { code: 1333, description: "MSI 1333 - Cannot correctly copy a file. The cabinet file signature may be invalid", category: ErrorCategory::Msi },
    ErrorCode { code: 1334, description: "MSI 1334 - Cannot install required file. Check that the cabinet file exists and is accessible", category: ErrorCategory::Msi },
    ErrorCode { code: 1335, description: "MSI 1335 - The cabinet file required for this installation is corrupt and cannot be used", category: ErrorCategory::Msi },
    ErrorCode { code: 1336, description: "MSI 1336 - Could not create a temporary file that is needed to complete this installation", category: ErrorCategory::Msi },
    ErrorCode { code: 1401, description: "MSI 1401 - Could not create registry key", category: ErrorCategory::Msi },
    ErrorCode { code: 1402, description: "MSI 1402 - Could not open registry key", category: ErrorCategory::Msi },
    ErrorCode { code: 1403, description: "MSI 1403 - Could not delete registry value", category: ErrorCategory::Msi },
    ErrorCode { code: 1404, description: "MSI 1404 - Could not delete registry key", category: ErrorCategory::Msi },
    ErrorCode { code: 1405, description: "MSI 1405 - Could not read registry value", category: ErrorCategory::Msi },
    ErrorCode { code: 1406, description: "MSI 1406 - Could not write registry value", category: ErrorCategory::Msi },
    ErrorCode { code: 1407, description: "MSI 1407 - Could not get value names for registry key", category: ErrorCategory::Msi },
    ErrorCode { code: 1408, description: "MSI 1408 - Could not get sub key names for registry key", category: ErrorCategory::Msi },
    ErrorCode { code: 1409, description: "MSI 1409 - Could not read security information for registry key", category: ErrorCategory::Msi },
    ErrorCode { code: 1410, description: "MSI 1410 - Could not increase the available registry space", category: ErrorCategory::Msi },
    ErrorCode { code: 1500, description: "MSI 1500 - Another installation is in progress. Complete that installation before proceeding", category: ErrorCategory::Msi },
    ErrorCode { code: 1501, description: "MSI 1501 - Error accessing secured data. Please make sure the Windows Installer is configured correctly", category: ErrorCategory::Msi },
    ErrorCode { code: 1502, description: "MSI 1502 - User cancelled installation", category: ErrorCategory::Msi },
    ErrorCode { code: 1503, description: "MSI 1503 - The Rules Manager could not perform a rules evaluation operation", category: ErrorCategory::Msi },
    ErrorCode { code: 1611, description: "MSI 1611 - Component qualifier not present", category: ErrorCategory::Msi },
    ErrorCode { code: 1614, description: "MSI 1614 - Product is uninstalled", category: ErrorCategory::Msi },
    ErrorCode { code: 1615, description: "MSI 1615 - SQL query syntax invalid or unsupported", category: ErrorCategory::Msi },
    ErrorCode { code: 1616, description: "MSI 1616 - Record field does not exist", category: ErrorCategory::Msi },
    ErrorCode { code: 1634, description: "MSI 1634 - Component not used on this computer", category: ErrorCategory::Msi },
    ErrorCode { code: 1642, description: "MSI 1642 - The installer cannot install the upgrade patch because the program is not installed", category: ErrorCategory::Msi },
    ErrorCode { code: 1643, description: "MSI 1643 - The patch package is not permitted by software restriction policy", category: ErrorCategory::Msi },
    ErrorCode { code: 1644, description: "MSI 1644 - One or more customizations are not permitted by software restriction policy", category: ErrorCategory::Msi },
    ErrorCode { code: 1645, description: "MSI 1645 - Windows Installer does not permit installation from a Remote Desktop Connection", category: ErrorCategory::Msi },
    ErrorCode { code: 1646, description: "MSI 1646 - The patch is not applied to the product", category: ErrorCategory::Msi },
    ErrorCode { code: 1647, description: "MSI 1647 - The patch package is invalid", category: ErrorCategory::Msi },
    ErrorCode { code: 1648, description: "MSI 1648 - No valid sequence could be found for the set of patches", category: ErrorCategory::Msi },
    ErrorCode { code: 1649, description: "MSI 1649 - Patch removal disallowed by policy", category: ErrorCategory::Msi },
    ErrorCode { code: 1650, description: "MSI 1650 - The XML patch data is invalid", category: ErrorCategory::Msi },
    ErrorCode { code: 1651, description: "MSI 1651 - Administrative user failed to apply patch for a per-user managed or a per-machine application", category: ErrorCategory::Msi },
    ErrorCode { code: 1652, description: "MSI 1652 - Windows Installer is not accessible when the computer is in Safe Mode", category: ErrorCategory::Msi },
    ErrorCode { code: 1653, description: "MSI 1653 - Could not perform a multiple-package transaction because rollback has been disabled", category: ErrorCategory::Msi },
    ErrorCode { code: 1654, description: "MSI 1654 - The app that you are trying to run is not supported on this version of Windows", category: ErrorCategory::Msi },
    ErrorCode { code: 1701, description: "MSI 1701 - The key path is not valid", category: ErrorCategory::Msi },
    ErrorCode { code: 1702, description: "MSI 1702 - The Installer must restart your system before configuration can continue", category: ErrorCategory::Msi },
    ErrorCode { code: 1703, description: "MSI 1703 - You must restart your system for the configuration changes to take effect", category: ErrorCategory::Msi },
    ErrorCode { code: 1704, description: "MSI 1704 - An install for the product is currently suspended", category: ErrorCategory::Msi },
    ErrorCode { code: 1705, description: "MSI 1705 - An installation for this product is already in progress", category: ErrorCategory::Msi },
    ErrorCode { code: 1706, description: "MSI 1706 - No valid source could be found for product", category: ErrorCategory::Msi },
    ErrorCode { code: 1707, description: "MSI 1707 - Installation operation completed successfully", category: ErrorCategory::Msi },
    ErrorCode { code: 1708, description: "MSI 1708 - Installation operation failed", category: ErrorCategory::Msi },
    ErrorCode { code: 1709, description: "MSI 1709 - Product not found", category: ErrorCategory::Msi },
    ErrorCode { code: 1710, description: "MSI 1710 - Configuration of product failed", category: ErrorCategory::Msi },
    ErrorCode { code: 1711, description: "MSI 1711 - Component not found", category: ErrorCategory::Msi },
    ErrorCode { code: 1712, description: "MSI 1712 - The source installation database is corrupted", category: ErrorCategory::Msi },
    ErrorCode { code: 1713, description: "MSI 1713 - The install data is corrupt", category: ErrorCategory::Msi },
    ErrorCode { code: 1714, description: "MSI 1714 - The older version of the product cannot be removed", category: ErrorCategory::Msi },
    ErrorCode { code: 1715, description: "MSI 1715 - The path is not valid", category: ErrorCategory::Msi },
    ErrorCode { code: 1716, description: "MSI 1716 - Not enough disk space", category: ErrorCategory::Msi },
    ErrorCode { code: 1717, description: "MSI 1717 - Source is not available for installation", category: ErrorCategory::Msi },
    ErrorCode { code: 1718, description: "MSI 1718 - A newer version of the product is already installed", category: ErrorCategory::Msi },
    ErrorCode { code: 1719, description: "MSI 1719 - Windows Installer service could not be accessed", category: ErrorCategory::Msi },
    ErrorCode { code: 1720, description: "MSI 1720 - There is a problem with the Windows Installer package script", category: ErrorCategory::Msi },
    ErrorCode { code: 1721, description: "MSI 1721 - There is a problem with the Windows Installer package. A DLL required for installation could not be run", category: ErrorCategory::Msi },
    ErrorCode { code: 1722, description: "MSI 1722 - There is a problem with this Windows Installer package. A script required for this install to complete could not be run", category: ErrorCategory::Msi },
    ErrorCode { code: 1723, description: "MSI 1723 - There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run", category: ErrorCategory::Msi },
    ErrorCode { code: 1724, description: "MSI 1724 - Removal completed successfully", category: ErrorCategory::Msi },
    ErrorCode { code: 1725, description: "MSI 1725 - Removal failed", category: ErrorCategory::Msi },
    ErrorCode { code: 1726, description: "MSI 1726 - Advertisement completed successfully", category: ErrorCategory::Msi },
    ErrorCode { code: 1727, description: "MSI 1727 - Advertisement failed", category: ErrorCategory::Msi },
    ErrorCode { code: 1728, description: "MSI 1728 - Configuration completed successfully", category: ErrorCategory::Msi },
    ErrorCode { code: 1729, description: "MSI 1729 - Configuration failed", category: ErrorCategory::Msi },
    ErrorCode { code: 1730, description: "MSI 1730 - You must be an Administrator to remove this application", category: ErrorCategory::Msi },
    ErrorCode { code: 1801, description: "MSI 1801 - The path is not valid", category: ErrorCategory::Msi },
    ErrorCode { code: 1802, description: "MSI 1802 - Out of memory. Shut down other applications before retrying", category: ErrorCategory::Msi },
    ErrorCode { code: 1803, description: "MSI 1803 - There is no disk in drive. Please insert one and click Retry", category: ErrorCategory::Msi },
    ErrorCode { code: 1804, description: "MSI 1804 - Access denied", category: ErrorCategory::Msi },
    ErrorCode { code: 1805, description: "MSI 1805 - The folder does not exist", category: ErrorCategory::Msi },
    ErrorCode { code: 1806, description: "MSI 1806 - There is not enough disk space to complete the installation", category: ErrorCategory::Msi },
    ErrorCode { code: 1901, description: "MSI 1901 - Error attempting to read from the source install database", category: ErrorCategory::Msi },
    ErrorCode { code: 1902, description: "MSI 1902 - Scheduling reboot operation: Renaming file", category: ErrorCategory::Msi },
    ErrorCode { code: 1903, description: "MSI 1903 - Scheduling reboot operation: Deleting file", category: ErrorCategory::Msi },
    ErrorCode { code: 1904, description: "MSI 1904 - Module failed to register (HRESULT)", category: ErrorCategory::Msi },
    ErrorCode { code: 1905, description: "MSI 1905 - Module failed to unregister (HRESULT)", category: ErrorCategory::Msi },
    ErrorCode { code: 1906, description: "MSI 1906 - Failed to cache package", category: ErrorCategory::Msi },
    ErrorCode { code: 1907, description: "MSI 1907 - Could not register font", category: ErrorCategory::Msi },
    ErrorCode { code: 1908, description: "MSI 1908 - Could not unregister font", category: ErrorCategory::Msi },
    ErrorCode { code: 1909, description: "MSI 1909 - Could not create shortcut", category: ErrorCategory::Msi },
    ErrorCode { code: 1910, description: "MSI 1910 - Could not remove shortcut", category: ErrorCategory::Msi },
    ErrorCode { code: 1911, description: "MSI 1911 - Could not register type library for file", category: ErrorCategory::Msi },
    ErrorCode { code: 1912, description: "MSI 1912 - Could not unregister type library for file", category: ErrorCategory::Msi },
    ErrorCode { code: 1913, description: "MSI 1913 - Could not update INI file", category: ErrorCategory::Msi },
    ErrorCode { code: 1914, description: "MSI 1914 - Could not schedule file to replace on reboot", category: ErrorCategory::Msi },
    ErrorCode { code: 1915, description: "MSI 1915 - Error removing ODBC driver manager, ODBC error", category: ErrorCategory::Msi },
    ErrorCode { code: 1916, description: "MSI 1916 - Error installing ODBC driver manager, ODBC error", category: ErrorCategory::Msi },
    ErrorCode { code: 1917, description: "MSI 1917 - Error removing ODBC driver, ODBC error", category: ErrorCategory::Msi },
    ErrorCode { code: 1918, description: "MSI 1918 - Error installing ODBC driver, ODBC error", category: ErrorCategory::Msi },
    ErrorCode { code: 1919, description: "MSI 1919 - Error configuring ODBC data source, ODBC error", category: ErrorCategory::Msi },
    ErrorCode { code: 1920, description: "MSI 1920 - Service failed to start. Verify that you have sufficient privileges", category: ErrorCategory::Msi },
    ErrorCode { code: 1921, description: "MSI 1921 - Service could not be stopped. Verify that you have sufficient privileges", category: ErrorCategory::Msi },
    ErrorCode { code: 1922, description: "MSI 1922 - Service could not be deleted. Verify that you have sufficient privileges", category: ErrorCategory::Msi },
    ErrorCode { code: 1923, description: "MSI 1923 - Service could not be installed. Verify that you have sufficient privileges", category: ErrorCategory::Msi },
    ErrorCode { code: 1924, description: "MSI 1924 - Could not update environment variable", category: ErrorCategory::Msi },
    ErrorCode { code: 1925, description: "MSI 1925 - You do not have sufficient privileges to complete this installation for all users", category: ErrorCategory::Msi },
    ErrorCode { code: 1926, description: "MSI 1926 - Could not set file security", category: ErrorCategory::Msi },
    ErrorCode { code: 1927, description: "MSI 1927 - Component Services (COM+) is not installed on this computer", category: ErrorCategory::Msi },
    ErrorCode { code: 1928, description: "MSI 1928 - Error registering COM+ application", category: ErrorCategory::Msi },
    ErrorCode { code: 1929, description: "MSI 1929 - Error unregistering COM+ application", category: ErrorCategory::Msi },
    ErrorCode { code: 1930, description: "MSI 1930 - Could not change the font description for file", category: ErrorCategory::Msi },
    ErrorCode { code: 1931, description: "MSI 1931 - Could not validate digital signature for cabinet file", category: ErrorCategory::Msi },
    ErrorCode { code: 1932, description: "MSI 1932 - The Windows Installer does not permit installation from a Remote Desktop Connection", category: ErrorCategory::Msi },
    ErrorCode { code: 1933, description: "MSI 1933 - An install for the product failed. Contact your support personnel", category: ErrorCategory::Msi },
    ErrorCode { code: 1934, description: "MSI 1934 - Windows Installer cannot install a system restart manager", category: ErrorCategory::Msi },
    ErrorCode { code: 1935, description: "MSI 1935 - An error occurred during the installation of assembly", category: ErrorCategory::Msi },

    // MSI internal errors (2000-2999)
    ErrorCode { code: 2101, description: "MSI 2101 - Shortcuts not supported by the operating system", category: ErrorCategory::Msi },
    ErrorCode { code: 2102, description: "MSI 2102 - Invalid .ini action", category: ErrorCategory::Msi },
    ErrorCode { code: 2103, description: "MSI 2103 - Could not resolve path for shell folder", category: ErrorCategory::Msi },
    ErrorCode { code: 2104, description: "MSI 2104 - Writing .ini file: mode flag out of range", category: ErrorCategory::Msi },
    ErrorCode { code: 2105, description: "MSI 2105 - Could not create a critical item needed to complete the install", category: ErrorCategory::Msi },
    ErrorCode { code: 2106, description: "MSI 2106 - CreateProcess failed, attempting to apply application compatibility fixes", category: ErrorCategory::Msi },
    ErrorCode { code: 2107, description: "MSI 2107 - The Installer has encountered an unexpected error installing this package", category: ErrorCategory::Msi },
    ErrorCode { code: 2108, description: "MSI 2108 - No transform matching criteria found", category: ErrorCategory::Msi },
    ErrorCode { code: 2109, description: "MSI 2109 - Transform rejected", category: ErrorCategory::Msi },
    ErrorCode { code: 2110, description: "MSI 2110 - Unexpected install message", category: ErrorCategory::Msi },
    ErrorCode { code: 2111, description: "MSI 2111 - Exception was thrown by custom action", category: ErrorCategory::Msi },
    ErrorCode { code: 2112, description: "MSI 2112 - Error in running detection manager", category: ErrorCategory::Msi },
    ErrorCode { code: 2113, description: "MSI 2113 - Uninitialized data", category: ErrorCategory::Msi },
    ErrorCode { code: 2200, description: "MSI 2200 - Database: memory error", category: ErrorCategory::Msi },
    ErrorCode { code: 2201, description: "MSI 2201 - Database: invalid persistence mode", category: ErrorCategory::Msi },
    ErrorCode { code: 2202, description: "MSI 2202 - Database: table already exists", category: ErrorCategory::Msi },
    ErrorCode { code: 2203, description: "MSI 2203 - Database: error opening file", category: ErrorCategory::Msi },
    ErrorCode { code: 2204, description: "MSI 2204 - Database: table does not exist", category: ErrorCategory::Msi },
    ErrorCode { code: 2205, description: "MSI 2205 - Database: table does not exist", category: ErrorCategory::Msi },
    ErrorCode { code: 2206, description: "MSI 2206 - Database: error opening view", category: ErrorCategory::Msi },
    ErrorCode { code: 2207, description: "MSI 2207 - Database: invalid fetch request", category: ErrorCategory::Msi },
    ErrorCode { code: 2208, description: "MSI 2208 - Database: out of data", category: ErrorCategory::Msi },
    ErrorCode { code: 2209, description: "MSI 2209 - Database: string too long", category: ErrorCategory::Msi },
    ErrorCode { code: 2210, description: "MSI 2210 - Database: key not matching", category: ErrorCategory::Msi },
    ErrorCode { code: 2211, description: "MSI 2211 - Database: data not ready", category: ErrorCategory::Msi },
    ErrorCode { code: 2212, description: "MSI 2212 - Database: record not matching", category: ErrorCategory::Msi },
    ErrorCode { code: 2213, description: "MSI 2213 - Database: initialization error", category: ErrorCategory::Msi },
    ErrorCode { code: 2214, description: "MSI 2214 - Database: invalid table", category: ErrorCategory::Msi },
    ErrorCode { code: 2215, description: "MSI 2215 - Database: invalid row", category: ErrorCategory::Msi },
    ErrorCode { code: 2216, description: "MSI 2216 - Database: invalid field", category: ErrorCategory::Msi },
    ErrorCode { code: 2217, description: "MSI 2217 - Database: invalid column", category: ErrorCategory::Msi },
    ErrorCode { code: 2218, description: "MSI 2218 - Database: error in SQL query", category: ErrorCategory::Msi },
    ErrorCode { code: 2219, description: "MSI 2219 - Database: record too large", category: ErrorCategory::Msi },
    ErrorCode { code: 2220, description: "MSI 2220 - Database: information exceeds allocated space", category: ErrorCategory::Msi },
    ErrorCode { code: 2221, description: "MSI 2221 - Database: invalid modify request", category: ErrorCategory::Msi },
    ErrorCode { code: 2222, description: "MSI 2222 - Database: modify failed constraint", category: ErrorCategory::Msi },
    ErrorCode { code: 2223, description: "MSI 2223 - Database: modify operation failed", category: ErrorCategory::Msi },
    ErrorCode { code: 2224, description: "MSI 2224 - Database: view drop failed", category: ErrorCategory::Msi },
    ErrorCode { code: 2225, description: "MSI 2225 - Database: invalid state", category: ErrorCategory::Msi },
    ErrorCode { code: 2226, description: "MSI 2226 - Database: create failed — database already exists", category: ErrorCategory::Msi },
    ErrorCode { code: 2227, description: "MSI 2227 - Database: invalid table definition", category: ErrorCategory::Msi },
    ErrorCode { code: 2228, description: "MSI 2228 - Database: invalid column definition", category: ErrorCategory::Msi },
    ErrorCode { code: 2229, description: "MSI 2229 - Database: table is read-only", category: ErrorCategory::Msi },
    ErrorCode { code: 2230, description: "MSI 2230 - Database: error writing export file", category: ErrorCategory::Msi },
    ErrorCode { code: 2231, description: "MSI 2231 - Database: error reading import file", category: ErrorCategory::Msi },
    ErrorCode { code: 2232, description: "MSI 2232 - Database: merge failed — table schema mismatch", category: ErrorCategory::Msi },
    ErrorCode { code: 2501, description: "MSI 2501 - Could not create rollback script enumerator", category: ErrorCategory::Msi },
    ErrorCode { code: 2502, description: "MSI 2502 - Called InstallFinalize when no install in progress", category: ErrorCategory::Msi },
    ErrorCode { code: 2503, description: "MSI 2503 - Called RunScript when not marked in progress", category: ErrorCategory::Msi },
    ErrorCode { code: 2504, description: "MSI 2504 - Installer internal error: called Install on a session that is already in install mode", category: ErrorCategory::Msi },
    ErrorCode { code: 2505, description: "MSI 2505 - Installer internal error: called Finish on a session that is not in install mode", category: ErrorCategory::Msi },
    ErrorCode { code: 2506, description: "MSI 2506 - Cannot find table in SQL query", category: ErrorCategory::Msi },
    ErrorCode { code: 2507, description: "MSI 2507 - Installer could not access or create the rollback directory", category: ErrorCategory::Msi },
    ErrorCode { code: 2508, description: "MSI 2508 - Rollback disabled", category: ErrorCategory::Msi },
    ErrorCode { code: 2509, description: "MSI 2509 - Rollback install not supported", category: ErrorCategory::Msi },
    ErrorCode { code: 2510, description: "MSI 2510 - Error waiting for patch thread", category: ErrorCategory::Msi },
    ErrorCode { code: 2511, description: "MSI 2511 - Stored rollback script", category: ErrorCategory::Msi },
    ErrorCode { code: 2601, description: "MSI 2601 - Invalid value for property", category: ErrorCategory::Msi },
    ErrorCode { code: 2602, description: "MSI 2602 - The product is already registered", category: ErrorCategory::Msi },
    ErrorCode { code: 2603, description: "MSI 2603 - The product is not registered", category: ErrorCategory::Msi },
    ErrorCode { code: 2604, description: "MSI 2604 - Unknown table", category: ErrorCategory::Msi },
    ErrorCode { code: 2605, description: "MSI 2605 - Invalid data in row", category: ErrorCategory::Msi },
    ErrorCode { code: 2606, description: "MSI 2606 - Could not add row", category: ErrorCategory::Msi },
    ErrorCode { code: 2607, description: "MSI 2607 - Installation script corrupt", category: ErrorCategory::Msi },
    ErrorCode { code: 2608, description: "MSI 2608 - Could not register script", category: ErrorCategory::Msi },
    ErrorCode { code: 2609, description: "MSI 2609 - Could not unregister script", category: ErrorCategory::Msi },
    ErrorCode { code: 2611, description: "MSI 2611 - Installation script missing from install package", category: ErrorCategory::Msi },
    ErrorCode { code: 2612, description: "MSI 2612 - Installation script from package could not be obtained", category: ErrorCategory::Msi },
    ErrorCode { code: 2613, description: "MSI 2613 - Invalid string length for table column", category: ErrorCategory::Msi },
    ErrorCode { code: 2614, description: "MSI 2614 - Column with this name already exists", category: ErrorCategory::Msi },
    ErrorCode { code: 2615, description: "MSI 2615 - The table was not altered", category: ErrorCategory::Msi },
    ErrorCode { code: 2616, description: "MSI 2616 - Error getting disk free space", category: ErrorCategory::Msi },
    ErrorCode { code: 2701, description: "MSI 2701 - The depth of a feature exceeds the acceptable limit of", category: ErrorCategory::Msi },
    ErrorCode { code: 2702, description: "MSI 2702 - A Feature table record was not found for the requested feature", category: ErrorCategory::Msi },
    ErrorCode { code: 2703, description: "MSI 2703 - Called MoveData when not at install state", category: ErrorCategory::Msi },
    ErrorCode { code: 2704, description: "MSI 2704 - Undefined property in the Condition column of the LaunchCondition table", category: ErrorCategory::Msi },
    ErrorCode { code: 2705, description: "MSI 2705 - Invalid table. A required column is missing from the table", category: ErrorCategory::Msi },
    ErrorCode { code: 2706, description: "MSI 2706 - New upgrade feature not found in Feature table", category: ErrorCategory::Msi },
    ErrorCode { code: 2707, description: "MSI 2707 - Duplicate component found in Component table", category: ErrorCategory::Msi },
    ErrorCode { code: 2708, description: "MSI 2708 - Missing component in Component table", category: ErrorCategory::Msi },
    ErrorCode { code: 2709, description: "MSI 2709 - Service name already in ServiceInstall table", category: ErrorCategory::Msi },
    ErrorCode { code: 2710, description: "MSI 2710 - The property does not exist in the Property table", category: ErrorCategory::Msi },
    ErrorCode { code: 2711, description: "MSI 2711 - The features in this product have not been completed", category: ErrorCategory::Msi },
    ErrorCode { code: 2712, description: "MSI 2712 - Invalid handle for file", category: ErrorCategory::Msi },
    ErrorCode { code: 2713, description: "MSI 2713 - Missing package name for product code", category: ErrorCategory::Msi },
    ErrorCode { code: 2714, description: "MSI 2714 - File key not found in File table", category: ErrorCategory::Msi },
    ErrorCode { code: 2715, description: "MSI 2715 - Missing patch info for registered product", category: ErrorCategory::Msi },
    ErrorCode { code: 2716, description: "MSI 2716 - Source media info not found", category: ErrorCategory::Msi },
    ErrorCode { code: 2717, description: "MSI 2717 - Invalid DiskId in Media table", category: ErrorCategory::Msi },
    ErrorCode { code: 2718, description: "MSI 2718 - Missing file in assembly table", category: ErrorCategory::Msi },
    ErrorCode { code: 2719, description: "MSI 2719 - Invalid assembly transform filter", category: ErrorCategory::Msi },
    ErrorCode { code: 2720, description: "MSI 2720 - Could not determine publishing root", category: ErrorCategory::Msi },
    ErrorCode { code: 2721, description: "MSI 2721 - Could not unpin assembly from cache", category: ErrorCategory::Msi },
    ErrorCode { code: 2722, description: "MSI 2722 - Could not find the requested assembly in the side-by-side assembly cache", category: ErrorCategory::Msi },
    ErrorCode { code: 2723, description: "MSI 2723 - Assembly name missing from AssemblyName table", category: ErrorCategory::Msi },
    ErrorCode { code: 2724, description: "MSI 2724 - File key not found in File table for assembly", category: ErrorCategory::Msi },
    ErrorCode { code: 2725, description: "MSI 2725 - Source file cabinet not found for assembly", category: ErrorCategory::Msi },
    ErrorCode { code: 2726, description: "MSI 2726 - Invalid GUID format for registered product", category: ErrorCategory::Msi },
    ErrorCode { code: 2727, description: "MSI 2727 - Invalid GUID format for registered feature", category: ErrorCategory::Msi },
    ErrorCode { code: 2728, description: "MSI 2728 - Invalid GUID format for registered component", category: ErrorCategory::Msi },
    ErrorCode { code: 2729, description: "MSI 2729 - Property Manager not initialized", category: ErrorCategory::Msi },
    ErrorCode { code: 2730, description: "MSI 2730 - The server returned an unexpected error trying to install this package", category: ErrorCategory::Msi },
    ErrorCode { code: 2731, description: "MSI 2731 - Selection Manager not initialized", category: ErrorCategory::Msi },
    ErrorCode { code: 2732, description: "MSI 2732 - Directory Manager not initialized", category: ErrorCategory::Msi },
    ErrorCode { code: 2733, description: "MSI 2733 - Bad foreign key in table", category: ErrorCategory::Msi },
    ErrorCode { code: 2734, description: "MSI 2734 - Invalid reinstall mode", category: ErrorCategory::Msi },
    ErrorCode { code: 2735, description: "MSI 2735 - Custom action has no DLL or EXE listed in Binary table", category: ErrorCategory::Msi },
    ErrorCode { code: 2736, description: "MSI 2736 - Custom action name not found in CustomAction table", category: ErrorCategory::Msi },
    ErrorCode { code: 2737, description: "MSI 2737 - Could not access custom action DLL", category: ErrorCategory::Msi },
    ErrorCode { code: 2738, description: "MSI 2738 - Could not access VBScript runtime for custom action", category: ErrorCategory::Msi },
    ErrorCode { code: 2739, description: "MSI 2739 - Could not access JScript runtime for custom action", category: ErrorCategory::Msi },
    ErrorCode { code: 2740, description: "MSI 2740 - Custom action attempted to call a function not present", category: ErrorCategory::Msi },
    ErrorCode { code: 2741, description: "MSI 2741 - Configuration information for product is corrupt", category: ErrorCategory::Msi },
    ErrorCode { code: 2742, description: "MSI 2742 - Marshaling to Server failed: No action data", category: ErrorCategory::Msi },
    ErrorCode { code: 2743, description: "MSI 2743 - Could not execute custom action. Expected an integer return value", category: ErrorCategory::Msi },
    ErrorCode { code: 2744, description: "MSI 2744 - EXE failed called by custom action", category: ErrorCategory::Msi },
    ErrorCode { code: 2745, description: "MSI 2745 - Transform from patch has failed verification. This patch may be invalid", category: ErrorCategory::Msi },
    ErrorCode { code: 2746, description: "MSI 2746 - Custom action tried to install on a per-user managed app", category: ErrorCategory::Msi },
    ErrorCode { code: 2747, description: "MSI 2747 - Transform rejected, custom action tried to remove a per-user unmanaged app", category: ErrorCategory::Msi },
    ErrorCode { code: 2748, description: "MSI 2748 - Transform from patch package is invalid", category: ErrorCategory::Msi },
    ErrorCode { code: 2749, description: "MSI 2749 - Custom action DLL crash detected", category: ErrorCategory::Msi },
    ErrorCode { code: 2750, description: "MSI 2750 - Transform rejected. The rollback was disabled when the transform was applied", category: ErrorCategory::Msi },
    ErrorCode { code: 2751, description: "MSI 2751 - Transform rejected. The system does not support elevated custom actions", category: ErrorCategory::Msi },
    ErrorCode { code: 2752, description: "MSI 2752 - Custom action script error", category: ErrorCategory::Msi },
    ErrorCode { code: 2753, description: "MSI 2753 - The file is not marked for installation", category: ErrorCategory::Msi },
    ErrorCode { code: 2754, description: "MSI 2754 - The file key is not found in the File table", category: ErrorCategory::Msi },
    ErrorCode { code: 2755, description: "MSI 2755 - Server returned unexpected error attempting to install package", category: ErrorCategory::Msi },
    ErrorCode { code: 2756, description: "MSI 2756 - Invalid custom action name", category: ErrorCategory::Msi },
    ErrorCode { code: 2757, description: "MSI 2757 - Could not create custom action thread", category: ErrorCategory::Msi },
    ErrorCode { code: 2758, description: "MSI 2758 - Custom action threw an exception", category: ErrorCategory::Msi },
    ErrorCode { code: 2759, description: "MSI 2759 - Custom action failed. The action was attempted but the function returned an error", category: ErrorCategory::Msi },
    ErrorCode { code: 2760, description: "MSI 2760 - Custom action data not set correctly", category: ErrorCategory::Msi },
    ErrorCode { code: 2761, description: "MSI 2761 - Queuing a custom action failed", category: ErrorCategory::Msi },
    ErrorCode { code: 2762, description: "MSI 2762 - Custom action sequencing error", category: ErrorCategory::Msi },
    ErrorCode { code: 2763, description: "MSI 2763 - Could not get property for custom action", category: ErrorCategory::Msi },
    ErrorCode { code: 2765, description: "MSI 2765 - Assembly name missing from AssemblyName table", category: ErrorCategory::Msi },
    ErrorCode { code: 2801, description: "MSI 2801 - Unknown Message", category: ErrorCategory::Msi },
    ErrorCode { code: 2802, description: "MSI 2802 - No publisher for event found", category: ErrorCategory::Msi },
    ErrorCode { code: 2803, description: "MSI 2803 - Dialog View did not find a record in UIText table", category: ErrorCategory::Msi },
    ErrorCode { code: 2804, description: "MSI 2804 - On activation of the control, its condition evaluated to error", category: ErrorCategory::Msi },
    ErrorCode { code: 2806, description: "MSI 2806 - The dialog is not registered as creatable", category: ErrorCategory::Msi },
    ErrorCode { code: 2807, description: "MSI 2807 - Control not registered as creatable", category: ErrorCategory::Msi },
    ErrorCode { code: 2808, description: "MSI 2808 - On activation of the control, there was no condition", category: ErrorCategory::Msi },
    ErrorCode { code: 2809, description: "MSI 2809 - Event failed because active dialog has the subscriber", category: ErrorCategory::Msi },
    ErrorCode { code: 2810, description: "MSI 2810 - Event failed because active dialog does not have the subscriber", category: ErrorCategory::Msi },
    ErrorCode { code: 2811, description: "MSI 2811 - Error in running control event", category: ErrorCategory::Msi },
    ErrorCode { code: 2812, description: "MSI 2812 - Custom action error in event handler", category: ErrorCategory::Msi },
    ErrorCode { code: 2813, description: "MSI 2813 - Control attribute failure", category: ErrorCategory::Msi },
    ErrorCode { code: 2814, description: "MSI 2814 - Window creation failure", category: ErrorCategory::Msi },
    ErrorCode { code: 2815, description: "MSI 2815 - Could not get DC for window", category: ErrorCategory::Msi },
    ErrorCode { code: 2816, description: "MSI 2816 - Could not get text metrics for font", category: ErrorCategory::Msi },
    ErrorCode { code: 2817, description: "MSI 2817 - Could not find table: BBControl", category: ErrorCategory::Msi },
    ErrorCode { code: 2818, description: "MSI 2818 - Error in installing billboard", category: ErrorCategory::Msi },
    ErrorCode { code: 2819, description: "MSI 2819 - Could not find a DLL required for this install", category: ErrorCategory::Msi },
    ErrorCode { code: 2820, description: "MSI 2820 - Rollback data not found", category: ErrorCategory::Msi },
    ErrorCode { code: 2821, description: "MSI 2821 - Could not load handler for Rollback", category: ErrorCategory::Msi },
    ErrorCode { code: 2822, description: "MSI 2822 - Error in initializing rollback: state data might be inaccessible", category: ErrorCategory::Msi },
    ErrorCode { code: 2901, description: "MSI 2901 - Invalid parameter in operation for creating patch package", category: ErrorCategory::Msi },
    ErrorCode { code: 2902, description: "MSI 2902 - Error in creating patch package", category: ErrorCategory::Msi },
    ErrorCode { code: 2903, description: "MSI 2903 - Missing file table in sub-storage", category: ErrorCategory::Msi },
    ErrorCode { code: 2904, description: "MSI 2904 - Invalid sub-storage name", category: ErrorCategory::Msi },
    ErrorCode { code: 2905, description: "MSI 2905 - Error in file hash computation", category: ErrorCategory::Msi },
    ErrorCode { code: 2906, description: "MSI 2906 - Missing file hash info", category: ErrorCategory::Msi },
    ErrorCode { code: 2907, description: "MSI 2907 - Duplicate file key in patch creation", category: ErrorCategory::Msi },
    ErrorCode { code: 2908, description: "MSI 2908 - Could not register component", category: ErrorCategory::Msi },
    ErrorCode { code: 2909, description: "MSI 2909 - Could not unregister component", category: ErrorCategory::Msi },
    ErrorCode { code: 2910, description: "MSI 2910 - Could not determine user's security ID", category: ErrorCategory::Msi },
    ErrorCode { code: 2911, description: "MSI 2911 - Could not remove the folder", category: ErrorCategory::Msi },
    ErrorCode { code: 2912, description: "MSI 2912 - Could not schedule file to be replaced on reboot", category: ErrorCategory::Msi },
    ErrorCode { code: 2919, description: "MSI 2919 - No cabinet specified for compressed file", category: ErrorCategory::Msi },
    ErrorCode { code: 2920, description: "MSI 2920 - Source directory not specified for file", category: ErrorCategory::Msi },
    ErrorCode { code: 2924, description: "MSI 2924 - One or more volume labels do not match", category: ErrorCategory::Msi },
    ErrorCode { code: 2927, description: "MSI 2927 - Source directory is missing from Directory table", category: ErrorCategory::Msi },
    ErrorCode { code: 2928, description: "MSI 2928 - Exceeded maximum number of sources during patch apply", category: ErrorCategory::Msi },
    ErrorCode { code: 2929, description: "MSI 2929 - Could not determine packaging type", category: ErrorCategory::Msi },
    ErrorCode { code: 2932, description: "MSI 2932 - Could not create file summary information", category: ErrorCategory::Msi },
    ErrorCode { code: 2933, description: "MSI 2933 - Could not initialize rollback security", category: ErrorCategory::Msi },
    ErrorCode { code: 2934, description: "MSI 2934 - Could not get rollback security information", category: ErrorCategory::Msi },
    ErrorCode { code: 2935, description: "MSI 2935 - Could not open rollback script", category: ErrorCategory::Msi },
    ErrorCode { code: 2936, description: "MSI 2936 - Could not read rollback script", category: ErrorCategory::Msi },
    ErrorCode { code: 2937, description: "MSI 2937 - Could not write rollback script", category: ErrorCategory::Msi },
    ErrorCode { code: 2938, description: "MSI 2938 - Rollback script creation error", category: ErrorCategory::Msi },
    ErrorCode { code: 2939, description: "MSI 2939 - Could not execute rollback script", category: ErrorCategory::Msi },
    ErrorCode { code: 2940, description: "MSI 2940 - Installer transform failure", category: ErrorCategory::Msi },

    // MSI patch errors (3000-3010)
    ErrorCode { code: 3000, description: "MSI 3000 - Patch sequencing error: could not find the patch in the patch list", category: ErrorCategory::Msi },
    ErrorCode { code: 3001, description: "MSI 3001 - Patch sequencing error: could not determine sequence for patch", category: ErrorCategory::Msi },
    ErrorCode { code: 3002, description: "MSI 3002 - Patch was removed from sequencing", category: ErrorCategory::Msi },

    // PSADT (PowerShell App Deployment Toolkit) exit codes

    // ==========================================
    // Certificate errors
    // ==========================================
    ErrorCode { code: 0x800B0001, description: "TRUST_E_PROVIDER_UNKNOWN - Unknown trust provider", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B0003, description: "TRUST_E_SUBJECT_FORM_UNKNOWN - Unknown form type", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B0004, description: "TRUST_E_SUBJECT_NOT_TRUSTED - The subject is not trusted for the specified action", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B0100, description: "TRUST_E_NOSIGNATURE - No signature was present in the subject", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B0101, description: "CERT_E_EXPIRED - A required certificate is not within its validity period", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B0106, description: "CERT_E_CHAINING - Could not form a valid certificate chain", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B0109, description: "CERT_E_UNTRUSTEDROOT - A certificate chain processed but terminated in a root certificate not trusted", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B010A, description: "CERT_E_CHAINING - A certificate chain could not be built to a trusted root authority", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B010B, description: "CERT_E_REVOCATION_FAILURE - The revocation process could not continue", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B010C, description: "CERT_E_CN_NO_MATCH - The certificate CN name does not match the passed value", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B010D, description: "CERT_E_WRONG_USAGE - The certificate is not valid for the requested usage", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B0110, description: "CERT_E_CRITICAL - A certificate contains an unknown extension that is marked critical", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B0111, description: "CERT_E_PURPOSE - The certificate is being used for a purpose other than the ones specified by the CA", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B0113, description: "CERT_E_MALFORMED - A certificate is missing or has an empty value for an important field", category: ErrorCategory::Certificate },
    ErrorCode { code: 0x800B0114, description: "CERT_E_UNTRUSTEDCA - A certification chain processed correctly but one of the CA certificates is not trusted by the policy provider", category: ErrorCategory::Certificate },

    // ==========================================
    // Intune / MDM
    // ==========================================
    ErrorCode { code: 0x87D00215, description: "INTUNEWIN_E_INSTALL_FAILURE - The application installation failed", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D00324, description: "INTUNEWIN_E_DETECTION_FAILED - Post-install detection failed", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D00607, description: "INTUNEWIN_E_DOWNLOAD_FAILED - Content download failed", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D01101, description: "INTUNEWIN_E_TIMEOUT - Application install timed out", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D10001, description: "INTUNE_CLIENT_ERROR - Intune client error", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D1041C, description: "INTUNE_NOT_DETECTED_POST_INSTALL - Application was not detected after installation completed", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D11388, description: "INTUNE_IOS_BUSY - iOS device is currently busy", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D1313C, description: "INTUNE_NETWORK_LOST - Network connection on the client was lost during download", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D13B64, description: "INTUNE_IOS_INSTALL_FAILURE - iOS app installation failure", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D13B66, description: "INTUNE_APP_EXPIRED - App is managed but has expired or been removed by user", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D13B9B, description: "INTUNE_RETRY_NEXT_SYNC - App installation failed, Intune will retry next sync", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D30000, description: "INTUNE_UNKNOWN - Unknown error (last step succeeded but current step has no defined output)", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D30001, description: "INTUNE_NOT_DETECTED_AFTER_INSTALL - App was not detected after installation", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D30003, description: "INTUNE_REBOOT_REQUIRED - App install requires device reboot", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D30004, description: "INTUNE_UNINSTALLED_AFTER_DETECT - App was uninstalled after being detected", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D30006, description: "INTUNE_DETECTION_FAILED - App was installed but detection check failed", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D30065, description: "INTUNE_CONTENT_INFO_FAILED - Failed to retrieve content information", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D30067, description: "INTUNE_UNZIP_FAILED - Error unzipping downloaded content", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D30068, description: "INTUNE_DOWNLOAD_FAILED - Error downloading content", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D3006A, description: "INTUNE_DOWNLOAD_TIMEOUT - Content download timed out", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D300C8, description: "INTUNE_INSTALL_PENDING - App install not yet complete", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D300CA, description: "INTUNE_ENFORCEMENT_FAILED - Failed to enforce app", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D300CC, description: "INTUNE_OOBE_SKIPPED - Device in OOBE, skipping", category: ErrorCategory::Intune },
    ErrorCode { code: 0x87D300CE, description: "INTUNE_NOT_APPLICABLE - App not applicable to device", category: ErrorCategory::Intune },

    // ==========================================
    // Network — WinHTTP errors
    // ==========================================
    ErrorCode { code: 0x80072EE1, description: "ERROR_WINHTTP_OUT_OF_HANDLES - No more handles could be generated", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072EE2, description: "ERROR_WINHTTP_TIMEOUT - The request has timed out", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072EE4, description: "ERROR_WINHTTP_INTERNAL_ERROR - An internal error has occurred", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072EE5, description: "ERROR_WINHTTP_INVALID_URL - The URL is invalid", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072EE7, description: "ERROR_WINHTTP_NAME_NOT_RESOLVED - The server name could not be resolved", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072EFD, description: "ERROR_WINHTTP_CANNOT_CONNECT - Connection to the server failed", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072EFE, description: "ERROR_WINHTTP_CONNECTION_ERROR - The connection with the server has been reset or terminated", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072F06, description: "ERROR_WINHTTP_SECURE_CERT_DATE_INVALID - SSL certificate date is invalid", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072F0C, description: "ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED - The server requires SSL client authentication", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072F0D, description: "ERROR_WINHTTP_INVALID_CA - Invalid CA certificate", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072F76, description: "ERROR_WINHTTP_HEADER_NOT_FOUND - The requested header could not be located", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072F78, description: "ERROR_WINHTTP_INVALID_SERVER_RESPONSE - The server response could not be parsed", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072F89, description: "ERROR_WINHTTP_SECURE_CERT_REVOKED - SSL certificate revoked", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072F8A, description: "ERROR_WINHTTP_SECURE_CERT_CN_INVALID - SSL certificate common name does not match", category: ErrorCategory::Network },
    ErrorCode { code: 0x80072F8F, description: "ERROR_WINHTTP_SECURE_FAILURE - One or more SSL errors were encountered", category: ErrorCategory::Network },

    // ==========================================
    // Security — Crypto / SSPI
    // ==========================================
    ErrorCode { code: 0x80090001, description: "NTE_BAD_UID - Bad UID", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090002, description: "NTE_BAD_HASH - Bad hash", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090003, description: "NTE_BAD_KEY - Bad key", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090005, description: "NTE_BAD_DATA - Bad data", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090006, description: "NTE_BAD_SIGNATURE - Invalid signature", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090010, description: "NTE_PROV_TYPE_NOT_DEF - Provider type not defined", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090020, description: "NTE_INTERNAL_ERROR - Internal error", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090300, description: "SEC_E_INSUFFICIENT_MEMORY - Not enough memory available to complete the request", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090302, description: "SEC_E_INVALID_HANDLE - The handle specified is invalid", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090304, description: "SEC_E_LOGON_DENIED - The logon attempt failed", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090308, description: "SEC_E_INVALID_TOKEN - The token supplied to the function is invalid", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090311, description: "SEC_E_NO_AUTHENTICATING_AUTHORITY - No authority could be contacted for authentication", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090317, description: "SEC_E_CERT_EXPIRED - The received certificate has expired", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090322, description: "SEC_E_WRONG_PRINCIPAL - The target principal name is incorrect", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090325, description: "SEC_E_UNTRUSTED_ROOT - The certificate chain was issued by an authority that is not trusted", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090326, description: "SEC_E_REVOCATION_OFFLINE - The revocation function was unable to check revocation because the revocation server was offline", category: ErrorCategory::Security },
    ErrorCode { code: 0x80090331, description: "SEC_E_ALGORITHM_MISMATCH - The client and server cannot communicate because they do not possess a common algorithm", category: ErrorCategory::Security },
];