FlagMaps.h
Go to the documentation of this file.
1 #pragma once
2 
3 using namespace AppSecInc::Msi::Flags;
4 
5 static const FlagMapEntry s_TcpSocketTypeFlags[] =
6 {
7  { L"SOCK_STREAM", SOCK_STREAM },
8  { L"SOCK_DGRAM", SOCK_DGRAM },
9  { L"SOCK_RAW", SOCK_RAW },
10  { L"SOCK_RDM", SOCK_RDM },
11  { L"SOCK_SEQPACKET", SOCK_SEQPACKET },
12 };
13 
14 static const FlagMapEntry s_IpProtocolFlags[] =
15 {
16  { L"IPPROTO_TCP", IPPROTO_TCP },
17  { L"IPPROTO_UDP", IPPROTO_UDP }
18 };
19 
20 typedef struct
21 {
22  LPCWSTR name;
23  HKEY value;
25 
26 static const FlagMapEntryHKEY s_RegistryRoot[] =
27 {
28  { L"HKEY_LOCAL_MACHINE", HKEY_LOCAL_MACHINE },
29  { L"HKEY_CURRENT_USER", HKEY_CURRENT_USER },
30  { L"HKEY_CURRENT_CONFIG", HKEY_CURRENT_CONFIG },
31  { L"HKEY_CLASSES_ROOT", HKEY_CLASSES_ROOT },
32  { L"HKEY_USERS", HKEY_USERS }
33 };
34 
35 static const FlagMapEntry s_ServiceControl[] =
36 {
37  { L"SERVICE_CONTROL_START", SERVICE_CONTROL_START },
38  { L"SERVICE_CONTROL_STOP", SERVICE_CONTROL_STOP },
39  { L"SERVICE_CONTROL_PAUSE", SERVICE_CONTROL_PAUSE },
40  { L"SERVICE_CONTROL_CONTINUE", SERVICE_CONTROL_CONTINUE },
41 };
42 
43 static const FlagMapEntry s_ServiceType[] =
44 {
45  { L"SERVICE_FILE_SYSTEM_DRIVER", SERVICE_FILE_SYSTEM_DRIVER },
46  { L"SERVICE_KERNEL_DRIVER", SERVICE_KERNEL_DRIVER },
47  { L"SERVICE_WIN32_OWN_PROCESS", SERVICE_WIN32_OWN_PROCESS },
48  { L"SERVICE_WIN32_SHARE_PROCESS", SERVICE_WIN32_SHARE_PROCESS },
49  { L"SERVICE_INTERACTIVE_PROCESS", SERVICE_INTERACTIVE_PROCESS },
50 };
51 
52 static const FlagMapEntry s_ServiceStartType[] =
53 {
54  { L"SERVICE_AUTO_START", SERVICE_AUTO_START },
55  { L"SERVICE_BOOT_START", SERVICE_BOOT_START },
56  { L"SERVICE_DEMAND_START", SERVICE_DEMAND_START },
57  { L"SERVICE_DISABLED", SERVICE_DISABLED },
58  { L"SERVICE_SYSTEM_START", SERVICE_SYSTEM_START },
59 };
60 
61 static const FlagMapEntry s_ServiceErrorControl[] =
62 {
63  { L"SERVICE_ERROR_IGNORE", SERVICE_ERROR_IGNORE },
64  { L"SERVICE_ERROR_NORMAL", SERVICE_ERROR_NORMAL },
65  { L"SERVICE_ERROR_SEVERE", SERVICE_ERROR_SEVERE },
66  { L"SERVICE_ERROR_CRITICAL", SERVICE_ERROR_CRITICAL },
67 };
68 
69 typedef struct
70 {
71  LPCWSTR name;
72  int value;
74 
75 static const FlagMapEntryCSIDL s_CSIDL[] =
76 {
77  { L"CSIDL_ADMINTOOLS", CSIDL_ADMINTOOLS },
78  { L"CSIDL_DESKTOP", CSIDL_DESKTOP }, // <desktop>
79  { L"CSIDL_INTERNET", CSIDL_INTERNET }, // Internet Explorer (icon on desktop)
80  { L"CSIDL_PROGRAMS", CSIDL_PROGRAMS }, // Start Menu\Programs
81  { L"CSIDL_CONTROLS", CSIDL_CONTROLS }, // My Computer\Control Panel
82  { L"CSIDL_PRINTERS", CSIDL_PRINTERS }, // My Computer\Printers
83  { L"CSIDL_PERSONAL", CSIDL_PERSONAL}, // My Documents
84  { L"CSIDL_FAVORITES", CSIDL_FAVORITES }, // <user name>\Favorites
85  { L"CSIDL_STARTUP", CSIDL_STARTUP }, // Start Menu\Programs\Startup
86  { L"CSIDL_RECENT", CSIDL_RECENT }, // <user name>\Recent
87  { L"CSIDL_SENDTO", CSIDL_SENDTO }, // <user name>\SendTo
88  { L"CSIDL_BITBUCKET", CSIDL_BITBUCKET}, // <desktop>\Recycle Bin
89  { L"CSIDL_STARTMENU", CSIDL_STARTMENU }, // <user name>\Start Menu
90  { L"CSIDL_MYDOCUMENTS", CSIDL_MYDOCUMENTS }, // logical "My Documents" desktop icon
91  { L"CSIDL_MYMUSIC", CSIDL_MYMUSIC }, // "My Music" folder
92  { L"CSIDL_MYVIDEO", CSIDL_MYVIDEO }, // "My Videos" folder
93  { L"CSIDL_DESKTOPDIRECTORY", CSIDL_DESKTOPDIRECTORY }, // <user name>\Desktop
94  { L"CSIDL_DRIVES", CSIDL_DRIVES }, // My Computer
95  { L"CSIDL_NETWORK", CSIDL_NETWORK }, // Network Neighborhood (My Network Places)
96  { L"CSIDL_NETHOOD", CSIDL_NETHOOD }, // <user name>\nethood
97  { L"CSIDL_FONTS", CSIDL_FONTS }, // windows\fonts
98  { L"CSIDL_TEMPLATES", CSIDL_TEMPLATES },
99  { L"CSIDL_COMMON_STARTMENU", CSIDL_COMMON_STARTMENU }, // All Users\Start Menu
100  { L"CSIDL_COMMON_PROGRAMS", CSIDL_COMMON_PROGRAMS }, // All Users\Start Menu\Programs
101  { L"CSIDL_COMMON_STARTUP", CSIDL_COMMON_STARTUP }, // All Users\Startup
102  { L"CSIDL_COMMON_DESKTOPDIRECTORY", CSIDL_COMMON_DESKTOPDIRECTORY }, // All Users\Desktop
103  { L"CSIDL_APPDATA", CSIDL_APPDATA }, // <user name>\Application Data
104  { L"CSIDL_PRINTHOOD", CSIDL_PRINTHOOD }, // <user name>\PrintHood
105  { L"CSIDL_LOCAL_APPDATA", CSIDL_LOCAL_APPDATA }, // <user name>\Local Settings\Applicaiton Data (non roaming)
106  { L"CSIDL_ALTSTARTUP", CSIDL_ALTSTARTUP }, // non localized startup
107  { L"CSIDL_COMMON_ALTSTARTUP", CSIDL_COMMON_ALTSTARTUP }, // non localized common startup
108  { L"CSIDL_COMMON_FAVORITES", CSIDL_COMMON_FAVORITES },
109  { L"CSIDL_INTERNET_CACHE", CSIDL_INTERNET_CACHE },
110  { L"CSIDL_COOKIES", CSIDL_COOKIES },
111  { L"CSIDL_HISTORY", CSIDL_HISTORY },
112  { L"CSIDL_COMMON_APPDATA", CSIDL_COMMON_APPDATA }, // All Users\Application Data
113  { L"CSIDL_WINDOWS", CSIDL_WINDOWS }, // GetWindowsDirectory()
114  { L"CSIDL_SYSTEM", CSIDL_SYSTEM }, // GetSystemDirectory()
115  { L"CSIDL_PROGRAM_FILES", CSIDL_PROGRAM_FILES }, // C:\Program Files
116  { L"CSIDL_MYPICTURES", CSIDL_MYPICTURES }, // C:\Program Files\My Pictures
117  { L"CSIDL_PROFILE", CSIDL_PROFILE }, // USERPROFILE
118  { L"CSIDL_SYSTEMX86", CSIDL_SYSTEMX86 }, // x86 system directory on RISC
119  { L"CSIDL_PROGRAM_FILESX86", CSIDL_PROGRAM_FILESX86 }, // x86 C:\Program Files on RISC
120  { L"CSIDL_PROGRAM_FILES_COMMON", CSIDL_PROGRAM_FILES_COMMON }, // C:\Program Files\Common
121  { L"CSIDL_PROGRAM_FILES_COMMONX86", CSIDL_PROGRAM_FILES_COMMONX86 }, // x86 Program Files\Common on RISC
122  { L"CSIDL_COMMON_TEMPLATES", CSIDL_COMMON_TEMPLATES }, // All Users\Templates
123  { L"CSIDL_COMMON_DOCUMENTS", CSIDL_COMMON_DOCUMENTS }, // All Users\Documents
124  { L"CSIDL_COMMON_ADMINTOOLS", CSIDL_COMMON_ADMINTOOLS }, // All Users\Start Menu\Programs\Administrative Tools
125  { L"CSIDL_ADMINTOOLS", CSIDL_ADMINTOOLS }, // <user name>\Start Menu\Programs\Administrative Tools
126  { L"CSIDL_CONNECTIONS", CSIDL_CONNECTIONS }, // Network and Dial-up Connections
127  { L"CSIDL_COMMON_MUSIC", CSIDL_COMMON_MUSIC }, // All Users\My Music
128  { L"CSIDL_COMMON_PICTURES", CSIDL_COMMON_PICTURES }, // All Users\My Pictures
129  { L"CSIDL_COMMON_VIDEO", CSIDL_COMMON_VIDEO }, // All Users\My Video
130  { L"CSIDL_RESOURCES", CSIDL_RESOURCES }, // Resource Direcotry
131  { L"CSIDL_RESOURCES_LOCALIZED", CSIDL_RESOURCES_LOCALIZED }, // Localized Resource Direcotry
132  { L"CSIDL_COMMON_OEM_LINKS", CSIDL_COMMON_OEM_LINKS }, // Links to All Users OEM specific apps
133  { L"CSIDL_CDBURN_AREA", CSIDL_CDBURN_AREA }, // USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
134  { L"CSIDL_COMPUTERSNEARME", CSIDL_COMPUTERSNEARME }, // Computers Near Me (computered from Workgroup membership)
135 };
Definition: FlagMaps.h:20
#define SERVICE_CONTROL_START
Definition: ServiceInstance.h:3
Definition: MsiFlags.h:7
LPCWSTR name
Definition: FlagMaps.h:71
LPCWSTR name
Definition: FlagMaps.h:22
int value
Definition: FlagMaps.h:72
Definition: FlagMaps.h:69
HKEY value
Definition: FlagMaps.h:23


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com