{'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[] =
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[] =
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[] =
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[] =
{'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[] =
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[] =
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*);
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 };
if ( strstrW( patch_product, prod_code ) )
{
- static const WCHAR zero[] = {'0',0};
MSISUMMARYINFO *si;
const WCHAR *p;
}
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;
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 */
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',' ',
/* 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;
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);
{
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);
msi_free(dir);
dir = msi_alloc(MAX_PATH*sizeof(WCHAR));
GetCurrentDirectoryW(MAX_PATH, dir);
- lstrcatW(dir, cszbs);
+ lstrcatW(dir, szBackSlash);
file = szPackagePath;
}
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;
{
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);
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;
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
{
{'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;
}
}
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
{'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;
{
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;
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;
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;
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)
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
{
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};
'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);
if (flags & ENV_MOD_PREFIX)
{
lstrcpyW(newval, value);
- lstrcatW(newval, semicolon);
+ lstrcatW(newval, szSemiColon);
ptr = newval + lstrlenW(value) + 1;
}
if (flags & ENV_MOD_APPEND)
{
- lstrcatW(newval, semicolon);
+ lstrcatW(newval, szSemiColon);
lstrcatW(newval, value);
}
}
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)))
lstrcpyW(source, sourcedir);
if (source[lstrlenW(source) - 1] != '\\')
- lstrcatW(source, backslash);
+ lstrcatW(source, szBackSlash);
lstrcatW(source, sourcename);
}
lstrcpyW(dest, destdir);
if (dest[lstrlenW(dest) - 1] != '\\')
- lstrcatW(dest, backslash);
+ lstrcatW(dest, szBackSlash);
if (destname)
lstrcatW(dest, destname);
LPWSTR val = NULL;
LPBYTE buffer;
- static const WCHAR root[] = {'\\',0};
-
if (!sig->File)
{
PathRemoveFileSpecW(path);
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)
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;
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),
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);
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);
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);
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;
}
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;
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;
strcpyW(command,advertise);
if (verb->Argument)
{
- static const WCHAR szSpace[] = {' ',0};
strcatW(command,szSpace);
strcatW(command,verb->Argument);
}
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 );
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;
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)
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)
}
else
{
- static const WCHAR szBlank[] = {0};
-
LPWSTR actiondata = msi_dup_property( package, action );
switch (script)
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);
}
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;
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;
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));
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 );
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) );
if (!strchrW( save_path, '\\' ))
{
GetCurrentDirectoryW( MAX_PATH, path );
- lstrcatW( path, backslash );
+ lstrcatW( path, szBackSlash );
lstrcatW( path, save_path );
}
else
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};
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 );
{
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;
return ERROR_OUTOFMEMORY;
lstrcpyW( filename, folder );
- lstrcatW( filename, szbs );
+ lstrcatW( filename, szBackSlash );
lstrcatW( filename, file );
handle = CreateFileW( filename, GENERIC_READ | GENERIC_WRITE, 0,
{
WCHAR tmp[MAX_PATH];
LPWSTR path = NULL;
- static const WCHAR prefix[] = { 'm','s','i',0 };
DWORD len, r;
r = GetTempPathW( MAX_PATH, tmp );
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 );
LPCWSTR font_text, text = NULL;
LPWSTR font;
- static const WCHAR empty[] = {0};
-
ctrl = msi_dialog_find_control( dialog, control );
if (!ctrl)
return;
{
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 );
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;
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;
LVITEMW item;
int index;
- static const WCHAR backslash[] = {'\\',0};
-
if (nmhdr->code != LVN_ITEMACTIVATE)
return ERROR_SUCCESS;
lstrcpyW( new_path, path );
lstrcatW( new_path, text );
- lstrcatW( new_path, backslash );
+ lstrcatW( new_path, szBackSlash );
MSI_SetPropertyW( dialog->package, prop, new_path );
LVCOLUMNW lvc;
DWORD count = 0;
- static const WCHAR zero[] = {'0',0};
static const WCHAR negative[] = {'-',0};
if (!text) return;
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 );
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};
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))
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))
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))
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 );
}
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;
}
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;
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;
continue;
strcatW(dir, str);
if( ((i+1)!=count) && dir[strlenW(dir)-1]!='\\')
- strcatW(dir, cszbs);
+ strcatW(dir, szBackSlash);
}
return dir;
}
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) ==
}
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;
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);
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};
}
lstrcpyW(cmd, cmd_ptr);
- if (szCommandLine) lstrcatW(cmd, space);
+ if (szCommandLine) lstrcatW(cmd, szSpace);
lstrcatW(cmd, patcheq);
lstrcatW(cmd, szPatchPackage);
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[] = {
val = msi_reg_get_value(props, szProperty, &type);
if (!val)
- val = strdupW(empty);
+ val = strdupW(szEmpty);
r = msi_copy_outval(val, szValue, pcchValue);
}
val = msi_reg_get_value(hkey, szProperty, &type);
if (!val)
- val = strdupW(empty);
+ val = strdupW(szEmpty);
r = msi_copy_outval(val, szValue, pcchValue);
}
val = strdupW(five);
}
else
- val = strdupW(one);
+ val = strdupW(szOne);
r = msi_copy_outval(val, szValue, pcchValue);
goto done;
}
if (prod || managed)
- val = strdupW(one);
+ val = strdupW(szOne);
else
goto done;
goto done;
/* FIXME */
- val = strdupW(empty);
+ val = strdupW(szEmpty);
r = msi_copy_outval(val, szValue, pcchValue);
}
else
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};
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);
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;
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);
*/
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;
if (r == ERROR_SUCCESS)
{
RegCloseKey( hkey );
- MSI_SetPropertyW( package, szInstalled, val );
+ MSI_SetPropertyW( package, szInstalled, szOne );
}
return r;
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 );
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 );
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','\\',
}
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)
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[] =
{'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 };
*/
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. */
{
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;
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 ) )
{
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;
}
strcatW(message,tmp);
if (msg_field > 1)
- strcatW(message,space);
+ strcatW(message, szSpace);
msi_free(tmp);
}
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;
val = MSI_RecordGetString( row, 1 );
if (!val)
- val = empty;
+ val = szEmpty;
r = msi_strcpy_to_awstring( val, szValueBuf, pchValueBuf );
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 );
}
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,
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;
{
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)
{
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);
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
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)
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,
*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);
/* 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;
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;
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;
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;
LPWSTR prop;
LPWSTR newprop;
DWORD len;
- static const WCHAR separator[] = {';',0};
prop = msi_dup_property(package, action_property );
if (prop)
if (prop)
{
strcpyW(newprop,prop);
- strcatW(newprop,separator);
+ strcatW(newprop,szSemiColon);
}
else
newprop[0] = 0;