src/CustomActions/SystemTools/FlagMaps.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 using namespace AppSecInc::Msi::Flags;
00004 
00005 static const FlagMapEntry s_TcpSocketTypeFlags[] = 
00006 {
00007     { L"SOCK_STREAM", SOCK_STREAM },
00008     { L"SOCK_DGRAM", SOCK_DGRAM },
00009     { L"SOCK_RAW", SOCK_RAW },
00010     { L"SOCK_RDM", SOCK_RDM },
00011     { L"SOCK_SEQPACKET", SOCK_SEQPACKET },
00012 };
00013 
00014 static const FlagMapEntry s_IpProtocolFlags[] = 
00015 {
00016     { L"IPPROTO_TCP", IPPROTO_TCP },
00017     { L"IPPROTO_UDP", IPPROTO_UDP }
00018 };
00019 
00020 typedef struct
00021 {
00022     LPCWSTR name;
00023     HKEY value;
00024 } FlagMapEntryHKEY;
00025 
00026 static const FlagMapEntryHKEY s_RegistryRoot[] = 
00027 {
00028     { L"HKEY_LOCAL_MACHINE", HKEY_LOCAL_MACHINE },
00029     { L"HKEY_CURRENT_USER", HKEY_CURRENT_USER },
00030         { L"HKEY_CURRENT_CONFIG", HKEY_CURRENT_CONFIG },
00031         { L"HKEY_CLASSES_ROOT", HKEY_CLASSES_ROOT },
00032         { L"HKEY_USERS", HKEY_USERS }
00033 };
00034 
00035 static const FlagMapEntry s_ServiceControl[] = 
00036 {
00037     { L"SERVICE_CONTROL_START", SERVICE_CONTROL_START },
00038     { L"SERVICE_CONTROL_STOP", SERVICE_CONTROL_STOP }, 
00039     { L"SERVICE_CONTROL_PAUSE", SERVICE_CONTROL_PAUSE },
00040     { L"SERVICE_CONTROL_CONTINUE", SERVICE_CONTROL_CONTINUE },
00041 };
00042 
00043 static const FlagMapEntry s_ServiceType[] = 
00044 {
00045     { L"SERVICE_FILE_SYSTEM_DRIVER", SERVICE_FILE_SYSTEM_DRIVER },
00046     { L"SERVICE_KERNEL_DRIVER", SERVICE_KERNEL_DRIVER }, 
00047     { L"SERVICE_WIN32_OWN_PROCESS", SERVICE_WIN32_OWN_PROCESS },
00048     { L"SERVICE_WIN32_SHARE_PROCESS", SERVICE_WIN32_SHARE_PROCESS },
00049     { L"SERVICE_INTERACTIVE_PROCESS", SERVICE_INTERACTIVE_PROCESS },
00050 };
00051 
00052 static const FlagMapEntry s_ServiceStartType[] = 
00053 {
00054     { L"SERVICE_AUTO_START", SERVICE_AUTO_START },
00055     { L"SERVICE_BOOT_START", SERVICE_BOOT_START }, 
00056     { L"SERVICE_DEMAND_START", SERVICE_DEMAND_START },
00057     { L"SERVICE_DISABLED", SERVICE_DISABLED },
00058     { L"SERVICE_SYSTEM_START", SERVICE_SYSTEM_START },
00059 };
00060 
00061 static const FlagMapEntry s_ServiceErrorControl[] = 
00062 {
00063     { L"SERVICE_ERROR_IGNORE", SERVICE_ERROR_IGNORE },
00064     { L"SERVICE_ERROR_NORMAL", SERVICE_ERROR_NORMAL }, 
00065     { L"SERVICE_ERROR_SEVERE", SERVICE_ERROR_SEVERE },
00066     { L"SERVICE_ERROR_CRITICAL", SERVICE_ERROR_CRITICAL },
00067 };
00068 
00069 typedef struct
00070 {
00071     LPCWSTR name;
00072     int value;
00073 } FlagMapEntryCSIDL;
00074 
00075 static const FlagMapEntryCSIDL s_CSIDL[] = 
00076 {
00077     { L"CSIDL_ADMINTOOLS", CSIDL_ADMINTOOLS },
00078         { L"CSIDL_DESKTOP", CSIDL_DESKTOP },                                                                    // <desktop>
00079         { L"CSIDL_INTERNET", CSIDL_INTERNET },                                                                  // Internet Explorer (icon on desktop)
00080         { L"CSIDL_PROGRAMS", CSIDL_PROGRAMS },                                                                  // Start Menu\Programs
00081         { L"CSIDL_CONTROLS", CSIDL_CONTROLS },                                                                  // My Computer\Control Panel
00082         { L"CSIDL_PRINTERS", CSIDL_PRINTERS },                                                                  // My Computer\Printers
00083         { L"CSIDL_PERSONAL", CSIDL_PERSONAL},                                                                   // My Documents
00084         { L"CSIDL_FAVORITES", CSIDL_FAVORITES },                                                                // <user name>\Favorites
00085         { L"CSIDL_STARTUP", CSIDL_STARTUP },                                                                    // Start Menu\Programs\Startup
00086         { L"CSIDL_RECENT", CSIDL_RECENT },                                                                              // <user name>\Recent
00087         { L"CSIDL_SENDTO", CSIDL_SENDTO },                                                                              // <user name>\SendTo
00088         { L"CSIDL_BITBUCKET", CSIDL_BITBUCKET},                                                                 // <desktop>\Recycle Bin
00089         { L"CSIDL_STARTMENU", CSIDL_STARTMENU },                                                                // <user name>\Start Menu
00090         { L"CSIDL_MYDOCUMENTS", CSIDL_MYDOCUMENTS },                                                    // logical "My Documents" desktop icon
00091         { L"CSIDL_MYMUSIC", CSIDL_MYMUSIC },                                                                            // "My Music" folder
00092         { L"CSIDL_MYVIDEO", CSIDL_MYVIDEO },                                                                    // "My Videos" folder
00093         { L"CSIDL_DESKTOPDIRECTORY", CSIDL_DESKTOPDIRECTORY },                                  // <user name>\Desktop
00094         { L"CSIDL_DRIVES", CSIDL_DRIVES },                                                                              // My Computer
00095         { L"CSIDL_NETWORK", CSIDL_NETWORK },                                                                    // Network Neighborhood (My Network Places)
00096         { L"CSIDL_NETHOOD", CSIDL_NETHOOD },                                                                    // <user name>\nethood
00097         { L"CSIDL_FONTS", CSIDL_FONTS },                                                                                // windows\fonts
00098         { L"CSIDL_TEMPLATES", CSIDL_TEMPLATES },
00099         { L"CSIDL_COMMON_STARTMENU", CSIDL_COMMON_STARTMENU },                                  // All Users\Start Menu
00100         { L"CSIDL_COMMON_PROGRAMS", CSIDL_COMMON_PROGRAMS },                                    // All Users\Start Menu\Programs
00101         { L"CSIDL_COMMON_STARTUP", CSIDL_COMMON_STARTUP },                                              // All Users\Startup
00102         { L"CSIDL_COMMON_DESKTOPDIRECTORY", CSIDL_COMMON_DESKTOPDIRECTORY },    // All Users\Desktop
00103         { L"CSIDL_APPDATA", CSIDL_APPDATA },                                                                    // <user name>\Application Data
00104         { L"CSIDL_PRINTHOOD", CSIDL_PRINTHOOD },                                                                // <user name>\PrintHood
00105         { L"CSIDL_LOCAL_APPDATA", CSIDL_LOCAL_APPDATA },                                                // <user name>\Local Settings\Applicaiton Data (non roaming)
00106         { L"CSIDL_ALTSTARTUP", CSIDL_ALTSTARTUP },                                                              // non localized startup
00107         { L"CSIDL_COMMON_ALTSTARTUP", CSIDL_COMMON_ALTSTARTUP },                                // non localized common startup
00108         { L"CSIDL_COMMON_FAVORITES", CSIDL_COMMON_FAVORITES },
00109         { L"CSIDL_INTERNET_CACHE", CSIDL_INTERNET_CACHE },
00110         { L"CSIDL_COOKIES", CSIDL_COOKIES },
00111         { L"CSIDL_HISTORY", CSIDL_HISTORY },
00112         { L"CSIDL_COMMON_APPDATA", CSIDL_COMMON_APPDATA },                                              // All Users\Application Data
00113         { L"CSIDL_WINDOWS", CSIDL_WINDOWS },                                                                    // GetWindowsDirectory()
00114         { L"CSIDL_SYSTEM", CSIDL_SYSTEM },                                                                              // GetSystemDirectory()
00115         { L"CSIDL_PROGRAM_FILES", CSIDL_PROGRAM_FILES },                                                // C:\Program Files
00116         { L"CSIDL_MYPICTURES", CSIDL_MYPICTURES },                                                              // C:\Program Files\My Pictures
00117         { L"CSIDL_PROFILE", CSIDL_PROFILE },                                                                    // USERPROFILE
00118         { L"CSIDL_SYSTEMX86", CSIDL_SYSTEMX86 },                                                                // x86 system directory on RISC
00119         { L"CSIDL_PROGRAM_FILESX86", CSIDL_PROGRAM_FILESX86 },                                  // x86 C:\Program Files on RISC
00120         { L"CSIDL_PROGRAM_FILES_COMMON", CSIDL_PROGRAM_FILES_COMMON },                  // C:\Program Files\Common
00121         { L"CSIDL_PROGRAM_FILES_COMMONX86", CSIDL_PROGRAM_FILES_COMMONX86 },    // x86 Program Files\Common on RISC
00122         { L"CSIDL_COMMON_TEMPLATES", CSIDL_COMMON_TEMPLATES },                                  // All Users\Templates
00123         { L"CSIDL_COMMON_DOCUMENTS", CSIDL_COMMON_DOCUMENTS },                                  // All Users\Documents
00124         { L"CSIDL_COMMON_ADMINTOOLS", CSIDL_COMMON_ADMINTOOLS },                                // All Users\Start Menu\Programs\Administrative Tools
00125         { L"CSIDL_ADMINTOOLS", CSIDL_ADMINTOOLS },                                                              // <user name>\Start Menu\Programs\Administrative Tools
00126         { L"CSIDL_CONNECTIONS", CSIDL_CONNECTIONS },                                                    // Network and Dial-up Connections
00127         { L"CSIDL_COMMON_MUSIC", CSIDL_COMMON_MUSIC },                                                  // All Users\My Music
00128         { L"CSIDL_COMMON_PICTURES", CSIDL_COMMON_PICTURES },                                    // All Users\My Pictures
00129         { L"CSIDL_COMMON_VIDEO", CSIDL_COMMON_VIDEO },                                                  // All Users\My Video
00130         { L"CSIDL_RESOURCES", CSIDL_RESOURCES },                                                                // Resource Direcotry
00131         { L"CSIDL_RESOURCES_LOCALIZED", CSIDL_RESOURCES_LOCALIZED },                    // Localized Resource Direcotry
00132         { L"CSIDL_COMMON_OEM_LINKS", CSIDL_COMMON_OEM_LINKS },                                  // Links to All Users OEM specific apps
00133         { L"CSIDL_CDBURN_AREA", CSIDL_CDBURN_AREA },                                                    // USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
00134         { L"CSIDL_COMPUTERSNEARME", CSIDL_COMPUTERSNEARME },                                    // Computers Near Me (computered from Workgroup membership)
00135 };


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