[1/5] msi: Define common strings only once.

Hans Leidekker hans at codeweavers.com
Thu Oct 15 05:46:27 CDT 2009


---
 dlls/msi/action.c    |  162 +++++++++++++-------------------------------------
 dlls/msi/appsearch.c |   20 ++----
 dlls/msi/classes.c   |   13 ----
 dlls/msi/cond.y      |    1 -
 dlls/msi/custom.c    |   37 +++--------
 dlls/msi/database.c  |   11 +--
 dlls/msi/dialog.c    |   19 ++----
 dlls/msi/events.c    |    4 -
 dlls/msi/files.c     |   11 +---
 dlls/msi/helpers.c   |    8 +--
 dlls/msi/media.c     |    5 +-
 dlls/msi/msi.c       |   26 ++------
 dlls/msi/msipriv.h   |   44 ++++++++++++--
 dlls/msi/package.c   |   64 ++++++++------------
 dlls/msi/registry.c  |   10 +---
 dlls/msi/source.c    |   11 +---
 dlls/msi/string.c    |    3 +-
 dlls/msi/table.c     |    3 -
 dlls/msi/upgrade.c   |    7 +--
 19 files changed, 145 insertions(+), 314 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 46249c2..443cf19 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -62,13 +62,8 @@ static const WCHAR szCreateFolders[] =
     {'C','r','e','a','t','e','F','o','l','d','e','r','s',0};
 static const WCHAR szCostFinalize[] =
     {'C','o','s','t','F','i','n','a','l','i','z','e',0};
-const WCHAR szInstallFiles[] =
-    {'I','n','s','t','a','l','l','F','i','l','e','s',0};
-const WCHAR szDuplicateFiles[] =
-    {'D','u','p','l','i','c','a','t','e','F','i','l','e','s',0};
 static const WCHAR szWriteRegistryValues[] =
-    {'W','r','i','t','e','R','e','g','i','s','t','r','y',
-            'V','a','l','u','e','s',0};
+    {'W','r','i','t','e','R','e','g','i','s','t','r','y','V','a','l','u','e','s',0};
 static const WCHAR szCostInitialize[] =
     {'C','o','s','t','I','n','i','t','i','a','l','i','z','e',0};
 static const WCHAR szFileCost[] = 
@@ -82,12 +77,7 @@ static const WCHAR szLaunchConditions[] =
 static const WCHAR szProcessComponents[] = 
     {'P','r','o','c','e','s','s','C','o','m','p','o','n','e','n','t','s',0};
 static const WCHAR szRegisterTypeLibraries[] = 
-    {'R','e','g','i','s','t','e','r','T','y','p','e',
-            'L','i','b','r','a','r','i','e','s',0};
-const WCHAR szRegisterClassInfo[] = 
-    {'R','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0};
-const WCHAR szRegisterProgIdInfo[] = 
-    {'R','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0};
+    {'R','e','g','i','s','t','e','r','T','y','p','e','L','i','b','r','a','r','i','e','s',0};
 static const WCHAR szCreateShortcuts[] = 
     {'C','r','e','a','t','e','S','h','o','r','t','c','u','t','s',0};
 static const WCHAR szPublishProduct[] = 
@@ -103,8 +93,7 @@ static const WCHAR szRegisterProduct[] =
 static const WCHAR szInstallExecute[] = 
     {'I','n','s','t','a','l','l','E','x','e','c','u','t','e',0};
 static const WCHAR szInstallExecuteAgain[] = 
-    {'I','n','s','t','a','l','l','E','x','e','c','u','t','e',
-            'A','g','a','i','n',0};
+    {'I','n','s','t','a','l','l','E','x','e','c','u','t','e','A','g','a','i','n',0};
 static const WCHAR szInstallFinalize[] = 
     {'I','n','s','t','a','l','l','F','i','n','a','l','i','z','e',0};
 static const WCHAR szForceReboot[] = 
@@ -114,8 +103,7 @@ static const WCHAR szResolveSource[] =
 static const WCHAR szAppSearch[] = 
     {'A','p','p','S','e','a','r','c','h',0};
 static const WCHAR szAllocateRegistrySpace[] = 
-    {'A','l','l','o','c','a','t','e','R','e','g','i','s','t','r','y',
-            'S','p','a','c','e',0};
+    {'A','l','l','o','c','a','t','e','R','e','g','i','s','t','r','y','S','p','a','c','e',0};
 static const WCHAR szBindImage[] = 
     {'B','i','n','d','I','m','a','g','e',0};
 static const WCHAR szCCPSearch[] = 
@@ -126,58 +114,40 @@ static const WCHAR szDisableRollback[] =
     {'D','i','s','a','b','l','e','R','o','l','l','b','a','c','k',0};
 static const WCHAR szExecuteAction[] = 
     {'E','x','e','c','u','t','e','A','c','t','i','o','n',0};
-const WCHAR szFindRelatedProducts[] = 
-    {'F','i','n','d','R','e','l','a','t','e','d',
-            'P','r','o','d','u','c','t','s',0};
 static const WCHAR szInstallAdminPackage[] = 
-    {'I','n','s','t','a','l','l','A','d','m','i','n',
-            'P','a','c','k','a','g','e',0};
+    {'I','n','s','t','a','l','l','A','d','m','i','n','P','a','c','k','a','g','e',0};
 static const WCHAR szInstallSFPCatalogFile[] = 
-    {'I','n','s','t','a','l','l','S','F','P','C','a','t','a','l','o','g',
-            'F','i','l','e',0};
+    {'I','n','s','t','a','l','l','S','F','P','C','a','t','a','l','o','g','F','i','l','e',0};
 static const WCHAR szIsolateComponents[] = 
     {'I','s','o','l','a','t','e','C','o','m','p','o','n','e','n','t','s',0};
-const WCHAR szMigrateFeatureStates[] = 
-    {'M','i','g','r','a','t','e','F','e','a','t','u','r','e',
-            'S','t','a','t','e','s',0};
-const WCHAR szMoveFiles[] = 
+static const WCHAR szMigrateFeatureStates[] =
+    {'M','i','g','r','a','t','e','F','e','a','t','u','r','e','S','t','a','t','e','s',0};
+static const WCHAR szMoveFiles[] =
     {'M','o','v','e','F','i','l','e','s',0};
 static const WCHAR szMsiPublishAssemblies[] = 
-    {'M','s','i','P','u','b','l','i','s','h',
-            'A','s','s','e','m','b','l','i','e','s',0};
+    {'M','s','i','P','u','b','l','i','s','h','A','s','s','e','m','b','l','i','e','s',0};
 static const WCHAR szMsiUnpublishAssemblies[] = 
-    {'M','s','i','U','n','p','u','b','l','i','s','h',
-            'A','s','s','e','m','b','l','i','e','s',0};
+    {'M','s','i','U','n','p','u','b','l','i','s','h','A','s','s','e','m','b','l','i','e','s',0};
 static const WCHAR szInstallODBC[] = 
     {'I','n','s','t','a','l','l','O','D','B','C',0};
 static const WCHAR szInstallServices[] = 
     {'I','n','s','t','a','l','l','S','e','r','v','i','c','e','s',0};
-const WCHAR szPatchFiles[] = 
+static const WCHAR szPatchFiles[] =
     {'P','a','t','c','h','F','i','l','e','s',0};
 static const WCHAR szPublishComponents[] = 
     {'P','u','b','l','i','s','h','C','o','m','p','o','n','e','n','t','s',0};
 static const WCHAR szRegisterComPlus[] =
     {'R','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0};
-const WCHAR szRegisterExtensionInfo[] =
-    {'R','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n',
-            'I','n','f','o',0};
 static const WCHAR szRegisterFonts[] =
     {'R','e','g','i','s','t','e','r','F','o','n','t','s',0};
-const WCHAR szRegisterMIMEInfo[] =
-    {'R','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0};
 static const WCHAR szRegisterUser[] =
     {'R','e','g','i','s','t','e','r','U','s','e','r',0};
-const WCHAR szRemoveDuplicateFiles[] =
-    {'R','e','m','o','v','e','D','u','p','l','i','c','a','t','e',
-            'F','i','l','e','s',0};
+static const WCHAR szRemoveDuplicateFiles[] =
+    {'R','e','m','o','v','e','D','u','p','l','i','c','a','t','e','F','i','l','e','s',0};
 static const WCHAR szRemoveEnvironmentStrings[] =
-    {'R','e','m','o','v','e','E','n','v','i','r','o','n','m','e','n','t',
-            'S','t','r','i','n','g','s',0};
-const WCHAR szRemoveExistingProducts[] =
-    {'R','e','m','o','v','e','E','x','i','s','t','i','n','g',
-            'P','r','o','d','u','c','t','s',0};
-const WCHAR szRemoveFiles[] =
-    {'R','e','m','o','v','e','F','i','l','e','s',0};
+    {'R','e','m','o','v','e','E','n','v','i','r','o','n','m','e','n','t','S','t','r','i','n','g','s',0};
+static const WCHAR szRemoveExistingProducts[] =
+    {'R','e','m','o','v','e','E','x','i','s','t','i','n','g','P','r','o','d','u','c','t','s',0};
 static const WCHAR szRemoveFolders[] =
     {'R','e','m','o','v','e','F','o','l','d','e','r','s',0};
 static const WCHAR szRemoveIniValues[] =
@@ -185,8 +155,7 @@ static const WCHAR szRemoveIniValues[] =
 static const WCHAR szRemoveODBC[] =
     {'R','e','m','o','v','e','O','D','B','C',0};
 static const WCHAR szRemoveRegistryValues[] =
-    {'R','e','m','o','v','e','R','e','g','i','s','t','r','y',
-            'V','a','l','u','e','s',0};
+    {'R','e','m','o','v','e','R','e','g','i','s','t','r','y','V','a','l','u','e','s',0};
 static const WCHAR szRemoveShortcuts[] =
     {'R','e','m','o','v','e','S','h','o','r','t','c','u','t','s',0};
 static const WCHAR szRMCCPSearch[] =
@@ -202,33 +171,27 @@ static const WCHAR szStartServices[] =
 static const WCHAR szStopServices[] =
     {'S','t','o','p','S','e','r','v','i','c','e','s',0};
 static const WCHAR szUnpublishComponents[] =
-    {'U','n','p','u','b','l','i','s','h',
-            'C','o','m','p','o','n','e','n','t','s',0};
+    {'U','n','p','u','b','l','i','s','h', 'C','o','m','p','o','n','e','n','t','s',0};
 static const WCHAR szUnpublishFeatures[] =
     {'U','n','p','u','b','l','i','s','h','F','e','a','t','u','r','e','s',0};
-const WCHAR szUnregisterClassInfo[] =
-    {'U','n','r','e','g','i','s','t','e','r','C','l','a','s','s',
-            'I','n','f','o',0};
+static const WCHAR szUnregisterClassInfo[] =
+    {'U','n','r','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0};
 static const WCHAR szUnregisterComPlus[] =
     {'U','n','r','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0};
-const WCHAR szUnregisterExtensionInfo[] =
-    {'U','n','r','e','g','i','s','t','e','r',
-            'E','x','t','e','n','s','i','o','n','I','n','f','o',0};
+static const WCHAR szUnregisterExtensionInfo[] =
+    {'U','n','r','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0};
 static const WCHAR szUnregisterFonts[] =
     {'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0};
-const WCHAR szUnregisterMIMEInfo[] =
+static const WCHAR szUnregisterMIMEInfo[] =
     {'U','n','r','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0};
-const WCHAR szUnregisterProgIdInfo[] =
-    {'U','n','r','e','g','i','s','t','e','r','P','r','o','g','I','d',
-            'I','n','f','o',0};
+static const WCHAR szUnregisterProgIdInfo[] =
+    {'U','n','r','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0};
 static const WCHAR szUnregisterTypeLibraries[] =
-    {'U','n','r','e','g','i','s','t','e','r','T','y','p','e',
-            'L','i','b','r','a','r','i','e','s',0};
+    {'U','n','r','e','g','i','s','t','e','r','T','y','p','e','L','i','b','r','a','r','i','e','s',0};
 static const WCHAR szValidateProductID[] =
     {'V','a','l','i','d','a','t','e','P','r','o','d','u','c','t','I','D',0};
 static const WCHAR szWriteEnvironmentStrings[] =
-    {'W','r','i','t','e','E','n','v','i','r','o','n','m','e','n','t',
-            'S','t','r','i','n','g','s',0};
+    {'W','r','i','t','e','E','n','v','i','r','o','n','m','e','n','t','S','t','r','i','n','g','s',0};
 
 /* action handlers */
 typedef UINT (*STANDARDACTIONHANDLER)(MSIPACKAGE*);
@@ -401,8 +364,6 @@ static LPWSTR* msi_split_string( LPCWSTR str, WCHAR sep )
 
 static UINT msi_check_transform_applicable( MSIPACKAGE *package, IStorage *patch )
 {
-    static const WCHAR szProductCode[] =
-        { 'P','r','o','d','u','c','t','C','o','d','e',0 };
     static const WCHAR szSystemLanguageID[] =
         { 'S','y','s','t','e','m','L','a','n','g','u','a','g','e','I','D',0 };
 
@@ -416,7 +377,6 @@ static UINT msi_check_transform_applicable( MSIPACKAGE *package, IStorage *patch
 
     if ( strstrW( patch_product, prod_code ) )
     {
-        static const WCHAR zero[] = {'0',0};
         MSISUMMARYINFO *si;
         const WCHAR *p;
 
@@ -450,7 +410,7 @@ static UINT msi_check_transform_applicable( MSIPACKAGE *package, IStorage *patch
         }
 
         p = strchrW( template, ';' );
-        if (p && (!strcmpW( p + 1, langid ) || !strcmpW( p + 1, zero )))
+        if (p && (!strcmpW( p + 1, langid ) || !strcmpW( p + 1, szZero )))
         {
             TRACE("applicable transform\n");
             ret = ERROR_SUCCESS;
@@ -503,11 +463,10 @@ static UINT msi_apply_substorage_transform( MSIPACKAGE *package,
 
 UINT msi_check_patch_applicable( MSIPACKAGE *package, MSISUMMARYINFO *si )
 {
-    static const WCHAR szProdCode[] = { 'P','r','o','d','u','c','t','C','o','d','e',0 };
     LPWSTR guid_list, *guids, product_code;
     UINT i, ret = ERROR_FUNCTION_FAILED;
 
-    product_code = msi_dup_property( package, szProdCode );
+    product_code = msi_dup_property( package, szProductCode );
     if (!product_code)
     {
         /* FIXME: the property ProductCode should be written into the DB somewhere */
@@ -537,7 +496,6 @@ static UINT msi_set_media_source_prop(MSIPACKAGE *package)
     LPCWSTR prop;
     UINT r;
 
-    static const WCHAR szPatch[] = {'P','A','T','C','H',0};
     static const WCHAR query[] = {'S','E','L','E','C','T',' ',
         '`','S','o','u','r','c','e','`',' ','F','R','O','M',' ',
         '`','M','e','d','i','a','`',' ','W','H','E','R','E',' ',
@@ -642,7 +600,6 @@ static UINT msi_apply_patch_package( MSIPACKAGE *package, LPCWSTR file )
 /* get the PATCH property, and apply all the patches it specifies */
 static UINT msi_apply_patches( MSIPACKAGE *package )
 {
-    static const WCHAR szPatch[] = { 'P','A','T','C','H',0 };
     LPWSTR patch_list, *patches;
     UINT i, r = ERROR_SUCCESS;
 
@@ -760,9 +717,6 @@ static UINT msi_set_context(MSIPACKAGE *package)
     DWORD num;
     UINT r;
 
-    static const WCHAR szOne[] = {'1',0};
-    static const WCHAR szAllUsers[] = {'A','L','L','U','S','E','R','S',0};
-
     package->Context = MSIINSTALLCONTEXT_USERUNMANAGED;
 
     r = MSI_GetPropertyW(package, szAllUsers, val, &sz);
@@ -786,12 +740,8 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
 {
     UINT rc;
     BOOL ui = FALSE, ui_exists;
-    static const WCHAR szUILevel[] = {'U','I','L','e','v','e','l',0};
     static const WCHAR szAction[] = {'A','C','T','I','O','N',0};
     static const WCHAR szInstall[] = {'I','N','S','T','A','L','L',0};
-    static const WCHAR szReinstall[] = {'R','E','I','N','S','T','A','L','L',0};
-    static const WCHAR szInstalled[] = {'I','n','s','t','a','l','l','e','d',0};
-    static const WCHAR szAll[] = {'A','L','L',0};
 
     MSI_SetPropertyW(package, szAction, szInstall);
 
@@ -816,7 +766,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
             msi_free(dir);
             dir = msi_alloc(MAX_PATH*sizeof(WCHAR));
             GetCurrentDirectoryW(MAX_PATH, dir);
-            lstrcatW(dir, cszbs);
+            lstrcatW(dir, szBackSlash);
             file = szPackagePath;
         }
 
@@ -1650,7 +1600,6 @@ static UINT load_all_files(MSIPACKAGE *package)
 static UINT load_folder( MSIRECORD *row, LPVOID param )
 {
     MSIPACKAGE *package = param;
-    static const WCHAR szDot[] = { '.',0 };
     static WCHAR szEmpty[] = { 0 };
     LPWSTR p, tgt_short, tgt_long, src_short, src_long;
     MSIFOLDER *folder;
@@ -1748,7 +1697,6 @@ static UINT ACTION_CostInitialize(MSIPACKAGE *package)
 {
     static const WCHAR szCosting[] =
         {'C','o','s','t','i','n','g','C','o','m','p','l','e','t','e',0 };
-    static const WCHAR szZero[] = { '0', 0 };
 
     MSI_SetPropertyW(package, szCosting, szZero);
     MSI_SetPropertyW(package, cszRootDrive, c_colon);
@@ -1841,9 +1789,6 @@ static void ACTION_GetFeatureInstallStates(MSIPACKAGE *package)
 static BOOL process_state_property(MSIPACKAGE* package, int level,
                                    LPCWSTR property, INSTALLSTATE state)
 {
-    static const WCHAR all[]={'A','L','L',0};
-    static const WCHAR remove[] = {'R','E','M','O','V','E',0};
-    static const WCHAR reinstall[] = {'R','E','I','N','S','T','A','L','L',0};
     LPWSTR override;
     MSIFEATURE *feature;
 
@@ -1853,13 +1798,13 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
 
     LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
     {
-        if (lstrcmpW(property, remove) &&
+        if (lstrcmpW(property, szRemove) &&
             (feature->Level <= 0 || feature->Level > level))
             continue;
 
-        if (!strcmpW(property, reinstall)) state = feature->Installed;
+        if (!strcmpW(property, szReinstall)) state = feature->Installed;
 
-        if (strcmpiW(override,all)==0)
+        if (strcmpiW(override, szAll)==0)
             msi_feature_set_state(package, feature, state);
         else
         {
@@ -1898,10 +1843,6 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
         {'A','D','D','L','O','C','A','L',0};
     static const WCHAR szAddSource[] =
         {'A','D','D','S','O','U','R','C','E',0};
-    static const WCHAR szRemove[] =
-        {'R','E','M','O','V','E',0};
-    static const WCHAR szReinstall[] =
-        {'R','E','I','N','S','T','A','L','L',0};
     static const WCHAR szAdvertise[] =
         {'A','D','V','E','R','T','I','S','E',0};
     BOOL override = FALSE;
@@ -1972,13 +1913,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
         }
     }
     else
-    {
-        /* set the Preselected Property */
-        static const WCHAR szPreselected[] = {'P','r','e','s','e','l','e','c','t','e','d',0};
-        static const WCHAR szOne[] = { '1', 0 };
-
-        MSI_SetPropertyW(package,szPreselected,szOne);
-    }
+        MSI_SetPropertyW(package, szPreselected, szOne);
 
     /*
      * now we want to enable or disable components base on feature
@@ -2276,8 +2211,6 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
         {'I','N','S','T','A','L','L','L','E','V','E','L',0};
     static const WCHAR szOutOfDiskSpace[] =
         {'O','u','t','O','f','D','i','s','k','S','p','a','c','e',0};
-    static const WCHAR szOne[] = { '1', 0 };
-    static const WCHAR szZero[] = { '0', 0 };
     MSICOMPONENT *comp;
     UINT rc;
     MSIQUERY * view;
@@ -2528,8 +2461,7 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
     {
         case -1: 
             {
-                static const WCHAR szALLUSER[] = {'A','L','L','U','S','E','R','S',0};
-                LPWSTR all_users = msi_dup_property( package, szALLUSER );
+                LPWSTR all_users = msi_dup_property( package, szAllUsers );
                 if (all_users && all_users[0] == '1')
                 {
                     root_key = HKEY_LOCAL_MACHINE;
@@ -2584,7 +2516,6 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
         value_data = parse_value(package, value, &type, &size); 
     else
     {
-        static const WCHAR szEmpty[] = {0};
         value_data = (LPSTR)strdupW(szEmpty);
         size = sizeof(szEmpty);
         type = REG_SZ;
@@ -3486,9 +3417,6 @@ static UINT msi_publish_sourcelist(MSIPACKAGE *package, HKEY hkey)
     MSIMEDIADISK *disk;
     MSISOURCELISTINFO *info;
 
-    static const WCHAR szEmpty[] = {0};
-    static const WCHAR szSourceList[] = {'S','o','u','r','c','e','L','i','s','t',0};
-
     r = RegCreateKeyW(hkey, szSourceList, &source);
     if (r != ERROR_SUCCESS)
         return r;
@@ -3687,8 +3615,6 @@ static UINT msi_publish_patch(MSIPACKAGE *package, HKEY prodkey, HKEY hudkey)
     LONG res;
     UINT r = ERROR_FUNCTION_FAILED;
 
-    static const WCHAR szPatches[] = {'P','a','t','c','h','e','s',0};
-
     res = RegCreateKeyExW(prodkey, szPatches, 0, NULL, 0, KEY_ALL_ACCESS, NULL,
                           &patches, NULL);
     if (res != ERROR_SUCCESS)
@@ -4054,10 +3980,9 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
             size = strlenW(feature->Feature_Parent)*sizeof(WCHAR);
         if (!absent)
         {
-            static const WCHAR emptyW[] = {0};
             size += sizeof(WCHAR);
             RegSetValueExW(hkey,feature->Feature,0,REG_SZ,
-                           (LPBYTE)(feature->Feature_Parent ? feature->Feature_Parent : emptyW),size);
+                           (LPBYTE)(feature->Feature_Parent ? feature->Feature_Parent : szEmpty),size);
         }
         else
         {
@@ -4354,8 +4279,6 @@ static UINT msi_unpublish_product(MSIPACKAGE *package)
     BOOL full_uninstall = TRUE;
     MSIFEATURE *feature;
 
-    static const WCHAR szRemove[] = {'R','E','M','O','V','E',0};
-    static const WCHAR szAll[] = {'A','L','L',0};
     static const WCHAR szUpgradeCode[] =
         {'U','p','g','r','a','d','e','C','o','d','e',0};
 
@@ -5350,7 +5273,6 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
          'C','o','n','t','r','o','l','\\',
          'S','e','s','s','i','o','n',' ','M','a','n','a','g','e','r','\\',
          'E','n','v','i','r','o','n','m','e','n','t',0};
-    static const WCHAR semicolon[] = {';',0};
 
     name = MSI_RecordGetString(rec, 2);
     value = MSI_RecordGetString(rec, 3);
@@ -5436,7 +5358,7 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
             if (flags & ENV_MOD_PREFIX)
             {
                 lstrcpyW(newval, value);
-                lstrcatW(newval, semicolon);
+                lstrcatW(newval, szSemiColon);
                 ptr = newval + lstrlenW(value) + 1;
             }
 
@@ -5444,7 +5366,7 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
 
             if (flags & ENV_MOD_APPEND)
             {
-                lstrcatW(newval, semicolon);
+                lstrcatW(newval, szSemiColon);
                 lstrcatW(newval, value);
             }
         }
@@ -5697,8 +5619,6 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
     DWORD size;
     BOOL ret, wildcards;
 
-    static const WCHAR backslash[] = {'\\',0};
-
     comp = get_loaded_component(package, MSI_RecordGetString(rec, 2));
     if (!comp || !comp->Enabled ||
         !(comp->Action & (INSTALLSTATE_LOCAL | INSTALLSTATE_SOURCE)))
@@ -5736,7 +5656,7 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
 
         lstrcpyW(source, sourcedir);
         if (source[lstrlenW(source) - 1] != '\\')
-            lstrcatW(source, backslash);
+            lstrcatW(source, szBackSlash);
         lstrcatW(source, sourcename);
     }
 
@@ -5769,7 +5689,7 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
 
     lstrcpyW(dest, destdir);
     if (dest[lstrlenW(dest) - 1] != '\\')
-        lstrcatW(dest, backslash);
+        lstrcatW(dest, szBackSlash);
 
     if (destname)
         lstrcatW(dest, destname);
diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c
index 9cc1592..4ef4087 100644
--- a/dlls/msi/appsearch.c
+++ b/dlls/msi/appsearch.c
@@ -162,8 +162,6 @@ static LPWSTR app_search_file(LPWSTR path, MSISIGNATURE *sig)
     LPWSTR val = NULL;
     LPBYTE buffer;
 
-    static const WCHAR root[] = {'\\',0};
-
     if (!sig->File)
     {
         PathRemoveFileSpecW(path);
@@ -193,7 +191,7 @@ static LPWSTR app_search_file(LPWSTR path, MSISIGNATURE *sig)
     if (!GetFileVersionInfoW(path, 0, size, buffer))
         goto done;
 
-    if (!VerQueryValueW(buffer, root, (LPVOID)&info, &size) || !info)
+    if (!VerQueryValueW(buffer, szBackSlash, (LPVOID)&info, &size) || !info)
         goto done;
 
     if (sig->MinVersionLS || sig->MinVersionMS)
@@ -633,12 +631,11 @@ static UINT ACTION_FileVersionMatches(const MSISIGNATURE *sig, LPCWSTR filePath,
 
             if (buf)
             {
-                static const WCHAR rootW[] = { '\\',0 };
                 UINT versionLen;
                 LPVOID subBlock = NULL;
 
                 if (GetFileVersionInfoW(filePath, 0, size, buf))
-                    VerQueryValueW(buf, rootW, &subBlock, &versionLen);
+                    VerQueryValueW(buf, szBackSlash, &subBlock, &versionLen);
                 if (subBlock)
                 {
                     VS_FIXEDFILEINFO *info = subBlock;
@@ -742,8 +739,6 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
     WCHAR subpath[MAX_PATH];
     WCHAR *buf;
 
-    static const WCHAR dot[] = {'.',0};
-    static const WCHAR dotdot[] = {'.','.',0};
     static const WCHAR starDotStarW[] = { '*','.','*',0 };
 
     TRACE("Searching directory %s for file %s, depth %d\n", debugstr_w(dir),
@@ -792,8 +787,8 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
         if (hFind != INVALID_HANDLE_VALUE)
         {
             if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY &&
-                lstrcmpW(findData.cFileName, dot) &&
-                lstrcmpW(findData.cFileName, dotdot))
+                lstrcmpW(findData.cFileName, szDot) &&
+                lstrcmpW(findData.cFileName, szDotDot))
             {
                 lstrcpyW(subpath, dir);
                 PathAppendW(subpath, findData.cFileName);
@@ -804,8 +799,8 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
             while (rc == ERROR_SUCCESS && !*appValue &&
                    FindNextFileW(hFind, &findData) != 0)
             {
-                if (!lstrcmpW(findData.cFileName, dot) ||
-                    !lstrcmpW(findData.cFileName, dotdot))
+                if (!lstrcmpW(findData.cFileName, szDot) ||
+                    !lstrcmpW(findData.cFileName, szDotDot))
                     continue;
 
                 lstrcpyW(subpath, dir);
@@ -1079,7 +1074,6 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
     UINT r = ERROR_SUCCESS;
 
     static const WCHAR success[] = {'C','C','P','_','S','u','c','c','e','s','s',0};
-    static const WCHAR one[] = {'1',0};
 
     signature = MSI_RecordGetString(row, 1);
 
@@ -1089,7 +1083,7 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
     if (value)
     {
         TRACE("Found signature %s\n", debugstr_w(signature));
-        MSI_SetPropertyW(package, success, one);
+        MSI_SetPropertyW(package, success, szOne);
         msi_free(value);
         r = ERROR_NO_MORE_ITEMS;
     }
diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c
index 483d65c..6ca35b9 100644
--- a/dlls/msi/classes.c
+++ b/dlls/msi/classes.c
@@ -42,17 +42,6 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(msi);
 
-
-extern const WCHAR szRegisterClassInfo[];
-extern const WCHAR szRegisterProgIdInfo[];
-extern const WCHAR szRegisterExtensionInfo[];
-extern const WCHAR szRegisterMIMEInfo[];
-
-extern const WCHAR szUnregisterClassInfo[];
-extern const WCHAR szUnregisterExtensionInfo[];
-extern const WCHAR szUnregisterMIMEInfo[];
-extern const WCHAR szUnregisterProgIdInfo[];
-
 static MSIAPPID *load_appid( MSIPACKAGE* package, MSIRECORD *row )
 {
     LPCWSTR buffer;
@@ -798,7 +787,6 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
     static const WCHAR szProgID[] = { 'P','r','o','g','I','D',0 };
     static const WCHAR szVIProgID[] = { 'V','e','r','s','i','o','n','I','n','d','e','p','e','n','d','e','n','t','P','r','o','g','I','D',0 };
     static const WCHAR szAppID[] = { 'A','p','p','I','D',0 };
-    static const WCHAR szSpace[] = {' ',0};
     static const WCHAR szFileType_fmt[] = {'F','i','l','e','T','y','p','e','\\','%','s','\\','%','i',0};
     HKEY hkey,hkey2,hkey3;
     MSICLASS *cls;
@@ -1098,7 +1086,6 @@ static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid,
      strcpyW(command,advertise);
      if (verb->Argument)
      {
-         static const WCHAR szSpace[] = {' ',0};
          strcatW(command,szSpace);
          strcatW(command,verb->Argument);
      }
diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y
index 8831208..c2a1737 100644
--- a/dlls/msi/cond.y
+++ b/dlls/msi/cond.y
@@ -64,7 +64,6 @@ struct cond_str {
 static LPWSTR COND_GetString( const struct cond_str *str );
 static LPWSTR COND_GetLiteral( const struct cond_str *str );
 static int cond_lex( void *COND_lval, COND_input *info);
-static const WCHAR szEmpty[] = { 0 };
 
 static INT compare_int( INT a, INT operator, INT b );
 static INT compare_string( LPCWSTR a, INT operator, LPCWSTR b, BOOL convert );
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index 5ac9c1b..508bf6b 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -44,15 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
 static const WCHAR c_collen[] = {'C',':','\\',0};
 static const WCHAR cszTempFolder[]= {'T','e','m','p','F','o','l','d','e','r',0};
 
-
-static const WCHAR szActionData[] = {
-    'C','u','s','t','o','m','A','c','t','i','o','n','D','a','t','a',0
-};
-static const WCHAR ProdCode[] = {
-    'P','r','o','d','u','c','t','C','o','d','e',0
-};
-static const WCHAR UserSID[] = {'U','s','e','r','S','I','D',0};
-
 typedef struct tagMSIRUNNINGACTION
 {
     struct list entry;
@@ -172,17 +163,17 @@ static void set_deferred_action_props(MSIPACKAGE *package, LPWSTR deferred_data)
 
     end = strstrW(beg, sep);
     *end = '\0';
-    MSI_SetPropertyW(package, szActionData, beg);
+    MSI_SetPropertyW(package, szCustomActionData, beg);
     beg = end + 3;
 
     end = strstrW(beg, sep);
     *end = '\0';
-    MSI_SetPropertyW(package, UserSID, beg);
+    MSI_SetPropertyW(package, szUserSID, beg);
     beg = end + 3;
 
     end = strchrW(beg, ']');
     *end = '\0';
-    MSI_SetPropertyW(package, ProdCode, beg);
+    MSI_SetPropertyW(package, szProductCode, beg);
 }
 
 UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL execute)
@@ -241,8 +232,8 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
         if (!execute)
         {
             LPWSTR actiondata = msi_dup_property(package, action);
-            LPWSTR usersid = msi_dup_property(package, UserSID);
-            LPWSTR prodcode = msi_dup_property(package, ProdCode);
+            LPWSTR usersid = msi_dup_property(package, szUserSID);
+            LPWSTR prodcode = msi_dup_property(package, szProductCode);
             LPWSTR deferred = msi_get_deferred_action(action, actiondata, usersid, prodcode);
 
             if (type & msidbCustomActionTypeCommit)
@@ -265,8 +256,6 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
         }
         else
         {
-            static const WCHAR szBlank[] = {0};
-
             LPWSTR actiondata = msi_dup_property( package, action );
 
             switch (script)
@@ -287,9 +276,9 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
             if (deferred_data)
                 set_deferred_action_props(package, deferred_data);
             else if (actiondata)
-                MSI_SetPropertyW(package,szActionData,actiondata);
+                MSI_SetPropertyW(package, szCustomActionData, actiondata);
             else
-                MSI_SetPropertyW(package,szActionData,szBlank);
+                MSI_SetPropertyW(package, szCustomActionData, szEmpty);
 
             msi_free(actiondata);
         }
@@ -383,7 +372,6 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source,
     MSIRECORD *row = 0;
     HANDLE file;
     CHAR buffer[1024];
-    static const WCHAR f1[] = {'m','s','i',0};
     WCHAR fmt[MAX_PATH];
     DWORD sz = MAX_PATH;
     UINT r;
@@ -391,7 +379,7 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source,
     if (MSI_GetPropertyW(package, cszTempFolder, fmt, &sz) != ERROR_SUCCESS)
         GetTempPathW(MAX_PATH, fmt);
 
-    if (GetTempFileNameW(fmt, f1, 0, tmp_file) == 0)
+    if (GetTempFileNameW(fmt, szMsi, 0, tmp_file) == 0)
     {
         TRACE("Unable to create file\n");
         return ERROR_FUNCTION_FAILED;
@@ -853,11 +841,9 @@ static UINT HANDLE_CustomType23(MSIPACKAGE *package, LPCWSTR source,
     DWORD size;
     UINT r;
 
-    static const WCHAR backslash[] = {'\\',0};
-
     size = MAX_PATH;
     MSI_GetPropertyW(package, cszSourceDir, package_path, &size);
-    lstrcatW(package_path, backslash);
+    lstrcatW(package_path, szBackSlash);
     lstrcatW(package_path, source);
 
     TRACE("Installing package %s concurrently\n", debugstr_w(package_path));
@@ -884,10 +870,7 @@ static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source,
           debugstr_w(tmp_file));
 
     if (!strchrW(tmp_file,'.'))
-    {
-        static const WCHAR dot[]={'.',0};
-        strcatW(tmp_file,dot);
-    }
+        strcatW(tmp_file, szDot);
 
     info = do_msidbCustomActionTypeDll( package, type, tmp_file, target, action );
 
diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index 173657e..4db7c01 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -78,7 +78,6 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
     BOOL created = FALSE;
     WCHAR path[MAX_PATH];
 
-    static const WCHAR backslash[] = {'\\',0};
     static const WCHAR szTables[]  = { '_','T','a','b','l','e','s',0 };
 
     TRACE("%s %s\n",debugstr_w(szDBPath),debugstr_w(szPersist) );
@@ -177,7 +176,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
     if (!strchrW( save_path, '\\' ))
     {
         GetCurrentDirectoryW( MAX_PATH, path );
-        lstrcatW( path, backslash );
+        lstrcatW( path, szBackSlash );
         lstrcatW( path, save_path );
     }
     else
@@ -656,7 +655,6 @@ static UINT MSI_DatabaseImport(MSIDATABASE *db, LPCWSTR folder, LPCWSTR file)
     LPWSTR **records = NULL;
     LPWSTR **temp_records;
 
-    static const WCHAR backslash[] = {'\\',0};
     static const WCHAR suminfo[] =
         {'_','S','u','m','m','a','r','y','I','n','f','o','r','m','a','t','i','o','n',0};
 
@@ -665,13 +663,13 @@ static UINT MSI_DatabaseImport(MSIDATABASE *db, LPCWSTR folder, LPCWSTR file)
     if( folder == NULL || file == NULL )
         return ERROR_INVALID_PARAMETER;
 
-    len = lstrlenW(folder) + lstrlenW(backslash) + lstrlenW(file) + 1;
+    len = lstrlenW(folder) + lstrlenW(szBackSlash) + lstrlenW(file) + 1;
     path = msi_alloc( len * sizeof(WCHAR) );
     if (!path)
         return ERROR_OUTOFMEMORY;
 
     lstrcpyW( path, folder );
-    lstrcatW( path, backslash );
+    lstrcatW( path, szBackSlash );
     lstrcatW( path, file );
 
     data = msi_read_text_archive( path );
@@ -878,7 +876,6 @@ static UINT MSI_DatabaseExport( MSIDATABASE *db, LPCWSTR table,
 {
     static const WCHAR query[] = {
         's','e','l','e','c','t',' ','*',' ','f','r','o','m',' ','%','s',0 };
-    static const WCHAR szbs[] = { '\\', 0 };
     static const WCHAR forcecodepage[] = {
         '_','F','o','r','c','e','C','o','d','e','p','a','g','e',0 };
     MSIRECORD *rec = NULL;
@@ -899,7 +896,7 @@ static UINT MSI_DatabaseExport( MSIDATABASE *db, LPCWSTR table,
         return ERROR_OUTOFMEMORY;
 
     lstrcpyW( filename, folder );
-    lstrcatW( filename, szbs );
+    lstrcatW( filename, szBackSlash );
     lstrcatW( filename, file );
 
     handle = CreateFileW( filename, GENERIC_READ | GENERIC_WRITE, 0,
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 88416e3..3f1b571 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -495,7 +495,6 @@ static LPWSTR msi_create_tmp_path(void)
 {
     WCHAR tmp[MAX_PATH];
     LPWSTR path = NULL;
-    static const WCHAR prefix[] = { 'm','s','i',0 };
     DWORD len, r;
 
     r = GetTempPathW( MAX_PATH, tmp );
@@ -505,7 +504,7 @@ static LPWSTR msi_create_tmp_path(void)
     path = msi_alloc( len * sizeof (WCHAR) );
     if( path )
     {
-        r = GetTempFileNameW( tmp, prefix, 0, path );
+        r = GetTempFileNameW( tmp, szMsi, 0, path );
         if (!r)
         {
             msi_free( path );
@@ -588,8 +587,6 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
     LPCWSTR font_text, text = NULL;
     LPWSTR font;
 
-    static const WCHAR empty[] = {0};
-
     ctrl = msi_dialog_find_control( dialog, control );
     if (!ctrl)
         return;
@@ -597,7 +594,7 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
     {
         font_text = MSI_RecordGetString( rec , 1 );
         font = msi_dialog_get_style( font_text, &text );
-        if (!text) text = empty;
+        if (!text) text = szEmpty;
         SetWindowTextW( ctrl->hwnd, text );
         msi_free( font );
         msi_dialog_check_messages( NULL );
@@ -2390,8 +2387,6 @@ static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *c
     HANDLE file;
 
     static const WCHAR asterisk[] = {'*',0};
-    static const WCHAR dot[] = {'.',0};
-    static const WCHAR dotdot[] = {'.','.',0};
 
     if (!control && !(control = msi_dialog_find_control_by_type( dialog, szDirectoryList )))
         return;
@@ -2415,7 +2410,7 @@ static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *c
         if ( wfd.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY )
             continue;
 
-        if ( !lstrcmpW( wfd.cFileName, dot ) || !lstrcmpW( wfd.cFileName, dotdot ) )
+        if ( !lstrcmpW( wfd.cFileName, szDot ) || !lstrcmpW( wfd.cFileName, szDotDot ) )
             continue;
 
         item.mask = LVIF_TEXT;
@@ -2471,8 +2466,6 @@ static UINT msi_dialog_dirlist_handler( msi_dialog *dialog,
     LVITEMW item;
     int index;
 
-    static const WCHAR backslash[] = {'\\',0};
-
     if (nmhdr->code != LVN_ITEMACTIVATE)
         return ERROR_SUCCESS;
 
@@ -2494,7 +2487,7 @@ static UINT msi_dialog_dirlist_handler( msi_dialog *dialog,
 
     lstrcpyW( new_path, path );
     lstrcatW( new_path, text );
-    lstrcatW( new_path, backslash );
+    lstrcatW( new_path, szBackSlash );
 
     MSI_SetPropertyW( dialog->package, prop, new_path );
 
@@ -2564,7 +2557,6 @@ static void msi_dialog_vcl_add_columns( msi_dialog *dialog, msi_control *control
     LVCOLUMNW lvc;
     DWORD count = 0;
 
-    static const WCHAR zero[] = {'0',0};
     static const WCHAR negative[] = {'-',0};
 
     if (!text) return;
@@ -2582,7 +2574,7 @@ static void msi_dialog_vcl_add_columns( msi_dialog *dialog, msi_control *control
         begin += end - begin + 1;
 
         /* empty braces or '0' hides the column */ 
-        if ( !num[0] || !lstrcmpW( num, zero ) )
+        if ( !num[0] || !lstrcmpW( num, szZero ) )
         {
             count++;
             msi_free( num );
@@ -3760,7 +3752,6 @@ UINT msi_spawn_error_dialog( MSIPACKAGE *package, LPWSTR error_dialog, LPWSTR er
     DWORD size = MAX_PATH;
     int res;
 
-    static const WCHAR szUILevel[] = {'U','I','L','e','v','e','l',0};
     static const WCHAR pn_prop[] = {'P','r','o','d','u','c','t','N','a','m','e',0};
     static const WCHAR title_fmt[] = {'%','s',' ','W','a','r','n','i','n','g',0};
     static const WCHAR error_abort[] = {'E','r','r','o','r','A','b','o','r','t',0};
diff --git a/dlls/msi/events.c b/dlls/msi/events.c
index a89d689..6275a95 100644
--- a/dlls/msi/events.c
+++ b/dlls/msi/events.c
@@ -170,7 +170,6 @@ static UINT ControlEvent_DoAction(MSIPACKAGE* package, LPCWSTR argument,
 static UINT ControlEvent_AddLocal(MSIPACKAGE* package, LPCWSTR argument, 
                                   msi_dialog* dialog)
 {
-    static const WCHAR szAll[] = {'A','L','L',0};
     MSIFEATURE *feature = NULL;
 
     if (lstrcmpW(szAll,argument))
@@ -190,7 +189,6 @@ static UINT ControlEvent_AddLocal(MSIPACKAGE* package, LPCWSTR argument,
 static UINT ControlEvent_Remove(MSIPACKAGE* package, LPCWSTR argument, 
                                 msi_dialog* dialog)
 {
-    static const WCHAR szAll[] = {'A','L','L',0};
     MSIFEATURE *feature = NULL;
 
     if (lstrcmpW(szAll,argument))
@@ -210,7 +208,6 @@ static UINT ControlEvent_Remove(MSIPACKAGE* package, LPCWSTR argument,
 static UINT ControlEvent_AddSource(MSIPACKAGE* package, LPCWSTR argument, 
                                    msi_dialog* dialog)
 {
-    static const WCHAR szAll[] = {'A','L','L',0};
     MSIFEATURE *feature = NULL;
 
     if (lstrcmpW(szAll,argument))
@@ -383,7 +380,6 @@ static UINT ControlEvent_DirectoryListUp(MSIPACKAGE *package, LPCWSTR argument,
 static UINT ControlEvent_ReinstallMode(MSIPACKAGE *package, LPCWSTR argument,
                                        msi_dialog *dialog)
 {
-    static const WCHAR szReinstallMode[] = {'R','E','I','N','S','T','A','L','L','M','O','D','E',0};
     return MSI_SetPropertyW( package, szReinstallMode, argument );
 }
 
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index d9cc0ff..d9470df 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -47,13 +47,6 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(msi);
 
-extern const WCHAR szInstallFiles[];
-extern const WCHAR szDuplicateFiles[];
-extern const WCHAR szMoveFiles[];
-extern const WCHAR szPatchFiles[];
-extern const WCHAR szRemoveDuplicateFiles[];
-extern const WCHAR szRemoveFiles[];
-
 static void msi_file_update_ui( MSIPACKAGE *package, MSIFILE *f, const WCHAR *action )
 {
     MSIRECORD *uirow;
@@ -164,14 +157,12 @@ static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
     }
     if (gle == ERROR_SHARING_VIOLATION)
     {
-        static const WCHAR msiW[] = {'m','s','i',0};
-        static const WCHAR slashW[] = {'\\',0};
         WCHAR tmpfileW[MAX_PATH], *pathW, *p;
         DWORD len;
 
         TRACE("file in use, scheduling rename operation\n");
 
-        GetTempFileNameW(slashW, msiW, 0, tmpfileW);
+        GetTempFileNameW(szBackSlash, szMsi, 0, tmpfileW);
         len = strlenW(file->TargetPath) + strlenW(tmpfileW) + 1;
         if (!(pathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
             return ERROR_OUTOFMEMORY;
diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c
index 5cfb4af..8356923 100644
--- a/dlls/msi/helpers.c
+++ b/dlls/msi/helpers.c
@@ -37,12 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
 static const WCHAR cszTargetDir[] = {'T','A','R','G','E','T','D','I','R',0};
 static const WCHAR cszDatabase[]={'D','A','T','A','B','A','S','E',0};
 
-const WCHAR cszSourceDir[] = {'S','o','u','r','c','e','D','i','r',0};
-const WCHAR cszSOURCEDIR[] = {'S','O','U','R','C','E','D','I','R',0};
-const WCHAR cszRootDrive[] = {'R','O','O','T','D','R','I','V','E',0};
-const WCHAR cszbs[]={'\\',0};
-const WCHAR szLocalSid[] = {'S','-','1','-','5','-','1','8',0};
-
 LPWSTR build_icon_path(MSIPACKAGE *package, LPCWSTR icon_name )
 {
     LPWSTR SystemFolder, dest, FilePath;
@@ -724,7 +718,7 @@ LPWSTR build_directory_name(DWORD count, ...)
             continue;
         strcatW(dir, str);
         if( ((i+1)!=count) && dir[strlenW(dir)-1]!='\\')
-            strcatW(dir, cszbs);
+            strcatW(dir, szBackSlash);
     }
     return dir;
 }
diff --git a/dlls/msi/media.c b/dlls/msi/media.c
index 83f4698..06f14e0 100644
--- a/dlls/msi/media.c
+++ b/dlls/msi/media.c
@@ -75,7 +75,6 @@ static UINT msi_change_media(MSIPACKAGE *package, MSIMEDIAINFO *mi)
     LPWSTR source_dir;
     UINT r = ERROR_SUCCESS;
 
-    static const WCHAR szUILevel[] = {'U','I','L','e','v','e','l',0};
     static const WCHAR error_prop[] = {'E','r','r','o','r','D','i','a','l','o','g',0};
 
     if ((msi_get_property_int(package, szUILevel, 0) & INSTALLUILEVEL_MASK) ==
@@ -356,14 +355,12 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
         }
         if (err == ERROR_SHARING_VIOLATION)
         {
-            static const WCHAR msiW[] = {'m','s','i',0};
-            static const WCHAR slashW[] = {'\\',0};
             WCHAR tmpfileW[MAX_PATH], *tmppathW, *p;
             DWORD len;
 
             TRACE("file in use, scheduling rename operation\n");
 
-            GetTempFileNameW(slashW, msiW, 0, tmpfileW);
+            GetTempFileNameW(szBackSlash, szMsi, 0, tmpfileW);
             len = strlenW(path) + strlenW(tmpfileW) + 1;
             if (!(tmppathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
                 return ERROR_OUTOFMEMORY;
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index 2a66d60..14f8f13 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -264,8 +264,6 @@ UINT WINAPI MsiReinstallProductA(LPCSTR szProduct, DWORD dwReinstallMode)
 
 UINT WINAPI MsiReinstallProductW(LPCWSTR szProduct, DWORD dwReinstallMode)
 {
-    static const WCHAR szAll[] = {'A','L','L',0};
-
     TRACE("%s %08x\n", debugstr_w(szProduct), dwReinstallMode);
 
     return MsiReinstallFeatureW(szProduct, szAll, dwReinstallMode);
@@ -311,7 +309,6 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
     LPWSTR beg, end;
     LPWSTR cmd = NULL, codes = NULL;
 
-    static const WCHAR space[] = {' ',0};
     static const WCHAR patcheq[] = {'P','A','T','C','H','=',0};
     static WCHAR empty[] = {0};
 
@@ -361,7 +358,7 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
     }
 
     lstrcpyW(cmd, cmd_ptr);
-    if (szCommandLine) lstrcatW(cmd, space);
+    if (szCommandLine) lstrcatW(cmd, szSpace);
     lstrcatW(cmd, patcheq);
     lstrcatW(cmd, szPatchPackage);
 
@@ -1216,9 +1213,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
     DWORD type;
     UINT r = ERROR_UNKNOWN_PRODUCT;
 
-    static const WCHAR one[] = {'1',0};
     static const WCHAR five[] = {'5',0};
-    static const WCHAR empty[] = {0};
     static const WCHAR displayname[] = {
         'D','i','s','p','l','a','y','N','a','m','e',0};
     static const WCHAR displayversion[] = {
@@ -1315,7 +1310,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
 
         val = msi_reg_get_value(props, szProperty, &type);
         if (!val)
-            val = strdupW(empty);
+            val = strdupW(szEmpty);
 
         r = msi_copy_outval(val, szValue, pcchValue);
     }
@@ -1340,7 +1335,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
 
         val = msi_reg_get_value(hkey, szProperty, &type);
         if (!val)
-            val = strdupW(empty);
+            val = strdupW(szEmpty);
 
         r = msi_copy_outval(val, szValue, pcchValue);
     }
@@ -1358,7 +1353,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
                 val = strdupW(five);
             }
             else
-                val = strdupW(one);
+                val = strdupW(szOne);
 
             r = msi_copy_outval(val, szValue, pcchValue);
             goto done;
@@ -1372,7 +1367,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
         }
 
         if (prod || managed)
-            val = strdupW(one);
+            val = strdupW(szOne);
         else
             goto done;
 
@@ -1384,7 +1379,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
             goto done;
 
         /* FIXME */
-        val = strdupW(empty);
+        val = strdupW(szEmpty);
         r = msi_copy_outval(val, szValue, pcchValue);
     }
     else
@@ -1482,9 +1477,6 @@ UINT WINAPI MsiGetPatchInfoExW(LPCWSTR szPatchCode, LPCWSTR szProductCode,
     DWORD len;
     LONG res;
 
-    static const WCHAR szEmpty[] = {0};
-    static const WCHAR szPatches[] = {'P','a','t','c','h','e','s',0};
-    static const WCHAR szInstalled[] = {'I','n','s','t','a','l','l','e','d',0};
     static const WCHAR szManagedPackage[] = {'M','a','n','a','g','e','d',
         'L','o','c','a','l','P','a','c','k','a','g','e',0};
 
@@ -2971,8 +2963,6 @@ static USERINFOSTATE MSI_GetUserInfo(LPCWSTR szProduct,
     LPCWSTR orgptr;
     UINT r;
 
-    static const WCHAR szEmpty[] = {0};
-
     TRACE("%s %p %p %p %p %p %p\n", debugstr_w(szProduct), lpUserNameBuf,
           pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
           pcchSerialBuf);
@@ -3385,10 +3375,6 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature,
     WCHAR filename[MAX_PATH];
     static const WCHAR szLogVerbose[] = {
         ' ','L','O','G','V','E','R','B','O','S','E',0 };
-    static const WCHAR szInstalled[] = { 'I','n','s','t','a','l','l','e','d',0};
-    static const WCHAR szReinstall[] = {'R','E','I','N','S','T','A','L','L',0};
-    static const WCHAR szReinstallMode[] = {'R','E','I','N','S','T','A','L','L','M','O','D','E',0};
-    static const WCHAR szOne[] = {'1',0};
     WCHAR reinstallmode[11];
     LPWSTR ptr;
     DWORD sz;
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 71c3b69..296e87d 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -1029,12 +1029,44 @@ extern DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR f
 extern void ui_progress(MSIPACKAGE *, int, int, int, int);
 extern void ui_actiondata(MSIPACKAGE *, LPCWSTR, MSIRECORD *);
 
-/* string consts use a number of places  and defined in helpers.c*/
-extern const WCHAR cszSourceDir[];
-extern const WCHAR cszSOURCEDIR[];
-extern const WCHAR cszRootDrive[];
-extern const WCHAR cszbs[];
-extern const WCHAR szLocalSid[];
+/* common strings */
+static const WCHAR cszSourceDir[] = {'S','o','u','r','c','e','D','i','r',0};
+static const WCHAR cszSOURCEDIR[] = {'S','O','U','R','C','E','D','I','R',0};
+static const WCHAR cszRootDrive[] = {'R','O','O','T','D','R','I','V','E',0};
+static const WCHAR szLocalSid[] = {'S','-','1','-','5','-','1','8',0};
+static const WCHAR szEmpty[] = {0};
+static const WCHAR szAll[] = {'A','L','L',0};
+static const WCHAR szOne[] = {'1',0};
+static const WCHAR szZero[] = {'0',0};
+static const WCHAR szSpace[] = {' ',0};
+static const WCHAR szBackSlash[] = {'\\',0};
+static const WCHAR szForwardSlash[] = {'/',0};
+static const WCHAR szDot[] = {'.',0};
+static const WCHAR szDotDot[] = {'.','.',0};
+static const WCHAR szSemiColon[] = {';',0};
+static const WCHAR szPreselected[] = {'P','r','e','s','e','l','e','c','t','e','d',0};
+static const WCHAR szPatches[] = {'P','a','t','c','h','e','s',0};
+static const WCHAR szState[] = {'S','t','a','t','e',0};
+static const WCHAR szMsi[] = {'m','s','i',0};
+static const WCHAR szPatch[] = {'P','A','T','C','H',0};
+static const WCHAR szSourceList[] = {'S','o','u','r','c','e','L','i','s','t',0};
+static const WCHAR szInstalled[] = {'I','n','s','t','a','l','l','e','d',0};
+static const WCHAR szReinstall[] = {'R','E','I','N','S','T','A','L','L',0};
+static const WCHAR szReinstallMode[] = {'R','E','I','N','S','T','A','L','L','M','O','D','E',0};
+static const WCHAR szRemove[] = {'R','E','M','O','V','E',0};
+static const WCHAR szUserSID[] = {'U','s','e','r','S','I','D',0};
+static const WCHAR szProductCode[] = {'P','r','o','d','u','c','t','C','o','d','e',0};
+static const WCHAR szRegisterClassInfo[] = {'R','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0};
+static const WCHAR szRegisterProgIdInfo[] = {'R','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0};
+static const WCHAR szRegisterExtensionInfo[] = {'R','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0};
+static const WCHAR szRegisterMIMEInfo[] = {'R','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0};
+static const WCHAR szDuplicateFiles[] = {'D','u','p','l','i','c','a','t','e','F','i','l','e','s',0};
+static const WCHAR szInstallFiles[] = {'I','n','s','t','a','l','l','F','i','l','e','s',0};
+static const WCHAR szRemoveFiles[] = {'R','e','m','o','v','e','F','i','l','e','s',0};
+static const WCHAR szFindRelatedProducts[] = {'F','i','n','d','R','e','l','a','t','e','d','P','r','o','d','u','c','t','s',0};
+static const WCHAR szAllUsers[] = {'A','L','L','U','S','E','R','S',0};
+static const WCHAR szCustomActionData[] = {'C','u','s','t','o','m','A','c','t','i','o','n','D','a','t','a',0};
+static const WCHAR szUILevel[] = {'U','I','L','e','v','e','l',0};
 
 /* memory allocation macro functions */
 static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index f74bf05..06e3416 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -150,9 +150,6 @@ UINT msi_clone_properties(MSIPACKAGE *package)
  */
 static UINT set_installed_prop( MSIPACKAGE *package )
 {
-    static const WCHAR szInstalled[] = {
-        'I','n','s','t','a','l','l','e','d',0 };
-    WCHAR val[2] = { '1', 0 };
     HKEY hkey = 0;
     UINT r;
 
@@ -160,7 +157,7 @@ static UINT set_installed_prop( MSIPACKAGE *package )
     if (r == ERROR_SUCCESS)
     {
         RegCloseKey( hkey );
-        MSI_SetPropertyW( package, szInstalled, val );
+        MSI_SetPropertyW( package, szInstalled, szOne );
     }
 
     return r;
@@ -175,8 +172,6 @@ static UINT set_user_sid_prop( MSIPACKAGE *package )
     PSID psid = NULL;
     UINT r = ERROR_FUNCTION_FAILED;
 
-    static const WCHAR user_sid[] = {'U','s','e','r','S','I','D',0};
-
     size = 0;
     GetUserNameW( NULL, &size );
 
@@ -205,7 +200,7 @@ static UINT set_user_sid_prop( MSIPACKAGE *package )
     if (!ConvertSidToStringSidW( psid, &sid_str ))
         goto done;
 
-    r = MSI_SetPropertyW( package, user_sid, sid_str );
+    r = MSI_SetPropertyW( package, szUserSID, sid_str );
 
 done:
     LocalFree( sid_str );
@@ -226,7 +221,6 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package)
     WCHAR name[MAX_PATH];
     WCHAR windir[MAX_PATH];
 
-    static const WCHAR backslash[] = {'\\',0};
     static const WCHAR fusion[] = {'f','u','s','i','o','n','.','d','l','l',0};
     static const WCHAR sub[] = {
         'S','o','f','t','w','a','r','e','\\',
@@ -265,10 +259,10 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package)
             }
 
             lstrcpyW(check, windir);
-            lstrcatW(check, backslash);
+            lstrcatW(check, szBackSlash);
             lstrcatW(check, subdir);
             lstrcatW(check, name);
-            lstrcatW(check, backslash);
+            lstrcatW(check, szBackSlash);
             lstrcatW(check, fusion);
 
             if(GetFileAttributesW(check) != INVALID_FILE_ATTRIBUTES)
@@ -360,7 +354,6 @@ static VOID set_installer_properties(MSIPACKAGE *package)
     SYSTEMTIME systemtime;
     LANGID langid;
 
-    static const WCHAR cszbs[]={'\\',0};
     static const WCHAR CFF[] = 
 {'C','o','m','m','o','n','F','i','l','e','s','F','o','l','d','e','r',0};
     static const WCHAR PFF[] = 
@@ -407,8 +400,6 @@ static VOID set_installer_properties(MSIPACKAGE *package)
 {'A','d','m','i','n','U','s','e','r',0};
     static const WCHAR szPriv[] =
 {'P','r','i','v','i','l','e','g','e','d',0};
-    static const WCHAR szOne[] =
-{'1',0};
     static const WCHAR v9x[] = { 'V','e','r','s','i','o','n','9','X',0 };
     static const WCHAR vNT[] = { 'V','e','r','s','i','o','n','N','T',0 };
     static const WCHAR szMsiNTProductType[] = { 'M','s','i','N','T','P','r','o','d','u','c','t','T','y','p','e',0 };
@@ -465,76 +456,76 @@ static VOID set_installer_properties(MSIPACKAGE *package)
      */
 
     SHGetFolderPathW(NULL,CSIDL_PROGRAM_FILES_COMMON,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, CFF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_PROGRAM_FILES,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, PFF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_COMMON_APPDATA,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, CADF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_FAVORITES,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, FaF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_FONTS,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, FoF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_SENDTO,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, SendTF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_STARTMENU,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, SMF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_STARTUP,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, StF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_TEMPLATES,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, TemplF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_DESKTOP,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, DF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_PROGRAMS,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, PMF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_ADMINTOOLS,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, ATF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_APPDATA,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, ADF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_SYSTEM,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, SF, pth);
     MSI_SetPropertyW(package, SF16, pth);
 
     SHGetFolderPathW(NULL,CSIDL_LOCAL_APPDATA,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, LADF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_MYPICTURES,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, MPF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_PERSONAL,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, PF, pth);
 
     SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
-    strcatW(pth,cszbs);
+    strcatW(pth, szBackSlash);
     MSI_SetPropertyW(package, WF, pth);
     
     /* Physical Memory is specified in MB. Using total amount. */
@@ -788,8 +779,6 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
 {
     static const WCHAR szLevel[] = { 'U','I','L','e','v','e','l',0 };
     static const WCHAR szpi[] = {'%','i',0};
-    static const WCHAR szProductCode[] = {
-        'P','r','o','d','u','c','t','C','o','d','e',0};
     MSIPACKAGE *package;
     WCHAR uilevel[10];
     UINT r;
@@ -843,10 +832,9 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
 static LPCWSTR copy_package_to_temp( LPCWSTR szPackage, LPWSTR filename )
 {
     WCHAR path[MAX_PATH];
-    static const WCHAR szMSI[] = {'m','s','i',0};
 
     GetTempPathW( MAX_PATH, path );
-    GetTempFileNameW( path, szMSI, 0, filename );
+    GetTempFileNameW( path, szMsi, 0, filename );
 
     if( !CopyFileW( szPackage, filename, FALSE ) )
     {
@@ -1148,7 +1136,6 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
             LPWSTR tmp;
             WCHAR number[3];
             static const WCHAR format[] = { '%','i',':',' ',0};
-            static const WCHAR space[] = { ' ',0};
             sz = 0;
             MSI_RecordGetStringW(record,i,NULL,&sz);
             sz+=4;
@@ -1165,7 +1152,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
             }
             strcatW(message,tmp);
             if (msg_field > 1)
-                strcatW(message,space);
+                strcatW(message, szSpace);
 
             msi_free(tmp);
         }
@@ -1526,7 +1513,6 @@ int msi_get_property_int(MSIPACKAGE *package, LPCWSTR prop, int def)
 static UINT MSI_GetProperty( MSIHANDLE handle, LPCWSTR name,
                              awstring *szValueBuf, LPDWORD pchValueBuf )
 {
-    static const WCHAR empty[] = {0};
     MSIPACKAGE *package;
     MSIRECORD *row = NULL;
     UINT r = ERROR_FUNCTION_FAILED;
@@ -1602,7 +1588,7 @@ done:
         val = MSI_RecordGetString( row, 1 );
 
     if (!val)
-        val = empty;
+        val = szEmpty;
 
     r = msi_strcpy_to_awstring( val, szValueBuf, pchValueBuf );
 
diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index f22c01f..1cbdcc9 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -416,9 +416,8 @@ DWORD msi_version_str_to_dword(LPCWSTR p)
 
 LONG msi_reg_set_val_str( HKEY hkey, LPCWSTR name, LPCWSTR value )
 {
-    static const WCHAR emptyW[] = {0};
     DWORD len;
-    if (!value) value = emptyW;
+    if (!value) value = szEmpty;
     len = (lstrlenW(value) + 1) * sizeof (WCHAR);
     return RegSetValueExW( hkey, name, 0, REG_SZ, (const BYTE *)value, len );
 }
@@ -1779,9 +1778,6 @@ static UINT msi_get_patch_state(LPCWSTR prodcode, LPCWSTR usersid,
     LONG res;
     UINT r = ERROR_NO_MORE_ITEMS;
 
-    static const WCHAR szPatches[] = {'P','a','t','c','h','e','s',0};
-    static const WCHAR szState[] = {'S','t','a','t','e',0};
-
     *state = MSIPATCHSTATE_INVALID;
 
     r = MSIREG_OpenUserDataProductKey(prodcode, context,
@@ -1830,10 +1826,6 @@ static UINT msi_check_product_patches(LPCWSTR prodcode, LPCWSTR usersid,
     LONG res;
     UINT temp, r = ERROR_NO_MORE_ITEMS;
 
-    static const WCHAR szPatches[] = {'P','a','t','c','h','e','s',0};
-    static const WCHAR szState[] = {'S','t','a','t','e',0};
-    static const WCHAR szEmpty[] = {0};
-
     if (MSIREG_OpenProductKey(prodcode, usersid, context,
                               &prod, FALSE) != ERROR_SUCCESS)
         return ERROR_NO_MORE_ITEMS;
diff --git a/dlls/msi/source.c b/dlls/msi/source.c
index df5905d..0e752f5 100644
--- a/dlls/msi/source.c
+++ b/dlls/msi/source.c
@@ -57,7 +57,6 @@ static UINT OpenSourceKey(LPCWSTR szProduct, HKEY* key, DWORD dwOptions,
 {
     HKEY rootkey = 0; 
     UINT rc = ERROR_FUNCTION_FAILED;
-    static const WCHAR szSourceList[] = {'S','o','u','r','c','e','L','i','s','t',0};
 
     if (context == MSIINSTALLCONTEXT_USERUNMANAGED)
     {
@@ -1096,9 +1095,6 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
     DWORD index;
 
     static const WCHAR fmt[] = {'%','i',0};
-    static const WCHAR one[] = {'1',0};
-    static const WCHAR backslash[] = {'\\',0};
-    static const WCHAR forwardslash[] = {'/',0};
 
     TRACE("%s %s %x %x %s %i\n", debugstr_w(szProduct), debugstr_w(szUserSid),
           dwContext, dwOptions, debugstr_w(szSource), dwIndex);
@@ -1138,7 +1134,7 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
         return ERROR_FUNCTION_FAILED;
     }
 
-    postfix = (dwOptions & MSISOURCETYPE_NETWORK) ? backslash : forwardslash;
+    postfix = (dwOptions & MSISOURCETYPE_NETWORK) ? szBackSlash : szForwardSlash;
     if (szSource[lstrlenW(szSource) - 1] == *postfix)
         source = strdupW(szSource);
     else
@@ -1158,7 +1154,7 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
 
     if (count == 0)
     {
-        rc = RegSetValueExW(typekey, one, 0, REG_EXPAND_SZ, (LPBYTE)source, size);
+        rc = RegSetValueExW(typekey, szOne, 0, REG_EXPAND_SZ, (LPBYTE)source, size);
         goto done;
     }
     else if (dwIndex > count || dwIndex == 0)
@@ -1248,7 +1244,6 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
     DWORD size;
 
     static const WCHAR fmt[] = {'%','i',0};
-    static const WCHAR semicolon[] = {';',0};
 
     TRACE("%s %s %x %x %i %s %s\n", debugstr_w(szProduct),
             debugstr_w(szUserSid), dwContext, dwOptions, dwDiskId,
@@ -1289,7 +1284,7 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
     *buffer = '\0';
 
     if (szVolumeLabel) lstrcpyW(buffer, szVolumeLabel);
-    lstrcatW(buffer, semicolon);
+    lstrcatW(buffer, szSemiColon);
     if (szDiskPrompt) lstrcatW(buffer, szDiskPrompt);
 
     RegSetValueExW(mediakey, szIndex, 0, REG_SZ, (LPBYTE)buffer, size);
diff --git a/dlls/msi/string.c b/dlls/msi/string.c
index 97b1099..e5b5cc2 100644
--- a/dlls/msi/string.c
+++ b/dlls/msi/string.c
@@ -314,9 +314,8 @@ int msi_addstringW( string_table *st, UINT n, const WCHAR *data, int len, UINT r
 /* find the string identified by an id - return null if there's none */
 const WCHAR *msi_string_lookup_id( const string_table *st, UINT id )
 {
-    static const WCHAR zero[] = { 0 };
     if( id == 0 )
-        return zero;
+        return szEmpty;
 
     if( id >= st->maxcount )
         return NULL;
diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index 86cd4be..aa37670 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -1189,8 +1189,6 @@ static UINT msi_stream_name( const MSITABLEVIEW *tv, UINT row, LPWSTR *pstname )
         type = tv->columns[i].type;
         if ( type & MSITYPE_KEY )
         {
-            static const WCHAR szDot[] = { '.', 0 };
-
             r = TABLE_fetch_int( view, row, i+1, &ival );
             if ( r != ERROR_SUCCESS )
                 goto err;
@@ -2377,7 +2375,6 @@ static UINT read_raw_int(const BYTE *data, UINT col, UINT bytes)
 
 static UINT msi_record_encoded_stream_name( const MSITABLEVIEW *tv, MSIRECORD *rec, LPWSTR *pstname )
 {
-    static const WCHAR szDot[] = { '.', 0 };
     LPWSTR stname = NULL, sval, p;
     DWORD len;
     UINT i, r;
diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c
index 9f522c3..6d5f4cf 100644
--- a/dlls/msi/upgrade.c
+++ b/dlls/msi/upgrade.c
@@ -40,10 +40,6 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(msi);
 
-extern const WCHAR szFindRelatedProducts[];
-extern const WCHAR szMigrateFeatureStates[];
-extern const WCHAR szRemoveExistingProducts[];
-
 static BOOL check_language(DWORD lang1, LPCWSTR lang2, DWORD attributes)
 {
     DWORD langdword;
@@ -65,7 +61,6 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
     LPWSTR prop;
     LPWSTR newprop;
     DWORD len;
-    static const WCHAR separator[] = {';',0};
 
     prop = msi_dup_property(package, action_property );
     if (prop)
@@ -86,7 +81,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
     if (prop)
     {
         strcpyW(newprop,prop);
-        strcatW(newprop,separator);
+        strcatW(newprop,szSemiColon);
     }
     else
         newprop[0] = 0;
-- 
1.6.3.3





More information about the wine-patches mailing list