msi: Rename MSI_GetPropertyW and MSI_SetPropertyW.
For consistency with related functions msi_dup_property and msi_get_property_int and because there is no ANSI version of these functions.
This commit is contained in:
parent
44b7983913
commit
e31ee69f37
|
@ -277,7 +277,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
|
||||||
|
|
||||||
if (lstrlenW(prop) > 0)
|
if (lstrlenW(prop) > 0)
|
||||||
{
|
{
|
||||||
UINT r = MSI_SetPropertyW( package->db, prop, val );
|
UINT r = msi_set_property( package->db, prop, val );
|
||||||
|
|
||||||
TRACE("Found commandline property (%s) = (%s)\n",
|
TRACE("Found commandline property (%s) = (%s)\n",
|
||||||
debugstr_w(prop), debugstr_w(val));
|
debugstr_w(prop), debugstr_w(val));
|
||||||
|
@ -481,7 +481,7 @@ static UINT msi_set_media_source_prop(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
prop = MSI_RecordGetString(rec, 1);
|
prop = MSI_RecordGetString(rec, 1);
|
||||||
patch = msi_dup_property(package->db, szPatch);
|
patch = msi_dup_property(package->db, szPatch);
|
||||||
MSI_SetPropertyW(package->db, prop, patch);
|
msi_set_property(package->db, prop, patch);
|
||||||
msi_free(patch);
|
msi_free(patch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,7 +673,7 @@ static UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
|
||||||
check = msi_dup_property( package->db, cszSourceDir );
|
check = msi_dup_property( package->db, cszSourceDir );
|
||||||
if (!check || replace)
|
if (!check || replace)
|
||||||
{
|
{
|
||||||
UINT r = MSI_SetPropertyW( package->db, cszSourceDir, source );
|
UINT r = msi_set_property( package->db, cszSourceDir, source );
|
||||||
if (r == ERROR_SUCCESS)
|
if (r == ERROR_SUCCESS)
|
||||||
msi_reset_folders( package, TRUE );
|
msi_reset_folders( package, TRUE );
|
||||||
}
|
}
|
||||||
|
@ -681,7 +681,7 @@ static UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
|
||||||
|
|
||||||
check = msi_dup_property( package->db, cszSOURCEDIR );
|
check = msi_dup_property( package->db, cszSOURCEDIR );
|
||||||
if (!check || replace)
|
if (!check || replace)
|
||||||
MSI_SetPropertyW( package->db, cszSOURCEDIR, source );
|
msi_set_property( package->db, cszSOURCEDIR, source );
|
||||||
|
|
||||||
msi_free( check );
|
msi_free( check );
|
||||||
msi_free( source );
|
msi_free( source );
|
||||||
|
@ -705,7 +705,7 @@ static UINT msi_set_context(MSIPACKAGE *package)
|
||||||
|
|
||||||
package->Context = MSIINSTALLCONTEXT_USERUNMANAGED;
|
package->Context = MSIINSTALLCONTEXT_USERUNMANAGED;
|
||||||
|
|
||||||
r = MSI_GetPropertyW(package->db, szAllUsers, val, &sz);
|
r = msi_get_property(package->db, szAllUsers, val, &sz);
|
||||||
if (r == ERROR_SUCCESS)
|
if (r == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
num = atolW(val);
|
num = atolW(val);
|
||||||
|
@ -1520,8 +1520,8 @@ static UINT ACTION_CostInitialize(MSIPACKAGE *package)
|
||||||
static const WCHAR szCosting[] =
|
static const WCHAR szCosting[] =
|
||||||
{'C','o','s','t','i','n','g','C','o','m','p','l','e','t','e',0 };
|
{'C','o','s','t','i','n','g','C','o','m','p','l','e','t','e',0 };
|
||||||
|
|
||||||
MSI_SetPropertyW( package->db, szCosting, szZero );
|
msi_set_property( package->db, szCosting, szZero );
|
||||||
MSI_SetPropertyW( package->db, cszRootDrive, c_colon );
|
msi_set_property( package->db, cszRootDrive, c_colon );
|
||||||
|
|
||||||
load_all_folders( package );
|
load_all_folders( package );
|
||||||
load_all_components( package );
|
load_all_components( package );
|
||||||
|
@ -1691,7 +1691,7 @@ static BOOL process_overrides( MSIPACKAGE *package, int level )
|
||||||
ret |= process_state_property( package, level, szAdvertise, INSTALLSTATE_ADVERTISED );
|
ret |= process_state_property( package, level, szAdvertise, INSTALLSTATE_ADVERTISED );
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
MSI_SetPropertyW( package->db, szPreselected, szOne );
|
msi_set_property( package->db, szPreselected, szOne );
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -2084,15 +2084,15 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MSI_SetPropertyW( package->db, szCosting, szOne );
|
msi_set_property( package->db, szCosting, szOne );
|
||||||
/* set default run level if not set */
|
/* set default run level if not set */
|
||||||
level = msi_dup_property( package->db, szlevel );
|
level = msi_dup_property( package->db, szlevel );
|
||||||
if (!level)
|
if (!level)
|
||||||
MSI_SetPropertyW( package->db, szlevel, szOne );
|
msi_set_property( package->db, szlevel, szOne );
|
||||||
msi_free(level);
|
msi_free(level);
|
||||||
|
|
||||||
/* FIXME: check volume disk space */
|
/* FIXME: check volume disk space */
|
||||||
MSI_SetPropertyW( package->db, szOutOfDiskSpace, szZero );
|
msi_set_property( package->db, szOutOfDiskSpace, szZero );
|
||||||
|
|
||||||
return MSI_SetFeatureStates(package);
|
return MSI_SetFeatureStates(package);
|
||||||
}
|
}
|
||||||
|
@ -6802,7 +6802,7 @@ static UINT ACTION_ValidateProductID( MSIPACKAGE *package )
|
||||||
if (key && template)
|
if (key && template)
|
||||||
{
|
{
|
||||||
FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) );
|
FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) );
|
||||||
r = MSI_SetPropertyW( package->db, szProductID, key );
|
r = msi_set_property( package->db, szProductID, key );
|
||||||
}
|
}
|
||||||
msi_free( template );
|
msi_free( template );
|
||||||
msi_free( key );
|
msi_free( key );
|
||||||
|
@ -7216,7 +7216,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
|
||||||
static const WCHAR szAction[] = {'A','C','T','I','O','N',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 szInstall[] = {'I','N','S','T','A','L','L',0};
|
||||||
|
|
||||||
MSI_SetPropertyW( package->db, szAction, szInstall );
|
msi_set_property( package->db, szAction, szInstall );
|
||||||
|
|
||||||
package->script->InWhatSequence = SEQUENCE_INSTALL;
|
package->script->InWhatSequence = SEQUENCE_INSTALL;
|
||||||
|
|
||||||
|
@ -7264,7 +7264,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
|
||||||
if (!szCommandLine && msi_get_property_int( package->db, szInstalled, 0 ))
|
if (!szCommandLine && msi_get_property_int( package->db, szInstalled, 0 ))
|
||||||
{
|
{
|
||||||
TRACE("setting reinstall property\n");
|
TRACE("setting reinstall property\n");
|
||||||
MSI_SetPropertyW( package->db, szReinstall, szAll );
|
msi_set_property( package->db, szReinstall, szAll );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* properties may have been added by a transform */
|
/* properties may have been added by a transform */
|
||||||
|
|
|
@ -1041,7 +1041,7 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param)
|
||||||
r = ACTION_AppSearchSigName(package, sigName, &sig, &value);
|
r = ACTION_AppSearchSigName(package, sigName, &sig, &value);
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
r = MSI_SetPropertyW( package->db, propName, value );
|
r = msi_set_property( package->db, propName, value );
|
||||||
if (r == ERROR_SUCCESS && !strcmpW( propName, cszSourceDir ))
|
if (r == ERROR_SUCCESS && !strcmpW( propName, cszSourceDir ))
|
||||||
msi_reset_folders( package, TRUE );
|
msi_reset_folders( package, TRUE );
|
||||||
|
|
||||||
|
@ -1103,7 +1103,7 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
TRACE("Found signature %s\n", debugstr_w(signature));
|
TRACE("Found signature %s\n", debugstr_w(signature));
|
||||||
MSI_SetPropertyW(package->db, success, szOne);
|
msi_set_property(package->db, success, szOne);
|
||||||
msi_free(value);
|
msi_free(value);
|
||||||
r = ERROR_NO_MORE_ITEMS;
|
r = ERROR_NO_MORE_ITEMS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,17 +163,17 @@ static void set_deferred_action_props(MSIPACKAGE *package, LPWSTR deferred_data)
|
||||||
|
|
||||||
end = strstrW(beg, sep);
|
end = strstrW(beg, sep);
|
||||||
*end = '\0';
|
*end = '\0';
|
||||||
MSI_SetPropertyW(package->db, szCustomActionData, beg);
|
msi_set_property(package->db, szCustomActionData, beg);
|
||||||
beg = end + 3;
|
beg = end + 3;
|
||||||
|
|
||||||
end = strstrW(beg, sep);
|
end = strstrW(beg, sep);
|
||||||
*end = '\0';
|
*end = '\0';
|
||||||
MSI_SetPropertyW(package->db, szUserSID, beg);
|
msi_set_property(package->db, szUserSID, beg);
|
||||||
beg = end + 3;
|
beg = end + 3;
|
||||||
|
|
||||||
end = strchrW(beg, ']');
|
end = strchrW(beg, ']');
|
||||||
*end = '\0';
|
*end = '\0';
|
||||||
MSI_SetPropertyW(package->db, szProductCode, beg);
|
msi_set_property(package->db, szProductCode, beg);
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL execute)
|
UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL execute)
|
||||||
|
@ -276,9 +276,9 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
|
||||||
if (deferred_data)
|
if (deferred_data)
|
||||||
set_deferred_action_props(package, deferred_data);
|
set_deferred_action_props(package, deferred_data);
|
||||||
else if (actiondata)
|
else if (actiondata)
|
||||||
MSI_SetPropertyW(package->db, szCustomActionData, actiondata);
|
msi_set_property(package->db, szCustomActionData, actiondata);
|
||||||
else
|
else
|
||||||
MSI_SetPropertyW(package->db, szCustomActionData, szEmpty);
|
msi_set_property(package->db, szCustomActionData, szEmpty);
|
||||||
|
|
||||||
msi_free(actiondata);
|
msi_free(actiondata);
|
||||||
}
|
}
|
||||||
|
@ -327,7 +327,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
|
||||||
break;
|
break;
|
||||||
|
|
||||||
deformat_string(package,target,&deformated);
|
deformat_string(package,target,&deformated);
|
||||||
rc = MSI_SetPropertyW( package->db, source, deformated );
|
rc = msi_set_property( package->db, source, deformated );
|
||||||
if (rc == ERROR_SUCCESS && !strcmpW( source, cszSourceDir ))
|
if (rc == ERROR_SUCCESS && !strcmpW( source, cszSourceDir ))
|
||||||
msi_reset_folders( package, TRUE );
|
msi_reset_folders( package, TRUE );
|
||||||
msi_free(deformated);
|
msi_free(deformated);
|
||||||
|
@ -378,7 +378,7 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source,
|
||||||
DWORD sz = MAX_PATH;
|
DWORD sz = MAX_PATH;
|
||||||
UINT r;
|
UINT r;
|
||||||
|
|
||||||
if (MSI_GetPropertyW(package->db, cszTempFolder, fmt, &sz) != ERROR_SUCCESS)
|
if (msi_get_property(package->db, cszTempFolder, fmt, &sz) != ERROR_SUCCESS)
|
||||||
GetTempPathW(MAX_PATH, fmt);
|
GetTempPathW(MAX_PATH, fmt);
|
||||||
|
|
||||||
if (GetTempFileNameW(fmt, szMsi, 0, tmp_file) == 0)
|
if (GetTempFileNameW(fmt, szMsi, 0, tmp_file) == 0)
|
||||||
|
@ -866,7 +866,7 @@ static UINT HANDLE_CustomType23(MSIPACKAGE *package, LPCWSTR source,
|
||||||
UINT r;
|
UINT r;
|
||||||
|
|
||||||
size = MAX_PATH;
|
size = MAX_PATH;
|
||||||
MSI_GetPropertyW(package->db, cszSourceDir, package_path, &size);
|
msi_get_property(package->db, cszSourceDir, package_path, &size);
|
||||||
lstrcatW(package_path, szBackSlash);
|
lstrcatW(package_path, szBackSlash);
|
||||||
lstrcatW(package_path, source);
|
lstrcatW(package_path, source);
|
||||||
|
|
||||||
|
|
|
@ -585,7 +585,7 @@ static void msi_dialog_update_controls( msi_dialog *dialog, LPCWSTR property )
|
||||||
|
|
||||||
static void msi_dialog_set_property( MSIPACKAGE *package, LPCWSTR property, LPCWSTR value )
|
static void msi_dialog_set_property( MSIPACKAGE *package, LPCWSTR property, LPCWSTR value )
|
||||||
{
|
{
|
||||||
UINT r = MSI_SetPropertyW( package->db, property, value );
|
UINT r = msi_set_property( package->db, property, value );
|
||||||
if (r == ERROR_SUCCESS && !strcmpW( property, cszSourceDir ))
|
if (r == ERROR_SUCCESS && !strcmpW( property, cszSourceDir ))
|
||||||
msi_reset_folders( package, TRUE );
|
msi_reset_folders( package, TRUE );
|
||||||
}
|
}
|
||||||
|
@ -3556,7 +3556,7 @@ static UINT msi_dialog_get_checkbox_state( msi_dialog *dialog,
|
||||||
WCHAR state[2] = { 0 };
|
WCHAR state[2] = { 0 };
|
||||||
DWORD sz = 2;
|
DWORD sz = 2;
|
||||||
|
|
||||||
MSI_GetPropertyW( dialog->package->db, control->property, state, &sz );
|
msi_get_property( dialog->package->db, control->property, state, &sz );
|
||||||
return state[0] ? 1 : 0;
|
return state[0] ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4024,7 +4024,7 @@ static UINT error_dialog_handler(MSIPACKAGE *package, LPCWSTR event,
|
||||||
if ( !lstrcmpW( argument, error_abort ) || !lstrcmpW( argument, error_cancel ) ||
|
if ( !lstrcmpW( argument, error_abort ) || !lstrcmpW( argument, error_cancel ) ||
|
||||||
!lstrcmpW( argument, error_no ) )
|
!lstrcmpW( argument, error_no ) )
|
||||||
{
|
{
|
||||||
MSI_SetPropertyW( package->db, result_prop, error_abort );
|
msi_set_property( package->db, result_prop, error_abort );
|
||||||
}
|
}
|
||||||
|
|
||||||
ControlEvent_CleanupSubscriptions(package);
|
ControlEvent_CleanupSubscriptions(package);
|
||||||
|
@ -4100,7 +4100,7 @@ UINT msi_spawn_error_dialog( MSIPACKAGE *package, LPWSTR error_dialog, LPWSTR er
|
||||||
if ( r != ERROR_SUCCESS )
|
if ( r != ERROR_SUCCESS )
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
r = MSI_GetPropertyW( package->db, result_prop, result, &size );
|
r = msi_get_property( package->db, result_prop, result, &size );
|
||||||
if ( r != ERROR_SUCCESS)
|
if ( r != ERROR_SUCCESS)
|
||||||
r = ERROR_SUCCESS;
|
r = ERROR_SUCCESS;
|
||||||
|
|
||||||
|
|
|
@ -380,7 +380,7 @@ static UINT ControlEvent_DirectoryListUp(MSIPACKAGE *package, LPCWSTR argument,
|
||||||
static UINT ControlEvent_ReinstallMode(MSIPACKAGE *package, LPCWSTR argument,
|
static UINT ControlEvent_ReinstallMode(MSIPACKAGE *package, LPCWSTR argument,
|
||||||
msi_dialog *dialog)
|
msi_dialog *dialog)
|
||||||
{
|
{
|
||||||
return MSI_SetPropertyW( package->db, szReinstallMode, argument );
|
return msi_set_property( package->db, szReinstallMode, argument );
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT ControlEvent_Reinstall( MSIPACKAGE *package, LPCWSTR argument,
|
static UINT ControlEvent_Reinstall( MSIPACKAGE *package, LPCWSTR argument,
|
||||||
|
@ -413,7 +413,7 @@ static UINT ControlEvent_ValidateProductID(MSIPACKAGE *package, LPCWSTR argument
|
||||||
if (key && template)
|
if (key && template)
|
||||||
{
|
{
|
||||||
FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) );
|
FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) );
|
||||||
ret = MSI_SetPropertyW( package->db, szProductID, key );
|
ret = msi_set_property( package->db, szProductID, key );
|
||||||
}
|
}
|
||||||
msi_free( template );
|
msi_free( template );
|
||||||
msi_free( key );
|
msi_free( key );
|
||||||
|
|
|
@ -270,14 +270,14 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
||||||
{
|
{
|
||||||
check_path = msi_dup_property( package->db, cszRootDrive );
|
check_path = msi_dup_property( package->db, cszRootDrive );
|
||||||
if (set_prop)
|
if (set_prop)
|
||||||
MSI_SetPropertyW( package->db, cszTargetDir, check_path );
|
msi_set_property( package->db, cszTargetDir, check_path );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* correct misbuilt target dir */
|
/* correct misbuilt target dir */
|
||||||
path = build_directory_name(2, check_path, NULL);
|
path = build_directory_name(2, check_path, NULL);
|
||||||
clean_spaces_from_path( path );
|
clean_spaces_from_path( path );
|
||||||
if (strcmpiW(path,check_path)!=0)
|
if (strcmpiW(path,check_path)!=0)
|
||||||
MSI_SetPropertyW( package->db, cszTargetDir, path );
|
msi_set_property( package->db, cszTargetDir, path );
|
||||||
msi_free(check_path);
|
msi_free(check_path);
|
||||||
|
|
||||||
f->ResolvedTarget = path;
|
f->ResolvedTarget = path;
|
||||||
|
@ -310,7 +310,7 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
||||||
|
|
||||||
TRACE(" internally set to %s\n",debugstr_w(path));
|
TRACE(" internally set to %s\n",debugstr_w(path));
|
||||||
if (set_prop)
|
if (set_prop)
|
||||||
MSI_SetPropertyW( package->db, name, path );
|
msi_set_property( package->db, name, path );
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
||||||
f->ResolvedTarget = strdupW( path );
|
f->ResolvedTarget = strdupW( path );
|
||||||
TRACE("target -> %s\n", debugstr_w(path));
|
TRACE("target -> %s\n", debugstr_w(path));
|
||||||
if (set_prop)
|
if (set_prop)
|
||||||
MSI_SetPropertyW( package->db, name, path );
|
msi_set_property( package->db, name, path );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1284,7 +1284,7 @@ UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel )
|
||||||
return MSI_SetFeatureStates( package );
|
return MSI_SetFeatureStates( package );
|
||||||
|
|
||||||
sprintfW( level, fmt, iInstallLevel );
|
sprintfW( level, fmt, iInstallLevel );
|
||||||
r = MSI_SetPropertyW( package->db, szInstallLevel, level );
|
r = msi_set_property( package->db, szInstallLevel, level );
|
||||||
if ( r == ERROR_SUCCESS )
|
if ( r == ERROR_SUCCESS )
|
||||||
r = MSI_SetFeatureStates( package );
|
r = MSI_SetFeatureStates( package );
|
||||||
|
|
||||||
|
|
|
@ -3535,10 +3535,10 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature,
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
MSI_SetPropertyW( package->db, szReinstallMode, reinstallmode );
|
msi_set_property( package->db, szReinstallMode, reinstallmode );
|
||||||
MSI_SetPropertyW( package->db, szInstalled, szOne );
|
msi_set_property( package->db, szInstalled, szOne );
|
||||||
MSI_SetPropertyW( package->db, szLogVerbose, szOne );
|
msi_set_property( package->db, szLogVerbose, szOne );
|
||||||
MSI_SetPropertyW( package->db, szReinstall, szFeature );
|
msi_set_property( package->db, szReinstall, szFeature );
|
||||||
|
|
||||||
r = MSI_InstallPackage( package, sourcepath, NULL );
|
r = MSI_InstallPackage( package, sourcepath, NULL );
|
||||||
|
|
||||||
|
|
|
@ -746,9 +746,7 @@ extern UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel );
|
||||||
extern MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *, LPCWSTR );
|
extern MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *, LPCWSTR );
|
||||||
extern UINT MSI_OpenPackageW( LPCWSTR szPackage, MSIPACKAGE **pPackage );
|
extern UINT MSI_OpenPackageW( LPCWSTR szPackage, MSIPACKAGE **pPackage );
|
||||||
extern UINT MSI_SetTargetPathW( MSIPACKAGE *, LPCWSTR, LPCWSTR );
|
extern UINT MSI_SetTargetPathW( MSIPACKAGE *, LPCWSTR, LPCWSTR );
|
||||||
extern UINT MSI_SetPropertyW( MSIDATABASE *, LPCWSTR, LPCWSTR );
|
|
||||||
extern INT MSI_ProcessMessage( MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD * );
|
extern INT MSI_ProcessMessage( MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD * );
|
||||||
extern UINT MSI_GetPropertyW( MSIDATABASE *, LPCWSTR, LPWSTR, LPDWORD );
|
|
||||||
extern MSICONDITION MSI_EvaluateConditionW( MSIPACKAGE *, LPCWSTR );
|
extern MSICONDITION MSI_EvaluateConditionW( MSIPACKAGE *, LPCWSTR );
|
||||||
extern UINT MSI_GetComponentStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE * );
|
extern UINT MSI_GetComponentStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE * );
|
||||||
extern UINT MSI_GetFeatureStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE * );
|
extern UINT MSI_GetFeatureStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE * );
|
||||||
|
@ -970,6 +968,8 @@ extern UINT ACTION_UnregisterProgIdInfo(MSIPACKAGE *package);
|
||||||
extern DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data );
|
extern DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data );
|
||||||
extern LPWSTR msi_dup_record_field(MSIRECORD *row, INT index);
|
extern LPWSTR msi_dup_record_field(MSIRECORD *row, INT index);
|
||||||
extern LPWSTR msi_dup_property( MSIDATABASE *db, LPCWSTR prop );
|
extern LPWSTR msi_dup_property( MSIDATABASE *db, LPCWSTR prop );
|
||||||
|
extern UINT msi_set_property( MSIDATABASE *, LPCWSTR, LPCWSTR );
|
||||||
|
extern UINT msi_get_property( MSIDATABASE *, LPCWSTR, LPWSTR, LPDWORD );
|
||||||
extern int msi_get_property_int( MSIDATABASE *package, LPCWSTR prop, int def );
|
extern int msi_get_property_int( MSIDATABASE *package, LPCWSTR prop, int def );
|
||||||
extern LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
extern LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
||||||
BOOL set_prop, BOOL load_prop, MSIFOLDER **folder);
|
BOOL set_prop, BOOL load_prop, MSIFOLDER **folder);
|
||||||
|
|
|
@ -388,7 +388,7 @@ static UINT set_installed_prop( MSIPACKAGE *package )
|
||||||
if (r == ERROR_SUCCESS)
|
if (r == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
RegCloseKey( hkey );
|
RegCloseKey( hkey );
|
||||||
MSI_SetPropertyW( package->db, szInstalled, szOne );
|
msi_set_property( package->db, szInstalled, szOne );
|
||||||
}
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
@ -431,7 +431,7 @@ static UINT set_user_sid_prop( MSIPACKAGE *package )
|
||||||
if (!ConvertSidToStringSidW( psid, &sid_str ))
|
if (!ConvertSidToStringSidW( psid, &sid_str ))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
r = MSI_SetPropertyW( package->db, szUserSID, sid_str );
|
r = msi_set_property( package->db, szUserSID, sid_str );
|
||||||
|
|
||||||
done:
|
done:
|
||||||
LocalFree( sid_str );
|
LocalFree( sid_str );
|
||||||
|
@ -563,7 +563,7 @@ static void set_msi_assembly_prop(MSIPACKAGE *package)
|
||||||
if (!val_len || !verstr)
|
if (!val_len || !verstr)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
MSI_SetPropertyW(package->db, netasm, verstr);
|
msi_set_property(package->db, netasm, verstr);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
msi_free(fusion);
|
msi_free(fusion);
|
||||||
|
@ -689,96 +689,96 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_PROGRAM_FILES_COMMON,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_PROGRAM_FILES_COMMON,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, CFF, pth);
|
msi_set_property(package->db, CFF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_PROGRAM_FILES,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_PROGRAM_FILES,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, PFF, pth);
|
msi_set_property(package->db, PFF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_COMMON_APPDATA,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_COMMON_APPDATA,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, CADF, pth);
|
msi_set_property(package->db, CADF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_FAVORITES,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_FAVORITES,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, FaF, pth);
|
msi_set_property(package->db, FaF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_FONTS,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_FONTS,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, FoF, pth);
|
msi_set_property(package->db, FoF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_SENDTO,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_SENDTO,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, SendTF, pth);
|
msi_set_property(package->db, SendTF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_STARTMENU,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_STARTMENU,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, SMF, pth);
|
msi_set_property(package->db, SMF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_STARTUP,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_STARTUP,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, StF, pth);
|
msi_set_property(package->db, StF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_TEMPLATES,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_TEMPLATES,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, TemplF, pth);
|
msi_set_property(package->db, TemplF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_DESKTOP,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_DESKTOP,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, DF, pth);
|
msi_set_property(package->db, DF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_PROGRAMS,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_PROGRAMS,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, PMF, pth);
|
msi_set_property(package->db, PMF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_ADMINTOOLS,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_ADMINTOOLS,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, ATF, pth);
|
msi_set_property(package->db, ATF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_APPDATA,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_APPDATA,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, ADF, pth);
|
msi_set_property(package->db, ADF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_SYSTEM,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_SYSTEM,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, SF, pth);
|
msi_set_property(package->db, SF, pth);
|
||||||
MSI_SetPropertyW(package->db, SF16, pth);
|
msi_set_property(package->db, SF16, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_LOCAL_APPDATA,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_LOCAL_APPDATA,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, LADF, pth);
|
msi_set_property(package->db, LADF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_MYPICTURES,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_MYPICTURES,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, MPF, pth);
|
msi_set_property(package->db, MPF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_PERSONAL,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_PERSONAL,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, PF, pth);
|
msi_set_property(package->db, PF, pth);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
|
||||||
strcatW(pth, szBackSlash);
|
strcatW(pth, szBackSlash);
|
||||||
MSI_SetPropertyW(package->db, WF, pth);
|
msi_set_property(package->db, WF, pth);
|
||||||
|
|
||||||
/* Physical Memory is specified in MB. Using total amount. */
|
/* Physical Memory is specified in MB. Using total amount. */
|
||||||
msex.dwLength = sizeof(msex);
|
msex.dwLength = sizeof(msex);
|
||||||
GlobalMemoryStatusEx( &msex );
|
GlobalMemoryStatusEx( &msex );
|
||||||
sprintfW( bufstr, szIntFormat, (int)(msex.ullTotalPhys/1024/1024));
|
sprintfW( bufstr, szIntFormat, (int)(msex.ullTotalPhys/1024/1024));
|
||||||
MSI_SetPropertyW(package->db, szPhysicalMemory, bufstr);
|
msi_set_property(package->db, szPhysicalMemory, bufstr);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
|
||||||
ptr = strchrW(pth,'\\');
|
ptr = strchrW(pth,'\\');
|
||||||
if (ptr)
|
if (ptr)
|
||||||
*(ptr+1) = 0;
|
*(ptr+1) = 0;
|
||||||
MSI_SetPropertyW(package->db, WV, pth);
|
msi_set_property(package->db, WV, pth);
|
||||||
|
|
||||||
GetTempPathW(MAX_PATH,pth);
|
GetTempPathW(MAX_PATH,pth);
|
||||||
MSI_SetPropertyW(package->db, TF, pth);
|
msi_set_property(package->db, TF, pth);
|
||||||
|
|
||||||
|
|
||||||
/* in a wine environment the user is always admin and privileged */
|
/* in a wine environment the user is always admin and privileged */
|
||||||
MSI_SetPropertyW(package->db, szAdminUser, szOne);
|
msi_set_property(package->db, szAdminUser, szOne);
|
||||||
MSI_SetPropertyW(package->db, szPriv, szOne);
|
msi_set_property(package->db, szPriv, szOne);
|
||||||
|
|
||||||
/* set the os things */
|
/* set the os things */
|
||||||
OSVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
|
OSVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
|
||||||
|
@ -788,39 +788,39 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
||||||
switch (OSVersion.dwPlatformId)
|
switch (OSVersion.dwPlatformId)
|
||||||
{
|
{
|
||||||
case VER_PLATFORM_WIN32_WINDOWS:
|
case VER_PLATFORM_WIN32_WINDOWS:
|
||||||
MSI_SetPropertyW(package->db, v9x, verstr);
|
msi_set_property(package->db, v9x, verstr);
|
||||||
break;
|
break;
|
||||||
case VER_PLATFORM_WIN32_NT:
|
case VER_PLATFORM_WIN32_NT:
|
||||||
MSI_SetPropertyW(package->db, vNT, verstr);
|
msi_set_property(package->db, vNT, verstr);
|
||||||
sprintfW(verstr,szFormat,OSVersion.wProductType);
|
sprintfW(verstr,szFormat,OSVersion.wProductType);
|
||||||
MSI_SetPropertyW(package->db, szMsiNTProductType, verstr);
|
msi_set_property(package->db, szMsiNTProductType, verstr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sprintfW(verstr,szFormat,OSVersion.dwBuildNumber);
|
sprintfW(verstr,szFormat,OSVersion.dwBuildNumber);
|
||||||
MSI_SetPropertyW(package->db, szWinBuild, verstr);
|
msi_set_property(package->db, szWinBuild, verstr);
|
||||||
/* just fudge this */
|
/* just fudge this */
|
||||||
MSI_SetPropertyW(package->db, szSPL, szSix);
|
msi_set_property(package->db, szSPL, szSix);
|
||||||
|
|
||||||
sprintfW( bufstr, szFormat2, MSI_MAJORVERSION, MSI_MINORVERSION);
|
sprintfW( bufstr, szFormat2, MSI_MAJORVERSION, MSI_MINORVERSION);
|
||||||
MSI_SetPropertyW( package->db, szVersionMsi, bufstr );
|
msi_set_property( package->db, szVersionMsi, bufstr );
|
||||||
sprintfW( bufstr, szFormat, MSI_MAJORVERSION * 100);
|
sprintfW( bufstr, szFormat, MSI_MAJORVERSION * 100);
|
||||||
MSI_SetPropertyW( package->db, szVersionDatabase, bufstr );
|
msi_set_property( package->db, szVersionDatabase, bufstr );
|
||||||
|
|
||||||
GetSystemInfo( &sys_info );
|
GetSystemInfo( &sys_info );
|
||||||
if (sys_info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)
|
if (sys_info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)
|
||||||
{
|
{
|
||||||
sprintfW( bufstr, szIntFormat, sys_info.wProcessorLevel );
|
sprintfW( bufstr, szIntFormat, sys_info.wProcessorLevel );
|
||||||
MSI_SetPropertyW( package->db, szIntel, bufstr );
|
msi_set_property( package->db, szIntel, bufstr );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Screen properties. */
|
/* Screen properties. */
|
||||||
dc = GetDC(0);
|
dc = GetDC(0);
|
||||||
sprintfW( bufstr, szIntFormat, GetDeviceCaps( dc, HORZRES ) );
|
sprintfW( bufstr, szIntFormat, GetDeviceCaps( dc, HORZRES ) );
|
||||||
MSI_SetPropertyW( package->db, szScreenX, bufstr );
|
msi_set_property( package->db, szScreenX, bufstr );
|
||||||
sprintfW( bufstr, szIntFormat, GetDeviceCaps( dc, VERTRES ));
|
sprintfW( bufstr, szIntFormat, GetDeviceCaps( dc, VERTRES ));
|
||||||
MSI_SetPropertyW( package->db, szScreenY, bufstr );
|
msi_set_property( package->db, szScreenY, bufstr );
|
||||||
sprintfW( bufstr, szIntFormat, GetDeviceCaps( dc, BITSPIXEL ));
|
sprintfW( bufstr, szIntFormat, GetDeviceCaps( dc, BITSPIXEL ));
|
||||||
MSI_SetPropertyW( package->db, szColorBits, bufstr );
|
msi_set_property( package->db, szColorBits, bufstr );
|
||||||
ReleaseDC(0, dc);
|
ReleaseDC(0, dc);
|
||||||
|
|
||||||
/* USERNAME and COMPANYNAME */
|
/* USERNAME and COMPANYNAME */
|
||||||
|
@ -832,10 +832,10 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
if (!username &&
|
if (!username &&
|
||||||
(username = msi_reg_get_val_str( hkey, szDefName )))
|
(username = msi_reg_get_val_str( hkey, szDefName )))
|
||||||
MSI_SetPropertyW( package->db, szUSERNAME, username );
|
msi_set_property( package->db, szUSERNAME, username );
|
||||||
if (!companyname &&
|
if (!companyname &&
|
||||||
(companyname = msi_reg_get_val_str( hkey, szDefCompany )))
|
(companyname = msi_reg_get_val_str( hkey, szDefCompany )))
|
||||||
MSI_SetPropertyW( package->db, szCOMPANYNAME, companyname );
|
msi_set_property( package->db, szCOMPANYNAME, companyname );
|
||||||
CloseHandle( hkey );
|
CloseHandle( hkey );
|
||||||
}
|
}
|
||||||
if ((!username || !companyname) &&
|
if ((!username || !companyname) &&
|
||||||
|
@ -843,10 +843,10 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
if (!username &&
|
if (!username &&
|
||||||
(username = msi_reg_get_val_str( hkey, szRegisteredUser )))
|
(username = msi_reg_get_val_str( hkey, szRegisteredUser )))
|
||||||
MSI_SetPropertyW( package->db, szUSERNAME, username );
|
msi_set_property( package->db, szUSERNAME, username );
|
||||||
if (!companyname &&
|
if (!companyname &&
|
||||||
(companyname = msi_reg_get_val_str( hkey, szRegisteredOrg )))
|
(companyname = msi_reg_get_val_str( hkey, szRegisteredOrg )))
|
||||||
MSI_SetPropertyW( package->db, szCOMPANYNAME, companyname );
|
msi_set_property( package->db, szCOMPANYNAME, companyname );
|
||||||
CloseHandle( hkey );
|
CloseHandle( hkey );
|
||||||
}
|
}
|
||||||
msi_free( username );
|
msi_free( username );
|
||||||
|
@ -859,7 +859,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
||||||
GetSystemTime( &systemtime );
|
GetSystemTime( &systemtime );
|
||||||
if (GetDateFormatW( LOCALE_USER_DEFAULT, DATE_SHORTDATE, &systemtime,
|
if (GetDateFormatW( LOCALE_USER_DEFAULT, DATE_SHORTDATE, &systemtime,
|
||||||
NULL, bufstr, sizeof(bufstr)/sizeof(bufstr[0]) ))
|
NULL, bufstr, sizeof(bufstr)/sizeof(bufstr[0]) ))
|
||||||
MSI_SetPropertyW( package->db, szDate, bufstr );
|
msi_set_property( package->db, szDate, bufstr );
|
||||||
else
|
else
|
||||||
ERR("Couldn't set Date property: GetDateFormat failed with error %d\n", GetLastError());
|
ERR("Couldn't set Date property: GetDateFormat failed with error %d\n", GetLastError());
|
||||||
|
|
||||||
|
@ -867,7 +867,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
||||||
TIME_FORCE24HOURFORMAT | TIME_NOTIMEMARKER,
|
TIME_FORCE24HOURFORMAT | TIME_NOTIMEMARKER,
|
||||||
&systemtime, NULL, bufstr,
|
&systemtime, NULL, bufstr,
|
||||||
sizeof(bufstr)/sizeof(bufstr[0]) ))
|
sizeof(bufstr)/sizeof(bufstr[0]) ))
|
||||||
MSI_SetPropertyW( package->db, szTime, bufstr );
|
msi_set_property( package->db, szTime, bufstr );
|
||||||
else
|
else
|
||||||
ERR("Couldn't set Time property: GetTimeFormat failed with error %d\n", GetLastError());
|
ERR("Couldn't set Time property: GetTimeFormat failed with error %d\n", GetLastError());
|
||||||
|
|
||||||
|
@ -875,14 +875,14 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
||||||
|
|
||||||
langid = GetUserDefaultLangID();
|
langid = GetUserDefaultLangID();
|
||||||
sprintfW(bufstr, szIntFormat, langid);
|
sprintfW(bufstr, szIntFormat, langid);
|
||||||
MSI_SetPropertyW( package->db, szUserLangID, bufstr );
|
msi_set_property( package->db, szUserLangID, bufstr );
|
||||||
|
|
||||||
langid = GetSystemDefaultLangID();
|
langid = GetSystemDefaultLangID();
|
||||||
sprintfW(bufstr, szIntFormat, langid);
|
sprintfW(bufstr, szIntFormat, langid);
|
||||||
MSI_SetPropertyW( package->db, szSystemLangID, bufstr );
|
msi_set_property( package->db, szSystemLangID, bufstr );
|
||||||
|
|
||||||
sprintfW(bufstr, szIntFormat, MsiQueryProductStateW(package->ProductCode));
|
sprintfW(bufstr, szIntFormat, MsiQueryProductStateW(package->ProductCode));
|
||||||
MSI_SetPropertyW( package->db, szProductState, bufstr );
|
msi_set_property( package->db, szProductState, bufstr );
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
if (!GetUserNameW( NULL, &len ) && GetLastError() == ERROR_MORE_DATA)
|
if (!GetUserNameW( NULL, &len ) && GetLastError() == ERROR_MORE_DATA)
|
||||||
|
@ -891,7 +891,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
||||||
if ((username = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
|
if ((username = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
|
||||||
{
|
{
|
||||||
if (GetUserNameW( username, &len ))
|
if (GetUserNameW( username, &len ))
|
||||||
MSI_SetPropertyW( package->db, szLogonUser, username );
|
msi_set_property( package->db, szLogonUser, username );
|
||||||
HeapFree( GetProcessHeap(), 0, username );
|
HeapFree( GetProcessHeap(), 0, username );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -950,7 +950,7 @@ static UINT msi_load_summary_properties( MSIPACKAGE *package )
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
MSI_SetPropertyW( package->db, szPackageCode, package_code );
|
msi_set_property( package->db, szPackageCode, package_code );
|
||||||
msi_free( package_code );
|
msi_free( package_code );
|
||||||
|
|
||||||
/* load package attributes */
|
/* load package attributes */
|
||||||
|
@ -1014,7 +1014,7 @@ static void adjust_allusers_property( MSIPACKAGE *package )
|
||||||
if (msi_get_property_int( package->db, szAllUsers, 0 ) == 2)
|
if (msi_get_property_int( package->db, szAllUsers, 0 ) == 2)
|
||||||
{
|
{
|
||||||
TRACE("resetting ALLUSERS property from 2 to 1\n");
|
TRACE("resetting ALLUSERS property from 2 to 1\n");
|
||||||
MSI_SetPropertyW( package->db, szAllUsers, szOne );
|
msi_set_property( package->db, szAllUsers, szOne );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1046,7 +1046,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
|
||||||
set_installer_properties( package );
|
set_installer_properties( package );
|
||||||
|
|
||||||
sprintfW(uilevel,szpi,gUILevel);
|
sprintfW(uilevel,szpi,gUILevel);
|
||||||
MSI_SetPropertyW(package->db, szLevel, uilevel);
|
msi_set_property(package->db, szLevel, uilevel);
|
||||||
|
|
||||||
r = msi_load_summary_properties( package );
|
r = msi_load_summary_properties( package );
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
|
@ -1271,18 +1271,18 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
|
||||||
if( file != szPackage )
|
if( file != szPackage )
|
||||||
track_tempfile( package, file );
|
track_tempfile( package, file );
|
||||||
|
|
||||||
MSI_SetPropertyW( package->db, Database, db->path );
|
msi_set_property( package->db, Database, db->path );
|
||||||
|
|
||||||
if( UrlIsW( szPackage, URLIS_URL ) )
|
if( UrlIsW( szPackage, URLIS_URL ) )
|
||||||
MSI_SetPropertyW( package->db, OriginalDatabase, szPackage );
|
msi_set_property( package->db, OriginalDatabase, szPackage );
|
||||||
else if( szPackage[0] == '#' )
|
else if( szPackage[0] == '#' )
|
||||||
MSI_SetPropertyW( package->db, OriginalDatabase, db->path );
|
msi_set_property( package->db, OriginalDatabase, db->path );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WCHAR fullpath[MAX_PATH];
|
WCHAR fullpath[MAX_PATH];
|
||||||
|
|
||||||
GetFullPathNameW( szPackage, MAX_PATH, fullpath, NULL );
|
GetFullPathNameW( szPackage, MAX_PATH, fullpath, NULL );
|
||||||
MSI_SetPropertyW( package->db, OriginalDatabase, fullpath );
|
msi_set_property( package->db, OriginalDatabase, fullpath );
|
||||||
}
|
}
|
||||||
|
|
||||||
package->script = msi_alloc_zero( sizeof(MSISCRIPT) );
|
package->script = msi_alloc_zero( sizeof(MSISCRIPT) );
|
||||||
|
@ -1648,7 +1648,7 @@ void msi_reset_folders( MSIPACKAGE *package, BOOL source )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT MSI_SetPropertyW( MSIDATABASE *db, LPCWSTR szName, LPCWSTR szValue )
|
UINT msi_set_property( MSIDATABASE *db, LPCWSTR szName, LPCWSTR szValue )
|
||||||
{
|
{
|
||||||
MSIQUERY *view;
|
MSIQUERY *view;
|
||||||
MSIRECORD *row = NULL;
|
MSIRECORD *row = NULL;
|
||||||
|
@ -1681,7 +1681,7 @@ UINT MSI_SetPropertyW( MSIDATABASE *db, LPCWSTR szName, LPCWSTR szValue )
|
||||||
if (!szName[0])
|
if (!szName[0])
|
||||||
return szValue ? ERROR_FUNCTION_FAILED : ERROR_SUCCESS;
|
return szValue ? ERROR_FUNCTION_FAILED : ERROR_SUCCESS;
|
||||||
|
|
||||||
rc = MSI_GetPropertyW(db, szName, 0, &sz);
|
rc = msi_get_property(db, szName, 0, &sz);
|
||||||
if (!szValue || !*szValue)
|
if (!szValue || !*szValue)
|
||||||
{
|
{
|
||||||
sprintfW(Query, Delete, szName);
|
sprintfW(Query, Delete, szName);
|
||||||
|
@ -1759,7 +1759,7 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = MSI_SetPropertyW( package->db, szName, szValue );
|
ret = msi_set_property( package->db, szName, szValue );
|
||||||
if (ret == ERROR_SUCCESS && !strcmpW( szName, cszSourceDir ))
|
if (ret == ERROR_SUCCESS && !strcmpW( szName, cszSourceDir ))
|
||||||
msi_reset_folders( package, TRUE );
|
msi_reset_folders( package, TRUE );
|
||||||
|
|
||||||
|
@ -1767,7 +1767,7 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static MSIRECORD *MSI_GetPropertyRow( MSIDATABASE *db, LPCWSTR name )
|
static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
|
||||||
{
|
{
|
||||||
MSIQUERY *view;
|
MSIQUERY *view;
|
||||||
MSIRECORD *rec, *row = NULL;
|
MSIRECORD *rec, *row = NULL;
|
||||||
|
@ -1802,13 +1802,13 @@ static MSIRECORD *MSI_GetPropertyRow( MSIDATABASE *db, LPCWSTR name )
|
||||||
}
|
}
|
||||||
|
|
||||||
/* internal function, not compatible with MsiGetPropertyW */
|
/* internal function, not compatible with MsiGetPropertyW */
|
||||||
UINT MSI_GetPropertyW( MSIDATABASE *db, LPCWSTR szName,
|
UINT msi_get_property( MSIDATABASE *db, LPCWSTR szName,
|
||||||
LPWSTR szValueBuf, LPDWORD pchValueBuf )
|
LPWSTR szValueBuf, LPDWORD pchValueBuf )
|
||||||
{
|
{
|
||||||
MSIRECORD *row;
|
MSIRECORD *row;
|
||||||
UINT rc = ERROR_FUNCTION_FAILED;
|
UINT rc = ERROR_FUNCTION_FAILED;
|
||||||
|
|
||||||
row = MSI_GetPropertyRow( db, szName );
|
row = msi_get_property_row( db, szName );
|
||||||
|
|
||||||
if (*pchValueBuf > 0)
|
if (*pchValueBuf > 0)
|
||||||
szValueBuf[0] = 0;
|
szValueBuf[0] = 0;
|
||||||
|
@ -1840,13 +1840,13 @@ LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop)
|
||||||
LPWSTR str;
|
LPWSTR str;
|
||||||
UINT r;
|
UINT r;
|
||||||
|
|
||||||
r = MSI_GetPropertyW(db, prop, NULL, &sz);
|
r = msi_get_property(db, prop, NULL, &sz);
|
||||||
if (r != ERROR_SUCCESS && r != ERROR_MORE_DATA)
|
if (r != ERROR_SUCCESS && r != ERROR_MORE_DATA)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
sz++;
|
sz++;
|
||||||
str = msi_alloc(sz * sizeof(WCHAR));
|
str = msi_alloc(sz * sizeof(WCHAR));
|
||||||
r = MSI_GetPropertyW(db, prop, str, &sz);
|
r = msi_get_property(db, prop, str, &sz);
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
msi_free(str);
|
msi_free(str);
|
||||||
|
@ -1937,7 +1937,7 @@ done:
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
row = MSI_GetPropertyRow( package->db, name );
|
row = msi_get_property_row( package->db, name );
|
||||||
if (row)
|
if (row)
|
||||||
val = MSI_RecordGetString( row, 1 );
|
val = MSI_RecordGetString( row, 1 );
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
|
||||||
newprop[0] = 0;
|
newprop[0] = 0;
|
||||||
strcatW(newprop,productid);
|
strcatW(newprop,productid);
|
||||||
|
|
||||||
r = MSI_SetPropertyW( package->db, action_property, newprop );
|
r = msi_set_property( package->db, action_property, newprop );
|
||||||
if (r == ERROR_SUCCESS && !strcmpW( action_property, cszSourceDir ))
|
if (r == ERROR_SUCCESS && !strcmpW( action_property, cszSourceDir ))
|
||||||
msi_reset_folders( package, TRUE );
|
msi_reset_folders( package, TRUE );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue