mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:22:58 +00:00
[MSI] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73339
This commit is contained in:
parent
08824abdc1
commit
687517808b
12 changed files with 423 additions and 388 deletions
|
@ -129,6 +129,8 @@ 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[] =
|
static const WCHAR szUnpublishFeatures[] =
|
||||||
{'U','n','p','u','b','l','i','s','h','F','e','a','t','u','r','e','s',0};
|
{'U','n','p','u','b','l','i','s','h','F','e','a','t','u','r','e','s',0};
|
||||||
|
static const WCHAR szUnpublishProduct[] =
|
||||||
|
{'U','n','p','u','b','l','i','s','h','P','r','o','d','u','c','t',0};
|
||||||
static const WCHAR szUnregisterComPlus[] =
|
static const WCHAR szUnregisterComPlus[] =
|
||||||
{'U','n','r','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0};
|
{'U','n','r','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0};
|
||||||
static const WCHAR szUnregisterTypeLibraries[] =
|
static const WCHAR szUnregisterTypeLibraries[] =
|
||||||
|
@ -3490,14 +3492,14 @@ static WCHAR *build_full_keypath( MSIPACKAGE *package, MSICOMPONENT *comp )
|
||||||
|
|
||||||
static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
|
static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE], squished_cc[GUID_SIZE];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE], squashed_cc[SQUASHED_GUID_SIZE];
|
||||||
UINT rc;
|
UINT rc;
|
||||||
MSICOMPONENT *comp;
|
MSICOMPONENT *comp;
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
|
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
|
||||||
squash_guid(package->ProductCode,squished_pc);
|
squash_guid( package->ProductCode, squashed_pc );
|
||||||
msi_set_sourcedir_props(package, FALSE);
|
msi_set_sourcedir_props(package, FALSE);
|
||||||
|
|
||||||
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
|
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
|
||||||
|
@ -3509,7 +3511,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
|
||||||
if (!comp->ComponentId)
|
if (!comp->ComponentId)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
squash_guid( comp->ComponentId, squished_cc );
|
squash_guid( comp->ComponentId, squashed_cc );
|
||||||
msi_free( comp->FullKeypath );
|
msi_free( comp->FullKeypath );
|
||||||
comp->FullKeypath = build_full_keypath( package, comp );
|
comp->FullKeypath = build_full_keypath( package, comp );
|
||||||
|
|
||||||
|
@ -3519,7 +3521,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
|
||||||
else action = comp->ActionRequest;
|
else action = comp->ActionRequest;
|
||||||
|
|
||||||
TRACE("Component %s (%s) Keypath=%s RefCount=%u Clients=%u Action=%u\n",
|
TRACE("Component %s (%s) Keypath=%s RefCount=%u Clients=%u Action=%u\n",
|
||||||
debugstr_w(comp->Component), debugstr_w(squished_cc),
|
debugstr_w(comp->Component), debugstr_w(squashed_cc),
|
||||||
debugstr_w(comp->FullKeypath), comp->RefCount, comp->num_clients, action);
|
debugstr_w(comp->FullKeypath), comp->RefCount, comp->num_clients, action);
|
||||||
|
|
||||||
if (action == INSTALLSTATE_LOCAL || action == INSTALLSTATE_SOURCE)
|
if (action == INSTALLSTATE_LOCAL || action == INSTALLSTATE_SOURCE)
|
||||||
|
@ -3542,7 +3544,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
|
||||||
msi_reg_set_val_str(hkey, szPermKey, comp->FullKeypath);
|
msi_reg_set_val_str(hkey, szPermKey, comp->FullKeypath);
|
||||||
}
|
}
|
||||||
if (action == INSTALLSTATE_LOCAL)
|
if (action == INSTALLSTATE_LOCAL)
|
||||||
msi_reg_set_val_str(hkey, squished_pc, comp->FullKeypath);
|
msi_reg_set_val_str( hkey, squashed_pc, comp->FullKeypath );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MSIFILE *file;
|
MSIFILE *file;
|
||||||
|
@ -3579,7 +3581,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
|
||||||
lstrcpyW(ptr2, ptr);
|
lstrcpyW(ptr2, ptr);
|
||||||
msi_free(sourcepath);
|
msi_free(sourcepath);
|
||||||
|
|
||||||
msi_reg_set_val_str(hkey, squished_pc, source);
|
msi_reg_set_val_str( hkey, squashed_pc, source );
|
||||||
}
|
}
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
}
|
}
|
||||||
|
@ -3608,7 +3610,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
|
||||||
WARN( "failed to open component key %u\n", rc );
|
WARN( "failed to open component key %u\n", rc );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
res = RegDeleteValueW( hkey, squished_pc );
|
res = RegDeleteValueW( hkey, squashed_pc );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
if (res) WARN( "failed to delete component value %d\n", res );
|
if (res) WARN( "failed to delete component value %d\n", res );
|
||||||
}
|
}
|
||||||
|
@ -4206,15 +4208,6 @@ static UINT msi_publish_sourcelist(MSIPACKAGE *package, HKEY hkey)
|
||||||
|
|
||||||
static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey)
|
static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey)
|
||||||
{
|
{
|
||||||
MSIHANDLE hdb, suminfo;
|
|
||||||
WCHAR guids[MAX_PATH];
|
|
||||||
WCHAR packcode[SQUISH_GUID_SIZE];
|
|
||||||
LPWSTR buffer;
|
|
||||||
LPWSTR ptr;
|
|
||||||
DWORD langid;
|
|
||||||
DWORD size;
|
|
||||||
UINT r;
|
|
||||||
|
|
||||||
static const WCHAR szARPProductIcon[] =
|
static const WCHAR szARPProductIcon[] =
|
||||||
{'A','R','P','P','R','O','D','U','C','T','I','C','O','N',0};
|
{'A','R','P','P','R','O','D','U','C','T','I','C','O','N',0};
|
||||||
static const WCHAR szAssignment[] =
|
static const WCHAR szAssignment[] =
|
||||||
|
@ -4224,6 +4217,10 @@ static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey)
|
||||||
static const WCHAR szClients[] =
|
static const WCHAR szClients[] =
|
||||||
{'C','l','i','e','n','t','s',0};
|
{'C','l','i','e','n','t','s',0};
|
||||||
static const WCHAR szColon[] = {':',0};
|
static const WCHAR szColon[] = {':',0};
|
||||||
|
MSIHANDLE hdb, suminfo;
|
||||||
|
WCHAR *buffer, *ptr, guids[MAX_PATH], packcode[SQUASHED_GUID_SIZE];
|
||||||
|
DWORD langid, size;
|
||||||
|
UINT r;
|
||||||
|
|
||||||
buffer = msi_dup_property(package->db, INSTALLPROPERTY_PRODUCTNAMEW);
|
buffer = msi_dup_property(package->db, INSTALLPROPERTY_PRODUCTNAMEW);
|
||||||
msi_reg_set_val_str(hkey, INSTALLPROPERTY_PRODUCTNAMEW, buffer);
|
msi_reg_set_val_str(hkey, INSTALLPROPERTY_PRODUCTNAMEW, buffer);
|
||||||
|
@ -4286,8 +4283,7 @@ static UINT msi_publish_upgrade_code(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
UINT r;
|
UINT r;
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
LPWSTR upgrade;
|
WCHAR *upgrade, squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
WCHAR squashed_pc[SQUISH_GUID_SIZE];
|
|
||||||
|
|
||||||
upgrade = msi_dup_property(package->db, szUpgradeCode);
|
upgrade = msi_dup_property(package->db, szUpgradeCode);
|
||||||
if (!upgrade)
|
if (!upgrade)
|
||||||
|
@ -5186,9 +5182,8 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
|
||||||
|
|
||||||
static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
|
static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
WCHAR squashed_pc[SQUISH_GUID_SIZE];
|
WCHAR *upgrade_code, squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
MSIRECORD *uirow;
|
MSIRECORD *uirow;
|
||||||
LPWSTR upgrade_code;
|
|
||||||
HKEY hkey, props, upgrade_key;
|
HKEY hkey, props, upgrade_key;
|
||||||
UINT rc;
|
UINT rc;
|
||||||
|
|
||||||
|
@ -5281,31 +5276,50 @@ static UINT msi_unpublish_icons( MSIPACKAGE *package )
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT msi_unpublish_product( MSIPACKAGE *package, const WCHAR *remove )
|
static void remove_product_upgrade_code( MSIPACKAGE *package )
|
||||||
|
{
|
||||||
|
WCHAR *code, product[SQUASHED_GUID_SIZE];
|
||||||
|
HKEY hkey;
|
||||||
|
LONG res;
|
||||||
|
DWORD count;
|
||||||
|
|
||||||
|
squash_guid( package->ProductCode, product );
|
||||||
|
if (!(code = msi_dup_property( package->db, szUpgradeCode )))
|
||||||
|
{
|
||||||
|
WARN( "upgrade code not found\n" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!MSIREG_OpenUpgradeCodesKey( code, &hkey, FALSE ))
|
||||||
|
{
|
||||||
|
RegDeleteValueW( hkey, product );
|
||||||
|
res = RegQueryInfoKeyW( hkey, NULL, NULL, NULL, NULL, NULL, &count, NULL, NULL, NULL, NULL, NULL );
|
||||||
|
RegCloseKey( hkey );
|
||||||
|
if (!res && !count) MSIREG_DeleteUpgradeCodesKey( code );
|
||||||
|
}
|
||||||
|
if (!MSIREG_OpenUserUpgradeCodesKey( code, &hkey, FALSE ))
|
||||||
|
{
|
||||||
|
RegDeleteValueW( hkey, product );
|
||||||
|
res = RegQueryInfoKeyW( hkey, NULL, NULL, NULL, NULL, NULL, &count, NULL, NULL, NULL, NULL, NULL );
|
||||||
|
RegCloseKey( hkey );
|
||||||
|
if (!res && !count) MSIREG_DeleteUserUpgradeCodesKey( code );
|
||||||
|
}
|
||||||
|
if (!MSIREG_OpenClassesUpgradeCodesKey( code, &hkey, FALSE ))
|
||||||
|
{
|
||||||
|
RegDeleteValueW( hkey, product );
|
||||||
|
res = RegQueryInfoKeyW( hkey, NULL, NULL, NULL, NULL, NULL, &count, NULL, NULL, NULL, NULL, NULL );
|
||||||
|
RegCloseKey( hkey );
|
||||||
|
if (!res && !count) MSIREG_DeleteClassesUpgradeCodesKey( code );
|
||||||
|
}
|
||||||
|
|
||||||
|
msi_free( code );
|
||||||
|
}
|
||||||
|
|
||||||
|
static UINT ACTION_UnpublishProduct(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
static const WCHAR szUpgradeCode[] = {'U','p','g','r','a','d','e','C','o','d','e',0};
|
|
||||||
WCHAR *upgrade, **features;
|
|
||||||
BOOL full_uninstall = TRUE;
|
|
||||||
MSIFEATURE *feature;
|
|
||||||
MSIPATCHINFO *patch;
|
MSIPATCHINFO *patch;
|
||||||
UINT i;
|
|
||||||
|
|
||||||
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
|
|
||||||
{
|
|
||||||
if (feature->Action == INSTALLSTATE_LOCAL) full_uninstall = FALSE;
|
|
||||||
}
|
|
||||||
features = msi_split_string( remove, ',' );
|
|
||||||
for (i = 0; features && features[i]; i++)
|
|
||||||
{
|
|
||||||
if (!strcmpW( features[i], szAll )) full_uninstall = TRUE;
|
|
||||||
}
|
|
||||||
msi_free(features);
|
|
||||||
|
|
||||||
if (!full_uninstall)
|
|
||||||
return ERROR_SUCCESS;
|
|
||||||
|
|
||||||
MSIREG_DeleteProductKey(package->ProductCode);
|
MSIREG_DeleteProductKey(package->ProductCode);
|
||||||
MSIREG_DeleteUserDataProductKey(package->ProductCode);
|
MSIREG_DeleteUserDataProductKey(package->ProductCode, package->Context);
|
||||||
MSIREG_DeleteUninstallKey(package->ProductCode, package->platform);
|
MSIREG_DeleteUninstallKey(package->ProductCode, package->platform);
|
||||||
|
|
||||||
MSIREG_DeleteLocalClassesProductKey(package->ProductCode);
|
MSIREG_DeleteLocalClassesProductKey(package->ProductCode);
|
||||||
|
@ -5313,13 +5327,7 @@ static UINT msi_unpublish_product( MSIPACKAGE *package, const WCHAR *remove )
|
||||||
MSIREG_DeleteUserProductKey(package->ProductCode);
|
MSIREG_DeleteUserProductKey(package->ProductCode);
|
||||||
MSIREG_DeleteUserFeaturesKey(package->ProductCode);
|
MSIREG_DeleteUserFeaturesKey(package->ProductCode);
|
||||||
|
|
||||||
upgrade = msi_dup_property(package->db, szUpgradeCode);
|
remove_product_upgrade_code( package );
|
||||||
if (upgrade)
|
|
||||||
{
|
|
||||||
MSIREG_DeleteUserUpgradeCodesKey(upgrade);
|
|
||||||
MSIREG_DeleteClassesUpgradeCodesKey(upgrade);
|
|
||||||
msi_free(upgrade);
|
|
||||||
}
|
|
||||||
|
|
||||||
LIST_FOR_EACH_ENTRY(patch, &package->patches, MSIPATCHINFO, entry)
|
LIST_FOR_EACH_ENTRY(patch, &package->patches, MSIPATCHINFO, entry)
|
||||||
{
|
{
|
||||||
|
@ -5338,10 +5346,32 @@ static UINT msi_unpublish_product( MSIPACKAGE *package, const WCHAR *remove )
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL is_full_uninstall( MSIPACKAGE *package )
|
||||||
|
{
|
||||||
|
WCHAR **features, *remove = msi_dup_property( package->db, szRemove );
|
||||||
|
MSIFEATURE *feature;
|
||||||
|
BOOL ret = TRUE;
|
||||||
|
UINT i;
|
||||||
|
|
||||||
|
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
|
||||||
|
{
|
||||||
|
if (feature->Action == INSTALLSTATE_LOCAL) ret = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
features = msi_split_string( remove, ',' );
|
||||||
|
for (i = 0; features && features[i]; i++)
|
||||||
|
{
|
||||||
|
if (!strcmpW( features[i], szAll )) ret = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
msi_free(features);
|
||||||
|
msi_free(remove);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static UINT ACTION_InstallFinalize(MSIPACKAGE *package)
|
static UINT ACTION_InstallFinalize(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
UINT rc;
|
UINT rc;
|
||||||
WCHAR *remove;
|
|
||||||
|
|
||||||
/* first do the same as an InstallExecute */
|
/* first do the same as an InstallExecute */
|
||||||
rc = execute_script(package, SCRIPT_INSTALL);
|
rc = execute_script(package, SCRIPT_INSTALL);
|
||||||
|
@ -5353,9 +5383,9 @@ static UINT ACTION_InstallFinalize(MSIPACKAGE *package)
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
remove = msi_dup_property(package->db, szRemove);
|
if (is_full_uninstall(package))
|
||||||
rc = msi_unpublish_product(package, remove);
|
rc = ACTION_UnpublishProduct(package);
|
||||||
msi_free(remove);
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5383,26 +5413,24 @@ UINT ACTION_ForceReboot(MSIPACKAGE *package)
|
||||||
'/','I',' ','\"','%','s','\"',' ',
|
'/','I',' ','\"','%','s','\"',' ',
|
||||||
'A','F','T','E','R','R','E','B','O','O','T','=','1',' ',
|
'A','F','T','E','R','R','E','B','O','O','T','=','1',' ',
|
||||||
'R','U','N','O','N','C','E','E','N','T','R','Y','=','\"','%','s','\"',0};
|
'R','U','N','O','N','C','E','E','N','T','R','Y','=','\"','%','s','\"',0};
|
||||||
WCHAR buffer[256], sysdir[MAX_PATH];
|
WCHAR buffer[256], sysdir[MAX_PATH], squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
WCHAR squished_pc[100];
|
|
||||||
|
|
||||||
squash_guid(package->ProductCode,squished_pc);
|
squash_guid( package->ProductCode, squashed_pc );
|
||||||
|
|
||||||
GetSystemDirectoryW(sysdir, sizeof(sysdir)/sizeof(sysdir[0]));
|
GetSystemDirectoryW(sysdir, sizeof(sysdir)/sizeof(sysdir[0]));
|
||||||
RegCreateKeyW(HKEY_LOCAL_MACHINE,RunOnce,&hkey);
|
RegCreateKeyW(HKEY_LOCAL_MACHINE,RunOnce,&hkey);
|
||||||
snprintfW(buffer,sizeof(buffer)/sizeof(buffer[0]),msiexec_fmt,sysdir,
|
snprintfW( buffer, sizeof(buffer)/sizeof(buffer[0]), msiexec_fmt, sysdir, squashed_pc );
|
||||||
squished_pc);
|
|
||||||
|
|
||||||
msi_reg_set_val_str( hkey, squished_pc, buffer );
|
msi_reg_set_val_str( hkey, squashed_pc, buffer );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
TRACE("Reboot command %s\n",debugstr_w(buffer));
|
TRACE("Reboot command %s\n",debugstr_w(buffer));
|
||||||
|
|
||||||
RegCreateKeyW(HKEY_LOCAL_MACHINE,InstallRunOnce,&hkey);
|
RegCreateKeyW(HKEY_LOCAL_MACHINE,InstallRunOnce,&hkey);
|
||||||
sprintfW(buffer,install_fmt,package->ProductCode,squished_pc);
|
sprintfW( buffer, install_fmt, package->ProductCode, squashed_pc );
|
||||||
|
|
||||||
msi_reg_set_val_str( hkey, squished_pc, buffer );
|
msi_reg_set_val_str( hkey, squashed_pc, buffer );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
return ERROR_INSTALL_SUSPEND;
|
return ERROR_INSTALL_SUSPEND;
|
||||||
|
@ -5524,7 +5552,7 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package)
|
||||||
|
|
||||||
if (msi_check_unpublish(package))
|
if (msi_check_unpublish(package))
|
||||||
{
|
{
|
||||||
MSIREG_DeleteUserDataProductKey(package->ProductCode);
|
MSIREG_DeleteUserDataProductKey(package->ProductCode, package->Context);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7391,7 +7419,8 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package )
|
||||||
static UINT ITERATE_RemoveExistingProducts( MSIRECORD *rec, LPVOID param )
|
static UINT ITERATE_RemoveExistingProducts( MSIRECORD *rec, LPVOID param )
|
||||||
{
|
{
|
||||||
static const WCHAR fmtW[] =
|
static const WCHAR fmtW[] =
|
||||||
{'m','s','i','e','x','e','c',' ','/','i',' ','%','s',' ','R','E','M','O','V','E','=','%','s',0};
|
{'m','s','i','e','x','e','c',' ','/','q','n',' ','/','i',' ','%','s',' ',
|
||||||
|
'R','E','M','O','V','E','=','%','s',0};
|
||||||
MSIPACKAGE *package = param;
|
MSIPACKAGE *package = param;
|
||||||
const WCHAR *property = MSI_RecordGetString( rec, 7 );
|
const WCHAR *property = MSI_RecordGetString( rec, 7 );
|
||||||
int attrs = MSI_RecordGetInteger( rec, 5 );
|
int attrs = MSI_RecordGetInteger( rec, 5 );
|
||||||
|
@ -7672,7 +7701,7 @@ StandardActions[] =
|
||||||
{ szProcessComponents, ACTION_ProcessComponents, szProcessComponents },
|
{ szProcessComponents, ACTION_ProcessComponents, szProcessComponents },
|
||||||
{ szPublishComponents, ACTION_PublishComponents, szUnpublishComponents },
|
{ szPublishComponents, ACTION_PublishComponents, szUnpublishComponents },
|
||||||
{ szPublishFeatures, ACTION_PublishFeatures, szUnpublishFeatures },
|
{ szPublishFeatures, ACTION_PublishFeatures, szUnpublishFeatures },
|
||||||
{ szPublishProduct, ACTION_PublishProduct, NULL },
|
{ szPublishProduct, ACTION_PublishProduct, szUnpublishProduct },
|
||||||
{ szRegisterClassInfo, ACTION_RegisterClassInfo, szUnregisterClassInfo },
|
{ szRegisterClassInfo, ACTION_RegisterClassInfo, szUnregisterClassInfo },
|
||||||
{ szRegisterComPlus, ACTION_RegisterComPlus, szUnregisterComPlus },
|
{ szRegisterComPlus, ACTION_RegisterComPlus, szUnregisterComPlus },
|
||||||
{ szRegisterExtensionInfo, ACTION_RegisterExtensionInfo, szUnregisterExtensionInfo },
|
{ szRegisterExtensionInfo, ACTION_RegisterExtensionInfo, szUnregisterExtensionInfo },
|
||||||
|
@ -7701,6 +7730,7 @@ StandardActions[] =
|
||||||
{ szStopServices, ACTION_StopServices, szStartServices },
|
{ szStopServices, ACTION_StopServices, szStartServices },
|
||||||
{ szUnpublishComponents, ACTION_UnpublishComponents, szPublishComponents },
|
{ szUnpublishComponents, ACTION_UnpublishComponents, szPublishComponents },
|
||||||
{ szUnpublishFeatures, ACTION_UnpublishFeatures, szPublishFeatures },
|
{ szUnpublishFeatures, ACTION_UnpublishFeatures, szPublishFeatures },
|
||||||
|
{ szUnpublishProduct, ACTION_UnpublishProduct, NULL }, /* for rollback only */
|
||||||
{ szUnregisterClassInfo, ACTION_UnregisterClassInfo, szRegisterClassInfo },
|
{ szUnregisterClassInfo, ACTION_UnregisterClassInfo, szRegisterClassInfo },
|
||||||
{ szUnregisterComPlus, ACTION_UnregisterComPlus, szRegisterComPlus },
|
{ szUnregisterComPlus, ACTION_UnregisterComPlus, szRegisterComPlus },
|
||||||
{ szUnregisterExtensionInfo, ACTION_UnregisterExtensionInfo, szRegisterExtensionInfo },
|
{ szUnregisterExtensionInfo, ACTION_UnregisterExtensionInfo, szRegisterExtensionInfo },
|
||||||
|
|
|
@ -273,7 +273,8 @@ static HRESULT WINAPI AutomationObject_GetIDsOfNames(
|
||||||
ITypeInfo *ti;
|
ITypeInfo *ti;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("(%p/%p)->(%p,%p,%d,%d,%p)\n", iface, This, riid, rgszNames, cNames, lcid, rgDispId);
|
TRACE("(%p/%p)->(%s, %p, %d, %d, %p)\n", iface, This,
|
||||||
|
debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
|
||||||
|
|
||||||
if (!IsEqualGUID(riid, &IID_NULL)) return E_INVALIDARG;
|
if (!IsEqualGUID(riid, &IID_NULL)) return E_INVALIDARG;
|
||||||
|
|
||||||
|
@ -316,7 +317,9 @@ static HRESULT WINAPI AutomationObject_Invoke(
|
||||||
BSTR bstrName = NULL;
|
BSTR bstrName = NULL;
|
||||||
ITypeInfo *ti;
|
ITypeInfo *ti;
|
||||||
|
|
||||||
TRACE("(%p/%p)->(%d,%p,%d,%d,%p,%p,%p,%p)\n", iface, This, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
TRACE("(%p/%p)->(%d, %s, %d, %d, %p, %p, %p, %p)\n", iface, This,
|
||||||
|
dispIdMember, debugstr_guid(riid), lcid, wFlags,
|
||||||
|
pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||||
|
|
||||||
if (!IsEqualIID(riid, &IID_NULL))
|
if (!IsEqualIID(riid, &IID_NULL))
|
||||||
{
|
{
|
||||||
|
@ -1012,7 +1015,7 @@ static HRESULT list_invoke(
|
||||||
EXCEPINFO* pExcepInfo,
|
EXCEPINFO* pExcepInfo,
|
||||||
UINT* puArgErr)
|
UINT* puArgErr)
|
||||||
{
|
{
|
||||||
ListObject *list = (ListObject*)This;
|
ListObject *list = CONTAINING_RECORD(This, ListObject, autoobj);
|
||||||
IUnknown *pUnk = NULL;
|
IUnknown *pUnk = NULL;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
@ -1060,7 +1063,7 @@ static HRESULT list_invoke(
|
||||||
|
|
||||||
static void list_free(AutomationObject *This)
|
static void list_free(AutomationObject *This)
|
||||||
{
|
{
|
||||||
ListObject *list = (ListObject*)This;
|
ListObject *list = CONTAINING_RECORD(This, ListObject, autoobj);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < list->count; i++)
|
for (i = 0; i < list->count; i++)
|
||||||
|
@ -1348,7 +1351,7 @@ static HRESULT session_invoke(
|
||||||
EXCEPINFO* pExcepInfo,
|
EXCEPINFO* pExcepInfo,
|
||||||
UINT* puArgErr)
|
UINT* puArgErr)
|
||||||
{
|
{
|
||||||
SessionObject *session = (SessionObject*)This;
|
SessionObject *session = CONTAINING_RECORD(This, SessionObject, autoobj);
|
||||||
WCHAR *szString;
|
WCHAR *szString;
|
||||||
DWORD dwLen = 0;
|
DWORD dwLen = 0;
|
||||||
MSIHANDLE msiHandle;
|
MSIHANDLE msiHandle;
|
||||||
|
|
|
@ -549,7 +549,7 @@ static LPWSTR msi_build_createsql_columns(LPWSTR *columns_data, LPWSTR *types, D
|
||||||
static LPWSTR msi_build_createsql_postlude(LPWSTR *primary_keys, DWORD num_keys)
|
static LPWSTR msi_build_createsql_postlude(LPWSTR *primary_keys, DWORD num_keys)
|
||||||
{
|
{
|
||||||
LPWSTR postlude, keys, ptr;
|
LPWSTR postlude, keys, ptr;
|
||||||
DWORD size, key_size, i;
|
DWORD size, i;
|
||||||
|
|
||||||
static const WCHAR key_fmt[] = {'`','%','s','`',',',' ',0};
|
static const WCHAR key_fmt[] = {'`','%','s','`',',',' ',0};
|
||||||
static const WCHAR postlude_fmt[] = {'P','R','I','M','A','R','Y',' ','K','E','Y',' ','%','s',')',0};
|
static const WCHAR postlude_fmt[] = {'P','R','I','M','A','R','Y',' ','K','E','Y',' ','%','s',')',0};
|
||||||
|
@ -563,9 +563,7 @@ static LPWSTR msi_build_createsql_postlude(LPWSTR *primary_keys, DWORD num_keys)
|
||||||
|
|
||||||
for (i = 0, ptr = keys; i < num_keys; i++)
|
for (i = 0, ptr = keys; i < num_keys; i++)
|
||||||
{
|
{
|
||||||
key_size = lstrlenW(key_fmt) + lstrlenW(primary_keys[i]) -2;
|
ptr += sprintfW(ptr, key_fmt, primary_keys[i]);
|
||||||
sprintfW(ptr, key_fmt, primary_keys[i]);
|
|
||||||
ptr += key_size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove final ', ' */
|
/* remove final ', ' */
|
||||||
|
|
|
@ -123,10 +123,10 @@ done:
|
||||||
UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
|
UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
|
||||||
{
|
{
|
||||||
MSIPACKAGE *package = NULL;
|
MSIPACKAGE *package = NULL;
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
UINT r;
|
UINT r;
|
||||||
|
|
||||||
if (!szProduct || !squash_guid(szProduct, squished_pc))
|
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!phProduct)
|
if (!phProduct)
|
||||||
|
@ -987,16 +987,15 @@ UINT WINAPI MsiGetProductCodeW(LPCWSTR szComponent, LPWSTR szBuffer)
|
||||||
{
|
{
|
||||||
UINT rc, index;
|
UINT rc, index;
|
||||||
HKEY compkey, prodkey;
|
HKEY compkey, prodkey;
|
||||||
WCHAR squished_comp[GUID_SIZE];
|
WCHAR squashed_comp[SQUASHED_GUID_SIZE], squashed_prod[SQUASHED_GUID_SIZE];
|
||||||
WCHAR squished_prod[GUID_SIZE];
|
DWORD sz = sizeof(squashed_prod)/sizeof(squashed_prod[0]);
|
||||||
DWORD sz = GUID_SIZE;
|
|
||||||
|
|
||||||
TRACE("%s %p\n", debugstr_w(szComponent), szBuffer);
|
TRACE("%s %p\n", debugstr_w(szComponent), szBuffer);
|
||||||
|
|
||||||
if (!szComponent || !*szComponent)
|
if (!szComponent || !*szComponent)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!squash_guid(szComponent, squished_comp))
|
if (!squash_guid( szComponent, squashed_comp ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (MSIREG_OpenUserDataComponentKey(szComponent, NULL, &compkey, FALSE) != ERROR_SUCCESS &&
|
if (MSIREG_OpenUserDataComponentKey(szComponent, NULL, &compkey, FALSE) != ERROR_SUCCESS &&
|
||||||
|
@ -1005,7 +1004,7 @@ UINT WINAPI MsiGetProductCodeW(LPCWSTR szComponent, LPWSTR szBuffer)
|
||||||
return ERROR_UNKNOWN_COMPONENT;
|
return ERROR_UNKNOWN_COMPONENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = RegEnumValueW(compkey, 0, squished_prod, &sz, NULL, NULL, NULL, NULL);
|
rc = RegEnumValueW( compkey, 0, squashed_prod, &sz, NULL, NULL, NULL, NULL );
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
RegCloseKey(compkey);
|
RegCloseKey(compkey);
|
||||||
|
@ -1013,7 +1012,7 @@ UINT WINAPI MsiGetProductCodeW(LPCWSTR szComponent, LPWSTR szBuffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check simple case, only one product */
|
/* check simple case, only one product */
|
||||||
rc = RegEnumValueW(compkey, 1, squished_prod, &sz, NULL, NULL, NULL, NULL);
|
rc = RegEnumValueW( compkey, 1, squashed_prod, &sz, NULL, NULL, NULL, NULL );
|
||||||
if (rc == ERROR_NO_MORE_ITEMS)
|
if (rc == ERROR_NO_MORE_ITEMS)
|
||||||
{
|
{
|
||||||
rc = ERROR_SUCCESS;
|
rc = ERROR_SUCCESS;
|
||||||
|
@ -1021,12 +1020,12 @@ UINT WINAPI MsiGetProductCodeW(LPCWSTR szComponent, LPWSTR szBuffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
index = 0;
|
index = 0;
|
||||||
while ((rc = RegEnumValueW(compkey, index, squished_prod, &sz,
|
while ((rc = RegEnumValueW( compkey, index, squashed_prod, &sz, NULL, NULL, NULL, NULL )) !=
|
||||||
NULL, NULL, NULL, NULL)) != ERROR_NO_MORE_ITEMS)
|
ERROR_NO_MORE_ITEMS)
|
||||||
{
|
{
|
||||||
index++;
|
index++;
|
||||||
sz = GUID_SIZE;
|
sz = GUID_SIZE;
|
||||||
unsquash_guid(squished_prod, szBuffer);
|
unsquash_guid( squashed_prod, szBuffer );
|
||||||
|
|
||||||
if (MSIREG_OpenProductKey(szBuffer, NULL,
|
if (MSIREG_OpenProductKey(szBuffer, NULL,
|
||||||
MSIINSTALLCONTEXT_USERMANAGED,
|
MSIINSTALLCONTEXT_USERMANAGED,
|
||||||
|
@ -1048,7 +1047,7 @@ UINT WINAPI MsiGetProductCodeW(LPCWSTR szComponent, LPWSTR szBuffer)
|
||||||
|
|
||||||
done:
|
done:
|
||||||
RegCloseKey(compkey);
|
RegCloseKey(compkey);
|
||||||
unsquash_guid(squished_prod, szBuffer);
|
unsquash_guid( squashed_prod, szBuffer );
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1085,9 +1084,7 @@ static UINT MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute,
|
||||||
MSIINSTALLCONTEXT context = MSIINSTALLCONTEXT_USERUNMANAGED;
|
MSIINSTALLCONTEXT context = MSIINSTALLCONTEXT_USERUNMANAGED;
|
||||||
UINT r = ERROR_UNKNOWN_PROPERTY;
|
UINT r = ERROR_UNKNOWN_PROPERTY;
|
||||||
HKEY prodkey, userdata, source;
|
HKEY prodkey, userdata, source;
|
||||||
LPWSTR val = NULL;
|
WCHAR *val = NULL, squashed_pc[SQUASHED_GUID_SIZE], packagecode[SQUASHED_GUID_SIZE];
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
|
||||||
WCHAR packagecode[GUID_SIZE];
|
|
||||||
BOOL badconfig = FALSE;
|
BOOL badconfig = FALSE;
|
||||||
LONG res;
|
LONG res;
|
||||||
DWORD type = REG_NONE;
|
DWORD type = REG_NONE;
|
||||||
|
@ -1098,7 +1095,7 @@ static UINT MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute,
|
||||||
if ((szValue->str.w && !pcchValueBuf) || !szProduct || !szAttribute)
|
if ((szValue->str.w && !pcchValueBuf) || !szProduct || !szAttribute)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc))
|
if (!squash_guid( szProduct, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if ((r = MSIREG_OpenProductKey(szProduct, NULL,
|
if ((r = MSIREG_OpenProductKey(szProduct, NULL,
|
||||||
|
@ -1197,7 +1194,7 @@ static UINT MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute,
|
||||||
if (val != empty && type != REG_DWORD &&
|
if (val != empty && type != REG_DWORD &&
|
||||||
!strcmpW( szAttribute, INSTALLPROPERTY_PACKAGECODEW ))
|
!strcmpW( szAttribute, INSTALLPROPERTY_PACKAGECODEW ))
|
||||||
{
|
{
|
||||||
if (lstrlenW(val) != SQUISH_GUID_SIZE - 1)
|
if (lstrlenW( val ) != SQUASHED_GUID_SIZE - 1)
|
||||||
badconfig = TRUE;
|
badconfig = TRUE;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1387,15 +1384,6 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
|
||||||
MSIINSTALLCONTEXT dwContext, LPCWSTR szProperty,
|
MSIINSTALLCONTEXT dwContext, LPCWSTR szProperty,
|
||||||
LPWSTR szValue, LPDWORD pcchValue)
|
LPWSTR szValue, LPDWORD pcchValue)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
|
||||||
LPWSTR val = NULL;
|
|
||||||
LPCWSTR package = NULL;
|
|
||||||
HKEY props = NULL, prod;
|
|
||||||
HKEY classes = NULL, managed;
|
|
||||||
HKEY hkey = NULL;
|
|
||||||
DWORD type;
|
|
||||||
UINT r = ERROR_UNKNOWN_PRODUCT;
|
|
||||||
|
|
||||||
static const WCHAR five[] = {'5',0};
|
static const WCHAR five[] = {'5',0};
|
||||||
static const WCHAR displayname[] = {
|
static const WCHAR displayname[] = {
|
||||||
'D','i','s','p','l','a','y','N','a','m','e',0};
|
'D','i','s','p','l','a','y','N','a','m','e',0};
|
||||||
|
@ -1404,12 +1392,17 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
|
||||||
static const WCHAR managed_local_package[] = {
|
static const WCHAR managed_local_package[] = {
|
||||||
'M','a','n','a','g','e','d','L','o','c','a','l',
|
'M','a','n','a','g','e','d','L','o','c','a','l',
|
||||||
'P','a','c','k','a','g','e',0};
|
'P','a','c','k','a','g','e',0};
|
||||||
|
WCHAR *val = NULL, squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
|
LPCWSTR package = NULL;
|
||||||
|
HKEY props = NULL, prod, classes = NULL, managed, hkey = NULL;
|
||||||
|
DWORD type;
|
||||||
|
UINT r = ERROR_UNKNOWN_PRODUCT;
|
||||||
|
|
||||||
TRACE("(%s, %s, %d, %s, %p, %p)\n", debugstr_w(szProductCode),
|
TRACE("(%s, %s, %d, %s, %p, %p)\n", debugstr_w(szProductCode),
|
||||||
debugstr_w(szUserSid), dwContext, debugstr_w(szProperty),
|
debugstr_w(szUserSid), dwContext, debugstr_w(szProperty),
|
||||||
szValue, pcchValue);
|
szValue, pcchValue);
|
||||||
|
|
||||||
if (!szProductCode || !squash_guid(szProductCode, squished_pc))
|
if (!szProductCode || !squash_guid( szProductCode, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (szValue && !pcchValue)
|
if (szValue && !pcchValue)
|
||||||
|
@ -1649,28 +1642,25 @@ UINT WINAPI MsiGetPatchInfoExW(LPCWSTR szPatchCode, LPCWSTR szProductCode,
|
||||||
LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext,
|
LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext,
|
||||||
LPCWSTR szProperty, LPWSTR lpValue, DWORD *pcchValue)
|
LPCWSTR szProperty, LPWSTR lpValue, DWORD *pcchValue)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
static const WCHAR szManagedPackage[] =
|
||||||
WCHAR squished_patch[GUID_SIZE];
|
{'M','a','n','a','g','e','d','L','o','c','a','l','P','a','c','k','a','g','e',0};
|
||||||
|
WCHAR *val = NULL, squashed_pc[SQUASHED_GUID_SIZE], squashed_patch[SQUASHED_GUID_SIZE];
|
||||||
HKEY udprod = 0, prod = 0, props = 0;
|
HKEY udprod = 0, prod = 0, props = 0;
|
||||||
HKEY patch = 0, patches = 0;
|
HKEY patch = 0, patches = 0;
|
||||||
HKEY udpatch = 0, datakey = 0;
|
HKEY udpatch = 0, datakey = 0;
|
||||||
HKEY prodpatches = 0;
|
HKEY prodpatches = 0;
|
||||||
LPWSTR val = NULL;
|
|
||||||
UINT r = ERROR_UNKNOWN_PRODUCT;
|
UINT r = ERROR_UNKNOWN_PRODUCT;
|
||||||
DWORD len;
|
DWORD len;
|
||||||
LONG res;
|
LONG res;
|
||||||
|
|
||||||
static const WCHAR szManagedPackage[] = {'M','a','n','a','g','e','d',
|
|
||||||
'L','o','c','a','l','P','a','c','k','a','g','e',0};
|
|
||||||
|
|
||||||
TRACE("(%s, %s, %s, %d, %s, %p, %p)\n", debugstr_w(szPatchCode),
|
TRACE("(%s, %s, %s, %d, %s, %p, %p)\n", debugstr_w(szPatchCode),
|
||||||
debugstr_w(szProductCode), debugstr_w(szUserSid), dwContext,
|
debugstr_w(szProductCode), debugstr_w(szUserSid), dwContext,
|
||||||
debugstr_w(szProperty), lpValue, pcchValue);
|
debugstr_w(szProperty), lpValue, pcchValue);
|
||||||
|
|
||||||
if (!szProductCode || !squash_guid(szProductCode, squished_pc))
|
if (!szProductCode || !squash_guid( szProductCode, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!szPatchCode || !squash_guid(szPatchCode, squished_patch))
|
if (!szPatchCode || !squash_guid( szPatchCode, squashed_patch ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!szProperty)
|
if (!szProperty)
|
||||||
|
@ -1704,7 +1694,7 @@ UINT WINAPI MsiGetPatchInfoExW(LPCWSTR szPatchCode, LPCWSTR szProductCode,
|
||||||
if (res != ERROR_SUCCESS)
|
if (res != ERROR_SUCCESS)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
res = RegOpenKeyExW(patches, squished_patch, 0, KEY_WOW64_64KEY|KEY_READ, &patch);
|
res = RegOpenKeyExW( patches, squashed_patch, 0, KEY_WOW64_64KEY|KEY_READ, &patch );
|
||||||
if (res != ERROR_SUCCESS)
|
if (res != ERROR_SUCCESS)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
@ -1719,7 +1709,7 @@ UINT WINAPI MsiGetPatchInfoExW(LPCWSTR szPatchCode, LPCWSTR szProductCode,
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
datakey = prodpatches;
|
datakey = prodpatches;
|
||||||
szProperty = squished_patch;
|
szProperty = squashed_patch;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2115,7 +2105,7 @@ static BOOL msi_comp_find_package(LPCWSTR prodcode, MSIINSTALLCONTEXT context)
|
||||||
return (res == ERROR_SUCCESS);
|
return (res == ERROR_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT msi_comp_find_prodcode(LPWSTR squished_pc,
|
static UINT msi_comp_find_prodcode(WCHAR *squashed_pc,
|
||||||
MSIINSTALLCONTEXT context,
|
MSIINSTALLCONTEXT context,
|
||||||
LPCWSTR comp, LPWSTR val, DWORD *sz)
|
LPCWSTR comp, LPWSTR val, DWORD *sz)
|
||||||
{
|
{
|
||||||
|
@ -2131,7 +2121,7 @@ static UINT msi_comp_find_prodcode(LPWSTR squished_pc,
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
res = RegQueryValueExW(hkey, squished_pc, NULL, NULL, (BYTE *)val, sz);
|
res = RegQueryValueExW( hkey, squashed_pc, NULL, NULL, (BYTE *)val, sz );
|
||||||
if (res != ERROR_SUCCESS)
|
if (res != ERROR_SUCCESS)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
|
@ -2143,7 +2133,7 @@ UINT WINAPI MsiQueryComponentStateW(LPCWSTR szProductCode,
|
||||||
LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext,
|
LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext,
|
||||||
LPCWSTR szComponent, INSTALLSTATE *pdwState)
|
LPCWSTR szComponent, INSTALLSTATE *pdwState)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
BOOL found;
|
BOOL found;
|
||||||
DWORD sz;
|
DWORD sz;
|
||||||
|
|
||||||
|
@ -2156,7 +2146,7 @@ UINT WINAPI MsiQueryComponentStateW(LPCWSTR szProductCode,
|
||||||
if (!szProductCode || !*szProductCode || lstrlenW(szProductCode) != GUID_SIZE - 1)
|
if (!szProductCode || !*szProductCode || lstrlenW(szProductCode) != GUID_SIZE - 1)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!squash_guid(szProductCode, squished_pc))
|
if (!squash_guid( szProductCode, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
found = msi_comp_find_prod_key(szProductCode, dwContext);
|
found = msi_comp_find_prod_key(szProductCode, dwContext);
|
||||||
|
@ -2175,7 +2165,7 @@ UINT WINAPI MsiQueryComponentStateW(LPCWSTR szProductCode,
|
||||||
*pdwState = INSTALLSTATE_UNKNOWN;
|
*pdwState = INSTALLSTATE_UNKNOWN;
|
||||||
|
|
||||||
sz = 0;
|
sz = 0;
|
||||||
if (msi_comp_find_prodcode(squished_pc, dwContext, szComponent, NULL, &sz))
|
if (msi_comp_find_prodcode( squashed_pc, dwContext, szComponent, NULL, &sz ))
|
||||||
return ERROR_UNKNOWN_COMPONENT;
|
return ERROR_UNKNOWN_COMPONENT;
|
||||||
|
|
||||||
if (sz == 0)
|
if (sz == 0)
|
||||||
|
@ -2186,7 +2176,7 @@ UINT WINAPI MsiQueryComponentStateW(LPCWSTR szProductCode,
|
||||||
UINT r;
|
UINT r;
|
||||||
|
|
||||||
if (!(val = msi_alloc( sz ))) return ERROR_OUTOFMEMORY;
|
if (!(val = msi_alloc( sz ))) return ERROR_OUTOFMEMORY;
|
||||||
if ((r = msi_comp_find_prodcode(squished_pc, dwContext, szComponent, val, &sz)))
|
if ((r = msi_comp_find_prodcode( squashed_pc, dwContext, szComponent, val, &sz )))
|
||||||
{
|
{
|
||||||
msi_free(val);
|
msi_free(val);
|
||||||
return r;
|
return r;
|
||||||
|
@ -2519,7 +2509,7 @@ HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR path, DWORD flags, PCCERT
|
||||||
|
|
||||||
TRACE("%s %08x %p %p %p\n", debugstr_a(path), flags, cert, hash, hashlen);
|
TRACE("%s %08x %p %p %p\n", debugstr_a(path), flags, cert, hash, hashlen);
|
||||||
|
|
||||||
if (path && !(pathW = strdupAtoW( path ))) return ERROR_OUTOFMEMORY;
|
if (path && !(pathW = strdupAtoW( path ))) return E_OUTOFMEMORY;
|
||||||
r = MsiGetFileSignatureInformationW( pathW, flags, cert, hash, hashlen );
|
r = MsiGetFileSignatureInformationW( pathW, flags, cert, hash, hashlen );
|
||||||
msi_free( pathW );
|
msi_free( pathW );
|
||||||
return r;
|
return r;
|
||||||
|
@ -2769,10 +2759,8 @@ static INSTALLSTATE MSI_GetComponentPath(LPCWSTR szProduct, LPCWSTR szComponent,
|
||||||
{
|
{
|
||||||
static const WCHAR wininstaller[] =
|
static const WCHAR wininstaller[] =
|
||||||
{'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0};
|
{'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0};
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR *path = NULL, squashed_pc[SQUASHED_GUID_SIZE], squashed_comp[SQUASHED_GUID_SIZE];
|
||||||
WCHAR squished_comp[GUID_SIZE];
|
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
LPWSTR path = NULL;
|
|
||||||
INSTALLSTATE state;
|
INSTALLSTATE state;
|
||||||
DWORD version;
|
DWORD version;
|
||||||
|
|
||||||
|
@ -2782,8 +2770,7 @@ static INSTALLSTATE MSI_GetComponentPath(LPCWSTR szProduct, LPCWSTR szComponent,
|
||||||
if (lpPathBuf->str.w && !pcchBuf)
|
if (lpPathBuf->str.w && !pcchBuf)
|
||||||
return INSTALLSTATE_INVALIDARG;
|
return INSTALLSTATE_INVALIDARG;
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc) ||
|
if (!squash_guid( szProduct, squashed_pc ) || !squash_guid( szComponent, squashed_comp ))
|
||||||
!squash_guid(szComponent, squished_comp))
|
|
||||||
return INSTALLSTATE_INVALIDARG;
|
return INSTALLSTATE_INVALIDARG;
|
||||||
|
|
||||||
state = INSTALLSTATE_UNKNOWN;
|
state = INSTALLSTATE_UNKNOWN;
|
||||||
|
@ -2791,7 +2778,7 @@ static INSTALLSTATE MSI_GetComponentPath(LPCWSTR szProduct, LPCWSTR szComponent,
|
||||||
if (MSIREG_OpenUserDataComponentKey(szComponent, szLocalSid, &hkey, FALSE) == ERROR_SUCCESS ||
|
if (MSIREG_OpenUserDataComponentKey(szComponent, szLocalSid, &hkey, FALSE) == ERROR_SUCCESS ||
|
||||||
MSIREG_OpenUserDataComponentKey(szComponent, NULL, &hkey, FALSE) == ERROR_SUCCESS)
|
MSIREG_OpenUserDataComponentKey(szComponent, NULL, &hkey, FALSE) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
path = msi_reg_get_val_str(hkey, squished_pc);
|
path = msi_reg_get_val_str( hkey, squashed_pc );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
state = INSTALLSTATE_ABSENT;
|
state = INSTALLSTATE_ABSENT;
|
||||||
|
@ -2821,7 +2808,7 @@ static INSTALLSTATE MSI_GetComponentPath(LPCWSTR szProduct, LPCWSTR szComponent,
|
||||||
MSIREG_OpenUserDataComponentKey(szComponent, NULL, &hkey, FALSE) == ERROR_SUCCESS)
|
MSIREG_OpenUserDataComponentKey(szComponent, NULL, &hkey, FALSE) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
msi_free(path);
|
msi_free(path);
|
||||||
path = msi_reg_get_val_str(hkey, squished_pc);
|
path = msi_reg_get_val_str( hkey, squashed_pc );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
state = INSTALLSTATE_ABSENT;
|
state = INSTALLSTATE_ABSENT;
|
||||||
|
@ -3339,6 +3326,26 @@ INSTALLSTATE WINAPI MsiUseFeatureA( LPCSTR szProduct, LPCSTR szFeature )
|
||||||
return MsiUseFeatureExA(szProduct, szFeature, 0, 0);
|
return MsiUseFeatureExA(szProduct, szFeature, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WCHAR *reg_get_multisz( HKEY hkey, const WCHAR *name )
|
||||||
|
{
|
||||||
|
WCHAR *ret;
|
||||||
|
DWORD len, type;
|
||||||
|
if (RegQueryValueExW( hkey, name, NULL, &type, NULL, &len ) || type != REG_MULTI_SZ) return NULL;
|
||||||
|
if ((ret = msi_alloc( len ))) RegQueryValueExW( hkey, name, NULL, NULL, (BYTE *)ret, &len );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
WCHAR *reg_get_sz( HKEY hkey, const WCHAR *name )
|
||||||
|
{
|
||||||
|
WCHAR *ret;
|
||||||
|
DWORD len, type;
|
||||||
|
if (RegQueryValueExW( hkey, name, NULL, &type, NULL, &len ) || type != REG_SZ) return NULL;
|
||||||
|
if ((ret = msi_alloc( len ))) RegQueryValueExW( hkey, name, NULL, NULL, (BYTE *)ret, &len );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define BASE85_SIZE 20
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* MSI_ProvideQualifiedComponentEx [internal]
|
* MSI_ProvideQualifiedComponentEx [internal]
|
||||||
*/
|
*/
|
||||||
|
@ -3347,39 +3354,54 @@ static UINT MSI_ProvideQualifiedComponentEx(LPCWSTR szComponent,
|
||||||
DWORD Unused1, DWORD Unused2, awstring *lpPathBuf,
|
DWORD Unused1, DWORD Unused2, awstring *lpPathBuf,
|
||||||
LPDWORD pcchPathBuf)
|
LPDWORD pcchPathBuf)
|
||||||
{
|
{
|
||||||
WCHAR product[MAX_FEATURE_CHARS+1], component[MAX_FEATURE_CHARS+1],
|
WCHAR product[MAX_FEATURE_CHARS+1], comp[MAX_FEATURE_CHARS+1], feature[MAX_FEATURE_CHARS+1];
|
||||||
feature[MAX_FEATURE_CHARS+1];
|
WCHAR *desc;
|
||||||
LPWSTR info;
|
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
DWORD sz;
|
DWORD size;
|
||||||
UINT rc;
|
UINT ret;
|
||||||
INSTALLSTATE state;
|
INSTALLSTATE state;
|
||||||
|
|
||||||
rc = MSIREG_OpenUserComponentsKey(szComponent, &hkey, FALSE);
|
if (MSIREG_OpenUserComponentsKey( szComponent, &hkey, FALSE )) return ERROR_UNKNOWN_COMPONENT;
|
||||||
if (rc != ERROR_SUCCESS)
|
|
||||||
return ERROR_INDEX_ABSENT;
|
|
||||||
|
|
||||||
info = msi_reg_get_val_str( hkey, szQualifier );
|
desc = reg_get_multisz( hkey, szQualifier );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
if (!desc) return ERROR_INDEX_ABSENT;
|
||||||
|
|
||||||
if (!info)
|
/* FIXME: handle multiple descriptors */
|
||||||
return ERROR_INDEX_ABSENT;
|
ret = MsiDecomposeDescriptorW( desc, product, feature, comp, &size );
|
||||||
|
msi_free( desc );
|
||||||
|
if (ret != ERROR_SUCCESS) return ret;
|
||||||
|
|
||||||
MsiDecomposeDescriptorW(info, product, feature, component, &sz);
|
if (!szProduct) szProduct = product;
|
||||||
|
if (!comp[0])
|
||||||
|
{
|
||||||
|
MSIINSTALLCONTEXT ctx;
|
||||||
|
WCHAR *components;
|
||||||
|
GUID guid;
|
||||||
|
|
||||||
if (!szProduct)
|
/* use the first component of the feature if the descriptor component is empty */
|
||||||
state = MSI_GetComponentPath(product, component, lpPathBuf, pcchPathBuf);
|
if ((ret = msi_locate_product( szProduct, &ctx ))) return ret;
|
||||||
else
|
if ((ret = MSIREG_OpenUserDataFeaturesKey( szProduct, NULL, ctx, &hkey, FALSE )))
|
||||||
state = MSI_GetComponentPath(szProduct, component, lpPathBuf, pcchPathBuf);
|
{
|
||||||
|
|
||||||
msi_free( info );
|
|
||||||
|
|
||||||
if (state == INSTALLSTATE_MOREDATA)
|
|
||||||
return ERROR_MORE_DATA;
|
|
||||||
|
|
||||||
if (state != INSTALLSTATE_LOCAL)
|
|
||||||
return ERROR_FILE_NOT_FOUND;
|
return ERROR_FILE_NOT_FOUND;
|
||||||
|
}
|
||||||
|
components = reg_get_sz( hkey, feature );
|
||||||
|
RegCloseKey( hkey );
|
||||||
|
if (!components) return ERROR_FILE_NOT_FOUND;
|
||||||
|
|
||||||
|
if (strlenW( components ) < BASE85_SIZE || !decode_base85_guid( components, &guid ))
|
||||||
|
{
|
||||||
|
msi_free( components );
|
||||||
|
return ERROR_FILE_NOT_FOUND;
|
||||||
|
}
|
||||||
|
msi_free( components );
|
||||||
|
StringFromGUID2( &guid, comp, sizeof(comp)/sizeof(comp[0]) );
|
||||||
|
}
|
||||||
|
|
||||||
|
state = MSI_GetComponentPath( szProduct, comp, lpPathBuf, pcchPathBuf );
|
||||||
|
|
||||||
|
if (state == INSTALLSTATE_MOREDATA) return ERROR_MORE_DATA;
|
||||||
|
if (state != INSTALLSTATE_LOCAL) return ERROR_FILE_NOT_FOUND;
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3476,8 +3498,7 @@ static USERINFOSTATE MSI_GetUserInfo(LPCWSTR szProduct,
|
||||||
awstring *lpOrgNameBuf, LPDWORD pcchOrgNameBuf,
|
awstring *lpOrgNameBuf, LPDWORD pcchOrgNameBuf,
|
||||||
awstring *lpSerialBuf, LPDWORD pcchSerialBuf)
|
awstring *lpSerialBuf, LPDWORD pcchSerialBuf)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[SQUISH_GUID_SIZE];
|
WCHAR *user, *org, *serial, squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
LPWSTR user, org, serial;
|
|
||||||
USERINFOSTATE state;
|
USERINFOSTATE state;
|
||||||
HKEY hkey, props;
|
HKEY hkey, props;
|
||||||
LPCWSTR orgptr;
|
LPCWSTR orgptr;
|
||||||
|
@ -3487,7 +3508,7 @@ static USERINFOSTATE MSI_GetUserInfo(LPCWSTR szProduct,
|
||||||
pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
|
pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
|
||||||
pcchSerialBuf);
|
pcchSerialBuf);
|
||||||
|
|
||||||
if (!szProduct || !squash_guid(szProduct, squished_pc))
|
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
|
||||||
return USERINFOSTATE_INVALIDARG;
|
return USERINFOSTATE_INVALIDARG;
|
||||||
|
|
||||||
if (MSIREG_OpenProductKey(szProduct, NULL, MSIINSTALLCONTEXT_USERMANAGED,
|
if (MSIREG_OpenProductKey(szProduct, NULL, MSIINSTALLCONTEXT_USERMANAGED,
|
||||||
|
|
|
@ -727,7 +727,7 @@ typedef struct tagMSISCRIPT
|
||||||
#define MSI_BUILDNUMBER 6001
|
#define MSI_BUILDNUMBER 6001
|
||||||
|
|
||||||
#define GUID_SIZE 39
|
#define GUID_SIZE 39
|
||||||
#define SQUISH_GUID_SIZE 33
|
#define SQUASHED_GUID_SIZE 33
|
||||||
|
|
||||||
#define MSIHANDLE_MAGIC 0x4d434923
|
#define MSIHANDLE_MAGIC 0x4d434923
|
||||||
|
|
||||||
|
@ -929,10 +929,11 @@ extern UINT MSIREG_OpenUserUpgradeCodesKey(LPCWSTR szProduct, HKEY* key, BOOL cr
|
||||||
extern UINT MSIREG_DeleteProductKey(LPCWSTR szProduct) DECLSPEC_HIDDEN;
|
extern UINT MSIREG_DeleteProductKey(LPCWSTR szProduct) DECLSPEC_HIDDEN;
|
||||||
extern UINT MSIREG_DeleteUserProductKey(LPCWSTR szProduct) DECLSPEC_HIDDEN;
|
extern UINT MSIREG_DeleteUserProductKey(LPCWSTR szProduct) DECLSPEC_HIDDEN;
|
||||||
extern UINT MSIREG_DeleteUserDataPatchKey(LPCWSTR patch, MSIINSTALLCONTEXT context) DECLSPEC_HIDDEN;
|
extern UINT MSIREG_DeleteUserDataPatchKey(LPCWSTR patch, MSIINSTALLCONTEXT context) DECLSPEC_HIDDEN;
|
||||||
extern UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct) DECLSPEC_HIDDEN;
|
extern UINT MSIREG_DeleteUserDataProductKey(LPCWSTR, MSIINSTALLCONTEXT) DECLSPEC_HIDDEN;
|
||||||
extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct) DECLSPEC_HIDDEN;
|
extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct) DECLSPEC_HIDDEN;
|
||||||
extern UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid) DECLSPEC_HIDDEN;
|
extern UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid) DECLSPEC_HIDDEN;
|
||||||
extern UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode) DECLSPEC_HIDDEN;
|
extern UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode) DECLSPEC_HIDDEN;
|
||||||
|
extern UINT MSIREG_DeleteUpgradeCodesKey(const WCHAR *) DECLSPEC_HIDDEN;
|
||||||
extern UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode) DECLSPEC_HIDDEN;
|
extern UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode) DECLSPEC_HIDDEN;
|
||||||
extern UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create) DECLSPEC_HIDDEN;
|
extern UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create) DECLSPEC_HIDDEN;
|
||||||
extern UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode) DECLSPEC_HIDDEN;
|
extern UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode) DECLSPEC_HIDDEN;
|
||||||
|
@ -969,7 +970,6 @@ extern INT msi_suminfo_get_int32( MSISUMMARYINFO *si, UINT uiProperty ) DECLSPEC
|
||||||
extern LPWSTR msi_get_suminfo_product( IStorage *stg ) DECLSPEC_HIDDEN;
|
extern LPWSTR msi_get_suminfo_product( IStorage *stg ) DECLSPEC_HIDDEN;
|
||||||
extern UINT msi_add_suminfo( MSIDATABASE *db, LPWSTR **records, int num_records, int num_columns ) DECLSPEC_HIDDEN;
|
extern UINT msi_add_suminfo( MSIDATABASE *db, LPWSTR **records, int num_records, int num_columns ) DECLSPEC_HIDDEN;
|
||||||
extern UINT msi_export_suminfo( MSIDATABASE *db, HANDLE handle ) DECLSPEC_HIDDEN;
|
extern UINT msi_export_suminfo( MSIDATABASE *db, HANDLE handle ) DECLSPEC_HIDDEN;
|
||||||
extern enum platform parse_platform( const WCHAR *str ) DECLSPEC_HIDDEN;
|
|
||||||
extern UINT msi_load_suminfo_properties( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
|
extern UINT msi_load_suminfo_properties( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* undocumented functions */
|
/* undocumented functions */
|
||||||
|
|
|
@ -1170,7 +1170,7 @@ UINT msi_create_empty_local_file( LPWSTR path, LPCWSTR suffix )
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum platform parse_platform( const WCHAR *str )
|
static enum platform parse_platform( const WCHAR *str )
|
||||||
{
|
{
|
||||||
if (!str[0] || !strcmpW( str, szIntel )) return PLATFORM_INTEL;
|
if (!str[0] || !strcmpW( str, szIntel )) return PLATFORM_INTEL;
|
||||||
else if (!strcmpW( str, szIntel64 )) return PLATFORM_INTEL64;
|
else if (!strcmpW( str, szIntel64 )) return PLATFORM_INTEL64;
|
||||||
|
|
|
@ -707,7 +707,8 @@ UINT MSI_RecordSetStream(MSIRECORD *rec, UINT iField, IStream *stream)
|
||||||
UINT MSI_RecordSetStreamFromFileW(MSIRECORD *rec, UINT iField, LPCWSTR szFilename)
|
UINT MSI_RecordSetStreamFromFileW(MSIRECORD *rec, UINT iField, LPCWSTR szFilename)
|
||||||
{
|
{
|
||||||
IStream *stm = NULL;
|
IStream *stm = NULL;
|
||||||
HRESULT r;
|
HRESULT hr;
|
||||||
|
UINT ret;
|
||||||
|
|
||||||
if( (iField == 0) || (iField > rec->count) )
|
if( (iField == 0) || (iField > rec->count) )
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
@ -726,16 +727,16 @@ UINT MSI_RecordSetStreamFromFileW(MSIRECORD *rec, UINT iField, LPCWSTR szFilenam
|
||||||
return ERROR_INVALID_FIELD;
|
return ERROR_INVALID_FIELD;
|
||||||
|
|
||||||
ofs.QuadPart = 0;
|
ofs.QuadPart = 0;
|
||||||
r = IStream_Seek( stm, ofs, STREAM_SEEK_SET, &cur );
|
hr = IStream_Seek( stm, ofs, STREAM_SEEK_SET, &cur );
|
||||||
if( FAILED( r ) )
|
if (FAILED( hr ))
|
||||||
return ERROR_FUNCTION_FAILED;
|
return ERROR_FUNCTION_FAILED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* read the file into a stream and save the stream in the record */
|
/* read the file into a stream and save the stream in the record */
|
||||||
r = RECORD_StreamFromFile(szFilename, &stm);
|
ret = RECORD_StreamFromFile(szFilename, &stm);
|
||||||
if( r != ERROR_SUCCESS )
|
if (ret != ERROR_SUCCESS)
|
||||||
return r;
|
return ret;
|
||||||
|
|
||||||
/* if all's good, store it in the record */
|
/* if all's good, store it in the record */
|
||||||
MSI_RecordSetStream(rec, iField, stm);
|
MSI_RecordSetStream(rec, iField, stm);
|
||||||
|
|
|
@ -475,24 +475,23 @@ UINT MSIREG_DeleteUninstallKey(const WCHAR *product, enum platform platform)
|
||||||
|
|
||||||
UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
|
UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
LPWSTR usersid = NULL;
|
|
||||||
HKEY root = HKEY_LOCAL_MACHINE;
|
HKEY root = HKEY_LOCAL_MACHINE;
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[MAX_PATH];
|
WCHAR *usersid = NULL, squashed_pc[SQUASHED_GUID_SIZE], keypath[MAX_PATH];
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProduct, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProduct), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
if (context == MSIINSTALLCONTEXT_MACHINE)
|
if (context == MSIINSTALLCONTEXT_MACHINE)
|
||||||
{
|
{
|
||||||
strcpyW(keypath, szInstaller_LocalClassesProd);
|
strcpyW(keypath, szInstaller_LocalClassesProd);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_pc );
|
||||||
}
|
}
|
||||||
else if (context == MSIINSTALLCONTEXT_USERUNMANAGED)
|
else if (context == MSIINSTALLCONTEXT_USERUNMANAGED)
|
||||||
{
|
{
|
||||||
root = HKEY_CURRENT_USER;
|
root = HKEY_CURRENT_USER;
|
||||||
strcpyW(keypath, szUserProducts);
|
strcpyW(keypath, szUserProducts);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_pc );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -505,7 +504,7 @@ UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTE
|
||||||
}
|
}
|
||||||
szUserSid = usersid;
|
szUserSid = usersid;
|
||||||
}
|
}
|
||||||
sprintfW(keypath, szInstaller_LocalManagedProd_fmt, szUserSid, squished_pc);
|
sprintfW( keypath, szInstaller_LocalManagedProd_fmt, szUserSid, squashed_pc );
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
if (create) return RegCreateKeyExW(root, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(root, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
|
@ -514,25 +513,25 @@ UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTE
|
||||||
|
|
||||||
UINT MSIREG_DeleteUserProductKey(LPCWSTR szProduct)
|
UINT MSIREG_DeleteUserProductKey(LPCWSTR szProduct)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProduct, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProduct), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
strcpyW(keypath, szUserProducts);
|
strcpyW(keypath, szUserProducts);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_pc );
|
||||||
return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
|
return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
|
UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
|
|
||||||
if (!squash_guid(szPatch, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szPatch, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szPatch), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szPatch), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
strcpyW(keypath, szUserPatches);
|
strcpyW(keypath, szUserPatches);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_pc );
|
||||||
|
|
||||||
if (create) return RegCreateKeyW(HKEY_CURRENT_USER, keypath, key);
|
if (create) return RegCreateKeyW(HKEY_CURRENT_USER, keypath, key);
|
||||||
return RegOpenKeyW(HKEY_CURRENT_USER, keypath, key);
|
return RegOpenKeyW(HKEY_CURRENT_USER, keypath, key);
|
||||||
|
@ -543,21 +542,21 @@ UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONT
|
||||||
{
|
{
|
||||||
HKEY root = HKEY_LOCAL_MACHINE;
|
HKEY root = HKEY_LOCAL_MACHINE;
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[MAX_PATH], *usersid = NULL;
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE], keypath[MAX_PATH], *usersid = NULL;
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProduct, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProduct), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
if (context == MSIINSTALLCONTEXT_MACHINE)
|
if (context == MSIINSTALLCONTEXT_MACHINE)
|
||||||
{
|
{
|
||||||
strcpyW(keypath, szInstaller_LocalClassesFeat);
|
strcpyW(keypath, szInstaller_LocalClassesFeat);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_pc );
|
||||||
}
|
}
|
||||||
else if (context == MSIINSTALLCONTEXT_USERUNMANAGED)
|
else if (context == MSIINSTALLCONTEXT_USERUNMANAGED)
|
||||||
{
|
{
|
||||||
root = HKEY_CURRENT_USER;
|
root = HKEY_CURRENT_USER;
|
||||||
strcpyW(keypath, szUserFeatures);
|
strcpyW(keypath, szUserFeatures);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_pc );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -570,7 +569,7 @@ UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONT
|
||||||
}
|
}
|
||||||
szUserSid = usersid;
|
szUserSid = usersid;
|
||||||
}
|
}
|
||||||
sprintfW(keypath, szInstaller_LocalManagedFeat_fmt, szUserSid, squished_pc);
|
sprintfW( keypath, szInstaller_LocalManagedFeat_fmt, szUserSid, squashed_pc );
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
if (create) return RegCreateKeyExW(root, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(root, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
|
@ -579,26 +578,26 @@ UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONT
|
||||||
|
|
||||||
UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct)
|
UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProduct, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProduct), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
strcpyW(keypath, szUserFeatures);
|
strcpyW(keypath, szUserFeatures);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_pc );
|
||||||
return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
|
return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT MSIREG_OpenInstallerFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create)
|
static UINT MSIREG_OpenInstallerFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProduct, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProduct), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
strcpyW(keypath, szInstaller_Features);
|
strcpyW(keypath, szInstaller_Features);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_pc );
|
||||||
|
|
||||||
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
||||||
|
@ -608,14 +607,14 @@ UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINS
|
||||||
HKEY *key, BOOL create)
|
HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200], *usersid = NULL;
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE], keypath[0x200], *usersid = NULL;
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProduct, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProduct), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
if (context == MSIINSTALLCONTEXT_MACHINE)
|
if (context == MSIINSTALLCONTEXT_MACHINE)
|
||||||
{
|
{
|
||||||
sprintfW(keypath, szUserDataFeatures_fmt, szLocalSid, squished_pc);
|
sprintfW( keypath, szUserDataFeatures_fmt, szLocalSid, squashed_pc );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -628,7 +627,7 @@ UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINS
|
||||||
}
|
}
|
||||||
szUserSid = usersid;
|
szUserSid = usersid;
|
||||||
}
|
}
|
||||||
sprintfW(keypath, szUserDataFeatures_fmt, szUserSid, squished_pc);
|
sprintfW( keypath, szUserDataFeatures_fmt, szUserSid, squashed_pc );
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
|
@ -637,32 +636,31 @@ UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINS
|
||||||
|
|
||||||
UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY *key, BOOL create)
|
UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
WCHAR squished_cc[GUID_SIZE], keypath[0x200];
|
WCHAR squashed_cc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
UINT ret;
|
UINT ret;
|
||||||
|
|
||||||
if (!squash_guid(szComponent, squished_cc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szComponent, squashed_cc)) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szComponent), debugstr_w(squished_cc));
|
TRACE("%s squashed %s\n", debugstr_w(szComponent), debugstr_w(squashed_cc));
|
||||||
|
|
||||||
strcpyW(keypath, szUserComponents);
|
strcpyW(keypath, szUserComponents);
|
||||||
strcatW(keypath, squished_cc);
|
strcatW( keypath, squashed_cc );
|
||||||
|
|
||||||
if (create) return RegCreateKeyW(HKEY_CURRENT_USER, keypath, key);
|
if (create) return RegCreateKeyW(HKEY_CURRENT_USER, keypath, key);
|
||||||
ret = RegOpenKeyW(HKEY_CURRENT_USER, keypath, key);
|
ret = RegOpenKeyW(HKEY_CURRENT_USER, keypath, key);
|
||||||
if (ret != ERROR_FILE_NOT_FOUND) return ret;
|
if (ret != ERROR_FILE_NOT_FOUND) return ret;
|
||||||
|
|
||||||
strcpyW(keypath, szInstaller_Components);
|
strcpyW(keypath, szInstaller_Components);
|
||||||
strcatW(keypath, squished_cc);
|
strcatW( keypath, squashed_cc );
|
||||||
return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid, HKEY *key, BOOL create)
|
UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR comp[GUID_SIZE], keypath[0x200];
|
WCHAR *usersid, squashed_comp[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
LPWSTR usersid;
|
|
||||||
|
|
||||||
if (!squash_guid(szComponent, comp)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szComponent, squashed_comp )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szComponent), debugstr_w(comp));
|
TRACE("%s squashed %s\n", debugstr_w(szComponent), debugstr_w(squashed_comp));
|
||||||
|
|
||||||
if (!szUserSid)
|
if (!szUserSid)
|
||||||
{
|
{
|
||||||
|
@ -671,11 +669,11 @@ UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid, HKE
|
||||||
ERR("Failed to retrieve user SID\n");
|
ERR("Failed to retrieve user SID\n");
|
||||||
return ERROR_FUNCTION_FAILED;
|
return ERROR_FUNCTION_FAILED;
|
||||||
}
|
}
|
||||||
sprintfW(keypath, szUserDataComp_fmt, usersid, comp);
|
sprintfW( keypath, szUserDataComp_fmt, usersid, squashed_comp );
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sprintfW(keypath, szUserDataComp_fmt, szUserSid, comp);
|
sprintfW( keypath, szUserDataComp_fmt, szUserSid, squashed_comp );
|
||||||
|
|
||||||
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
||||||
|
@ -684,13 +682,12 @@ UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid, HKE
|
||||||
UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid)
|
UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR comp[GUID_SIZE], keypath[0x200];
|
WCHAR *usersid, squashed_comp[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
LPWSTR usersid;
|
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
LONG r;
|
LONG r;
|
||||||
|
|
||||||
if (!squash_guid(szComponent, comp)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szComponent, squashed_comp )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szComponent), debugstr_w(comp));
|
TRACE("%s squashed %s\n", debugstr_w(szComponent), debugstr_w(squashed_comp));
|
||||||
|
|
||||||
if (!szUserSid)
|
if (!szUserSid)
|
||||||
{
|
{
|
||||||
|
@ -706,7 +703,7 @@ UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid)
|
||||||
sprintfW(keypath, szUserDataComponents_fmt, szUserSid);
|
sprintfW(keypath, szUserDataComponents_fmt, szUserSid);
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, comp);
|
r = RegDeleteTreeW( hkey, squashed_comp );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -714,16 +711,15 @@ UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid)
|
||||||
UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create)
|
UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR *usersid, squashed_pc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
LPWSTR usersid;
|
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProduct, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProduct), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
if (dwContext == MSIINSTALLCONTEXT_MACHINE)
|
if (dwContext == MSIINSTALLCONTEXT_MACHINE)
|
||||||
sprintfW(keypath, szUserDataProd_fmt, szLocalSid, squished_pc);
|
sprintfW( keypath, szUserDataProd_fmt, szLocalSid, squashed_pc );
|
||||||
else if (szUserSid)
|
else if (szUserSid)
|
||||||
sprintfW(keypath, szUserDataProd_fmt, szUserSid, squished_pc);
|
sprintfW( keypath, szUserDataProd_fmt, szUserSid, squashed_pc );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(usersid = get_user_sid()))
|
if (!(usersid = get_user_sid()))
|
||||||
|
@ -731,7 +727,7 @@ UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContex
|
||||||
ERR("Failed to retrieve user SID\n");
|
ERR("Failed to retrieve user SID\n");
|
||||||
return ERROR_FUNCTION_FAILED;
|
return ERROR_FUNCTION_FAILED;
|
||||||
}
|
}
|
||||||
sprintfW(keypath, szUserDataProd_fmt, usersid, squished_pc);
|
sprintfW( keypath, szUserDataProd_fmt, usersid, squashed_pc );
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
|
@ -741,14 +737,13 @@ UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContex
|
||||||
UINT MSIREG_OpenUserDataPatchKey(LPCWSTR szPatch, MSIINSTALLCONTEXT dwContext, HKEY *key, BOOL create)
|
UINT MSIREG_OpenUserDataPatchKey(LPCWSTR szPatch, MSIINSTALLCONTEXT dwContext, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_patch[GUID_SIZE], keypath[0x200];
|
WCHAR *usersid, squashed_patch[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
LPWSTR usersid;
|
|
||||||
|
|
||||||
if (!squash_guid(szPatch, squished_patch)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szPatch, squashed_patch )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szPatch), debugstr_w(squished_patch));
|
TRACE("%s squashed %s\n", debugstr_w(szPatch), debugstr_w(squashed_patch));
|
||||||
|
|
||||||
if (dwContext == MSIINSTALLCONTEXT_MACHINE)
|
if (dwContext == MSIINSTALLCONTEXT_MACHINE)
|
||||||
sprintfW(keypath, szUserDataPatch_fmt, szLocalSid, squished_patch);
|
sprintfW( keypath, szUserDataPatch_fmt, szLocalSid, squashed_patch );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(usersid = get_user_sid()))
|
if (!(usersid = get_user_sid()))
|
||||||
|
@ -756,7 +751,7 @@ UINT MSIREG_OpenUserDataPatchKey(LPCWSTR szPatch, MSIINSTALLCONTEXT dwContext, H
|
||||||
ERR("Failed to retrieve user SID\n");
|
ERR("Failed to retrieve user SID\n");
|
||||||
return ERROR_FUNCTION_FAILED;
|
return ERROR_FUNCTION_FAILED;
|
||||||
}
|
}
|
||||||
sprintfW(keypath, szUserDataPatch_fmt, usersid, squished_patch);
|
sprintfW( keypath, szUserDataPatch_fmt, usersid, squashed_patch );
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
|
@ -766,13 +761,12 @@ UINT MSIREG_OpenUserDataPatchKey(LPCWSTR szPatch, MSIINSTALLCONTEXT dwContext, H
|
||||||
UINT MSIREG_DeleteUserDataPatchKey(LPCWSTR patch, MSIINSTALLCONTEXT context)
|
UINT MSIREG_DeleteUserDataPatchKey(LPCWSTR patch, MSIINSTALLCONTEXT context)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_patch[GUID_SIZE], keypath[0x200];
|
WCHAR *usersid, squashed_patch[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
LPWSTR usersid;
|
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
LONG r;
|
LONG r;
|
||||||
|
|
||||||
if (!squash_guid(patch, squished_patch)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( patch, squashed_patch )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(patch), debugstr_w(squished_patch));
|
TRACE("%s squashed %s\n", debugstr_w(patch), debugstr_w(squashed_patch));
|
||||||
|
|
||||||
if (context == MSIINSTALLCONTEXT_MACHINE)
|
if (context == MSIINSTALLCONTEXT_MACHINE)
|
||||||
sprintfW(keypath, szUserDataPatches_fmt, szLocalSid);
|
sprintfW(keypath, szUserDataPatches_fmt, szLocalSid);
|
||||||
|
@ -787,7 +781,7 @@ UINT MSIREG_DeleteUserDataPatchKey(LPCWSTR patch, MSIINSTALLCONTEXT context)
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_patch);
|
r = RegDeleteTreeW( hkey, squashed_patch );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -795,14 +789,13 @@ UINT MSIREG_DeleteUserDataPatchKey(LPCWSTR patch, MSIINSTALLCONTEXT context)
|
||||||
UINT MSIREG_OpenUserDataProductPatchesKey(LPCWSTR product, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
|
UINT MSIREG_OpenUserDataProductPatchesKey(LPCWSTR product, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_product[GUID_SIZE], keypath[0x200];
|
WCHAR *usersid, squashed_product[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
LPWSTR usersid;
|
|
||||||
|
|
||||||
if (!squash_guid(product, squished_product)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( product, squashed_product )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(product), debugstr_w(squished_product));
|
TRACE("%s squashed %s\n", debugstr_w(product), debugstr_w(squashed_product));
|
||||||
|
|
||||||
if (context == MSIINSTALLCONTEXT_MACHINE)
|
if (context == MSIINSTALLCONTEXT_MACHINE)
|
||||||
sprintfW(keypath, szUserDataProductPatches_fmt, szLocalSid, squished_product);
|
sprintfW( keypath, szUserDataProductPatches_fmt, szLocalSid, squashed_product );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(usersid = get_user_sid()))
|
if (!(usersid = get_user_sid()))
|
||||||
|
@ -810,7 +803,7 @@ UINT MSIREG_OpenUserDataProductPatchesKey(LPCWSTR product, MSIINSTALLCONTEXT con
|
||||||
ERR("Failed to retrieve user SID\n");
|
ERR("Failed to retrieve user SID\n");
|
||||||
return ERROR_FUNCTION_FAILED;
|
return ERROR_FUNCTION_FAILED;
|
||||||
}
|
}
|
||||||
sprintfW(keypath, szUserDataProductPatches_fmt, usersid, squished_product);
|
sprintfW( keypath, szUserDataProductPatches_fmt, usersid, squashed_product );
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
|
@ -819,17 +812,16 @@ UINT MSIREG_OpenUserDataProductPatchesKey(LPCWSTR product, MSIINSTALLCONTEXT con
|
||||||
|
|
||||||
UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create)
|
UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
LPWSTR usersid;
|
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR *usersid, squashed_pc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProduct, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProduct), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
if (dwContext == MSIINSTALLCONTEXT_MACHINE)
|
if (dwContext == MSIINSTALLCONTEXT_MACHINE)
|
||||||
sprintfW(keypath, szInstallProperties_fmt, szLocalSid, squished_pc);
|
sprintfW( keypath, szInstallProperties_fmt, szLocalSid, squashed_pc );
|
||||||
else if (szUserSid)
|
else if (szUserSid)
|
||||||
sprintfW(keypath, szInstallProperties_fmt, szUserSid, squished_pc);
|
sprintfW( keypath, szInstallProperties_fmt, szUserSid, squashed_pc );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(usersid = get_user_sid()))
|
if (!(usersid = get_user_sid()))
|
||||||
|
@ -837,24 +829,27 @@ UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPC
|
||||||
ERR("Failed to retrieve user SID\n");
|
ERR("Failed to retrieve user SID\n");
|
||||||
return ERROR_FUNCTION_FAILED;
|
return ERROR_FUNCTION_FAILED;
|
||||||
}
|
}
|
||||||
sprintfW(keypath, szInstallProperties_fmt, usersid, squished_pc);
|
sprintfW( keypath, szInstallProperties_fmt, usersid, squashed_pc );
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct)
|
UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct, MSIINSTALLCONTEXT context)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR *usersid, squashed_pc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
LPWSTR usersid;
|
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
LONG r;
|
LONG r;
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProduct, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProduct), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
|
if (context == MSIINSTALLCONTEXT_MACHINE)
|
||||||
|
sprintfW(keypath, szUserDataProducts_fmt, szLocalSid);
|
||||||
|
else
|
||||||
|
{
|
||||||
if (!(usersid = get_user_sid()))
|
if (!(usersid = get_user_sid()))
|
||||||
{
|
{
|
||||||
ERR("Failed to retrieve user SID\n");
|
ERR("Failed to retrieve user SID\n");
|
||||||
|
@ -862,9 +857,10 @@ UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct)
|
||||||
}
|
}
|
||||||
sprintfW(keypath, szUserDataProducts_fmt, usersid);
|
sprintfW(keypath, szUserDataProducts_fmt, usersid);
|
||||||
LocalFree(usersid);
|
LocalFree(usersid);
|
||||||
|
}
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_pc);
|
r = RegDeleteTreeW( hkey, squashed_pc );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -872,15 +868,15 @@ UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct)
|
||||||
UINT MSIREG_DeleteProductKey(LPCWSTR szProduct)
|
UINT MSIREG_DeleteProductKey(LPCWSTR szProduct)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
LONG r;
|
LONG r;
|
||||||
|
|
||||||
if (!squash_guid(szProduct, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProduct, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProduct), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_Products, 0, access, &hkey)) return ERROR_SUCCESS;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_Products, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_pc);
|
r = RegDeleteTreeW( hkey, squashed_pc );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -888,12 +884,12 @@ UINT MSIREG_DeleteProductKey(LPCWSTR szProduct)
|
||||||
UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
|
UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
|
|
||||||
if (!squash_guid(szPatch, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szPatch, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szPatch), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szPatch), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
sprintfW(keypath, szInstaller_Patches, squished_pc);
|
sprintfW( keypath, szInstaller_Patches, squashed_pc );
|
||||||
|
|
||||||
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
||||||
|
@ -902,13 +898,13 @@ UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
|
||||||
UINT MSIREG_OpenUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY *key, BOOL create)
|
UINT MSIREG_OpenUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR squashed_uc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
|
|
||||||
if (!squash_guid(szUpgradeCode, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szUpgradeCode, squashed_uc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szUpgradeCode), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szUpgradeCode), debugstr_w(squashed_uc));
|
||||||
|
|
||||||
strcpyW(keypath, szInstaller_UpgradeCodes);
|
strcpyW(keypath, szInstaller_UpgradeCodes);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_uc );
|
||||||
|
|
||||||
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
||||||
|
@ -916,42 +912,54 @@ UINT MSIREG_OpenUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY *key, BOOL create)
|
||||||
|
|
||||||
UINT MSIREG_OpenUserUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create)
|
UINT MSIREG_OpenUserUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR squashed_uc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
|
|
||||||
if (!squash_guid(szUpgradeCode, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szUpgradeCode, squashed_uc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szUpgradeCode), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szUpgradeCode), debugstr_w(squashed_uc));
|
||||||
|
|
||||||
strcpyW(keypath, szInstaller_UserUpgradeCodes);
|
strcpyW(keypath, szInstaller_UserUpgradeCodes);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_uc );
|
||||||
|
|
||||||
if (create) return RegCreateKeyW(HKEY_CURRENT_USER, keypath, key);
|
if (create) return RegCreateKeyW(HKEY_CURRENT_USER, keypath, key);
|
||||||
return RegOpenKeyW(HKEY_CURRENT_USER, keypath, key);
|
return RegOpenKeyW(HKEY_CURRENT_USER, keypath, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT MSIREG_DeleteUpgradeCodesKey( const WCHAR *code )
|
||||||
|
{
|
||||||
|
WCHAR squashed_code[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
|
|
||||||
|
if (!squash_guid( code, squashed_code )) return ERROR_FUNCTION_FAILED;
|
||||||
|
TRACE( "%s squashed %s\n", debugstr_w(code), debugstr_w(squashed_code) );
|
||||||
|
|
||||||
|
strcpyW( keypath, szInstaller_UpgradeCodes );
|
||||||
|
strcatW( keypath, squashed_code );
|
||||||
|
return RegDeleteTreeW( HKEY_LOCAL_MACHINE, keypath );
|
||||||
|
}
|
||||||
|
|
||||||
UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode)
|
UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR squashed_uc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
|
|
||||||
if (!squash_guid(szUpgradeCode, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szUpgradeCode, squashed_uc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szUpgradeCode), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szUpgradeCode), debugstr_w(squashed_uc));
|
||||||
|
|
||||||
strcpyW(keypath, szInstaller_UserUpgradeCodes);
|
strcpyW(keypath, szInstaller_UserUpgradeCodes);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_uc );
|
||||||
return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
|
return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode)
|
UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
LONG r;
|
LONG r;
|
||||||
|
|
||||||
if (!squash_guid(szProductCode, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProductCode, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProductCode), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProductCode), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesProducts, 0, access, &hkey)) return ERROR_SUCCESS;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesProducts, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_pc);
|
r = RegDeleteTreeW( hkey, squashed_pc );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -959,15 +967,15 @@ UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode)
|
||||||
UINT MSIREG_DeleteLocalClassesFeaturesKey(LPCWSTR szProductCode)
|
UINT MSIREG_DeleteLocalClassesFeaturesKey(LPCWSTR szProductCode)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
LONG r;
|
LONG r;
|
||||||
|
|
||||||
if (!squash_guid(szProductCode, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szProductCode, squashed_pc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szProductCode), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szProductCode), debugstr_w(squashed_pc));
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesFeatures, 0, access, &hkey)) return ERROR_SUCCESS;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesFeatures, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_pc);
|
r = RegDeleteTreeW( hkey, squashed_pc );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -975,13 +983,13 @@ UINT MSIREG_DeleteLocalClassesFeaturesKey(LPCWSTR szProductCode)
|
||||||
UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY *key, BOOL create)
|
UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE], keypath[0x200];
|
WCHAR squashed_uc[SQUASHED_GUID_SIZE], keypath[0x200];
|
||||||
|
|
||||||
if (!squash_guid(szUpgradeCode, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szUpgradeCode, squashed_uc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szUpgradeCode), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szUpgradeCode), debugstr_w(squashed_uc));
|
||||||
|
|
||||||
strcpyW(keypath, szInstaller_ClassesUpgradeCode);
|
strcpyW(keypath, szInstaller_ClassesUpgradeCode);
|
||||||
strcatW(keypath, squished_pc);
|
strcatW( keypath, squashed_uc );
|
||||||
|
|
||||||
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
|
||||||
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
|
||||||
|
@ -990,15 +998,15 @@ UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY *key, BOOL cr
|
||||||
UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode)
|
UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode)
|
||||||
{
|
{
|
||||||
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR squashed_uc[SQUASHED_GUID_SIZE];
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
LONG r;
|
LONG r;
|
||||||
|
|
||||||
if (!squash_guid(szUpgradeCode, squished_pc)) return ERROR_FUNCTION_FAILED;
|
if (!squash_guid( szUpgradeCode, squashed_uc )) return ERROR_FUNCTION_FAILED;
|
||||||
TRACE("%s squished %s\n", debugstr_w(szUpgradeCode), debugstr_w(squished_pc));
|
TRACE("%s squashed %s\n", debugstr_w(szUpgradeCode), debugstr_w(squashed_uc));
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_ClassesUpgradeCodes, 0, access, &hkey)) return ERROR_SUCCESS;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_ClassesUpgradeCodes, 0, access, &hkey)) return ERROR_SUCCESS;
|
||||||
r = RegDeleteTreeW(hkey, squished_pc);
|
r = RegDeleteTreeW( hkey, squashed_uc );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -1008,7 +1016,8 @@ UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode)
|
||||||
*
|
*
|
||||||
* Decomposes an MSI descriptor into product, feature and component parts.
|
* Decomposes an MSI descriptor into product, feature and component parts.
|
||||||
* An MSI descriptor is a string of the form:
|
* An MSI descriptor is a string of the form:
|
||||||
* [base 85 guid] [feature code] '>' [base 85 guid]
|
* [base 85 guid] [feature code] '>' [base 85 guid] or
|
||||||
|
* [base 85 guid] [feature code] '<'
|
||||||
*
|
*
|
||||||
* PARAMS
|
* PARAMS
|
||||||
* szDescriptor [I] the descriptor to decompose
|
* szDescriptor [I] the descriptor to decompose
|
||||||
|
@ -1025,21 +1034,21 @@ UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode)
|
||||||
UINT WINAPI MsiDecomposeDescriptorW( LPCWSTR szDescriptor, LPWSTR szProduct,
|
UINT WINAPI MsiDecomposeDescriptorW( LPCWSTR szDescriptor, LPWSTR szProduct,
|
||||||
LPWSTR szFeature, LPWSTR szComponent, LPDWORD pUsed )
|
LPWSTR szFeature, LPWSTR szComponent, LPDWORD pUsed )
|
||||||
{
|
{
|
||||||
UINT r, len;
|
UINT len;
|
||||||
LPWSTR p;
|
const WCHAR *p;
|
||||||
GUID product, component;
|
GUID product, component;
|
||||||
|
|
||||||
TRACE("%s %p %p %p %p\n", debugstr_w(szDescriptor), szProduct,
|
TRACE("%s %p %p %p %p\n", debugstr_w(szDescriptor), szProduct,
|
||||||
szFeature, szComponent, pUsed);
|
szFeature, szComponent, pUsed);
|
||||||
|
|
||||||
r = decode_base85_guid( szDescriptor, &product );
|
if (!decode_base85_guid( szDescriptor, &product ))
|
||||||
if( !r )
|
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
TRACE("product %s\n", debugstr_guid( &product ));
|
TRACE("product %s\n", debugstr_guid( &product ));
|
||||||
|
|
||||||
p = strchrW(&szDescriptor[20],'>');
|
if (!(p = strchrW( &szDescriptor[20], '>' )))
|
||||||
if( !p )
|
p = strchrW( &szDescriptor[20], '<' );
|
||||||
|
if (!p)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
len = (p - &szDescriptor[20]);
|
len = (p - &szDescriptor[20]);
|
||||||
|
@ -1048,22 +1057,30 @@ UINT WINAPI MsiDecomposeDescriptorW( LPCWSTR szDescriptor, LPWSTR szProduct,
|
||||||
|
|
||||||
TRACE("feature %s\n", debugstr_wn( &szDescriptor[20], len ));
|
TRACE("feature %s\n", debugstr_wn( &szDescriptor[20], len ));
|
||||||
|
|
||||||
r = decode_base85_guid( p+1, &component );
|
if (*p == '>')
|
||||||
if( !r )
|
{
|
||||||
|
if (!decode_base85_guid( p+1, &component ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
TRACE( "component %s\n", debugstr_guid(&component) );
|
||||||
TRACE("component %s\n", debugstr_guid( &component ));
|
}
|
||||||
|
|
||||||
if (szProduct)
|
if (szProduct)
|
||||||
StringFromGUID2( &product, szProduct, MAX_FEATURE_CHARS+1 );
|
StringFromGUID2( &product, szProduct, MAX_FEATURE_CHARS+1 );
|
||||||
if (szComponent)
|
if (szComponent)
|
||||||
|
{
|
||||||
|
if (*p == '>')
|
||||||
StringFromGUID2( &component, szComponent, MAX_FEATURE_CHARS+1 );
|
StringFromGUID2( &component, szComponent, MAX_FEATURE_CHARS+1 );
|
||||||
|
else
|
||||||
|
szComponent[0] = 0;
|
||||||
|
}
|
||||||
if (szFeature)
|
if (szFeature)
|
||||||
{
|
{
|
||||||
memcpy( szFeature, &szDescriptor[20], len*sizeof(WCHAR) );
|
memcpy( szFeature, &szDescriptor[20], len*sizeof(WCHAR) );
|
||||||
szFeature[len] = 0;
|
szFeature[len] = 0;
|
||||||
}
|
}
|
||||||
len = ( &p[21] - szDescriptor );
|
|
||||||
|
len = p - szDescriptor + 1;
|
||||||
|
if (*p == '>') len += 20;
|
||||||
|
|
||||||
TRACE("length = %d\n", len);
|
TRACE("length = %d\n", len);
|
||||||
if (pUsed) *pUsed = len;
|
if (pUsed) *pUsed = len;
|
||||||
|
@ -1251,7 +1268,7 @@ static UINT fetch_machine_component( DWORD ctx, DWORD index, DWORD *idx, WCHAR g
|
||||||
'I','n','s','t','a','l','l','e','r','\\','U','s','e','r','D','a','t','a','\\',
|
'I','n','s','t','a','l','l','e','r','\\','U','s','e','r','D','a','t','a','\\',
|
||||||
'S','-','1','-','5','-','1','8','\\','C','o','m','p','o','n','e','n','t','s',0};
|
'S','-','1','-','5','-','1','8','\\','C','o','m','p','o','n','e','n','t','s',0};
|
||||||
UINT r = ERROR_SUCCESS;
|
UINT r = ERROR_SUCCESS;
|
||||||
WCHAR component[GUID_SIZE];
|
WCHAR component[SQUASHED_GUID_SIZE];
|
||||||
DWORD i = 0, len_component;
|
DWORD i = 0, len_component;
|
||||||
REGSAM access = KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY;
|
REGSAM access = KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY;
|
||||||
HKEY key_components;
|
HKEY key_components;
|
||||||
|
@ -1300,7 +1317,7 @@ static UINT fetch_user_component( const WCHAR *usersid, DWORD ctx, DWORD index,
|
||||||
'I','n','s','t','a','l','l','e','r','\\','U','s','e','r','D','a','t','a',0};
|
'I','n','s','t','a','l','l','e','r','\\','U','s','e','r','D','a','t','a',0};
|
||||||
static const WCHAR componentsW[] = {'\\','C','o','m','p','o','n','e','n','t','s',0};
|
static const WCHAR componentsW[] = {'\\','C','o','m','p','o','n','e','n','t','s',0};
|
||||||
UINT r = ERROR_SUCCESS;
|
UINT r = ERROR_SUCCESS;
|
||||||
WCHAR path[MAX_PATH], component[GUID_SIZE], user[128];
|
WCHAR path[MAX_PATH], component[SQUASHED_GUID_SIZE], user[128];
|
||||||
DWORD i = 0, j = 0, len_component, len_user;
|
DWORD i = 0, j = 0, len_component, len_user;
|
||||||
REGSAM access = KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY;
|
REGSAM access = KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY;
|
||||||
HKEY key_users, key_components;
|
HKEY key_users, key_components;
|
||||||
|
@ -1461,7 +1478,7 @@ UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct)
|
||||||
{
|
{
|
||||||
HKEY hkeyComp = 0;
|
HKEY hkeyComp = 0;
|
||||||
DWORD r, sz;
|
DWORD r, sz;
|
||||||
WCHAR szValName[SQUISH_GUID_SIZE];
|
WCHAR szValName[SQUASHED_GUID_SIZE];
|
||||||
|
|
||||||
TRACE("%s %d %p\n", debugstr_w(szComponent), index, szProduct);
|
TRACE("%s %d %p\n", debugstr_w(szComponent), index, szProduct);
|
||||||
|
|
||||||
|
@ -1473,7 +1490,7 @@ UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct)
|
||||||
return ERROR_UNKNOWN_COMPONENT;
|
return ERROR_UNKNOWN_COMPONENT;
|
||||||
|
|
||||||
/* see if there are any products at all */
|
/* see if there are any products at all */
|
||||||
sz = SQUISH_GUID_SIZE;
|
sz = SQUASHED_GUID_SIZE;
|
||||||
r = RegEnumValueW(hkeyComp, 0, szValName, &sz, NULL, NULL, NULL, NULL);
|
r = RegEnumValueW(hkeyComp, 0, szValName, &sz, NULL, NULL, NULL, NULL);
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -1485,7 +1502,7 @@ UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct)
|
||||||
return ERROR_UNKNOWN_COMPONENT;
|
return ERROR_UNKNOWN_COMPONENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
sz = SQUISH_GUID_SIZE;
|
sz = SQUASHED_GUID_SIZE;
|
||||||
r = RegEnumValueW(hkeyComp, index, szValName, &sz, NULL, NULL, NULL, NULL);
|
r = RegEnumValueW(hkeyComp, index, szValName, &sz, NULL, NULL, NULL, NULL);
|
||||||
if( r == ERROR_SUCCESS )
|
if( r == ERROR_SUCCESS )
|
||||||
{
|
{
|
||||||
|
@ -1670,8 +1687,8 @@ UINT WINAPI MsiEnumRelatedProductsW(LPCWSTR szUpgradeCode, DWORD dwReserved,
|
||||||
{
|
{
|
||||||
UINT r;
|
UINT r;
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
DWORD dwSize = SQUISH_GUID_SIZE;
|
WCHAR szKeyName[SQUASHED_GUID_SIZE];
|
||||||
WCHAR szKeyName[SQUISH_GUID_SIZE];
|
DWORD dwSize = sizeof(szKeyName)/sizeof(szKeyName[0]);
|
||||||
|
|
||||||
TRACE("%s %u %u %p\n", debugstr_w(szUpgradeCode), dwReserved,
|
TRACE("%s %u %u %p\n", debugstr_w(szUpgradeCode), dwReserved,
|
||||||
iProductIndex, lpProductBuf);
|
iProductIndex, lpProductBuf);
|
||||||
|
@ -2082,7 +2099,7 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
|
||||||
LPWSTR szTargetProductCode, MSIINSTALLCONTEXT *pdwTargetProductContext,
|
LPWSTR szTargetProductCode, MSIINSTALLCONTEXT *pdwTargetProductContext,
|
||||||
LPWSTR szTargetUserSid, LPDWORD pcchTargetUserSid)
|
LPWSTR szTargetUserSid, LPDWORD pcchTargetUserSid)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
DWORD idx = 0;
|
DWORD idx = 0;
|
||||||
UINT r;
|
UINT r;
|
||||||
|
|
||||||
|
@ -2093,7 +2110,7 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
|
||||||
dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext,
|
dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext,
|
||||||
szTargetUserSid, pcchTargetUserSid);
|
szTargetUserSid, pcchTargetUserSid);
|
||||||
|
|
||||||
if (!szProductCode || !squash_guid(szProductCode, squished_pc))
|
if (!szProductCode || !squash_guid( szProductCode, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (szUserSid && !strcmpW( szUserSid, szLocalSid ))
|
if (szUserSid && !strcmpW( szUserSid, szLocalSid ))
|
||||||
|
@ -2189,8 +2206,7 @@ done:
|
||||||
UINT WINAPI MsiEnumPatchesW(LPCWSTR szProduct, DWORD iPatchIndex,
|
UINT WINAPI MsiEnumPatchesW(LPCWSTR szProduct, DWORD iPatchIndex,
|
||||||
LPWSTR lpPatchBuf, LPWSTR lpTransformsBuf, LPDWORD pcchTransformsBuf)
|
LPWSTR lpPatchBuf, LPWSTR lpTransformsBuf, LPDWORD pcchTransformsBuf)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR *transforms = NULL, squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
LPWSTR transforms = NULL;
|
|
||||||
HKEY prod;
|
HKEY prod;
|
||||||
DWORD idx = 0;
|
DWORD idx = 0;
|
||||||
UINT r;
|
UINT r;
|
||||||
|
@ -2198,7 +2214,7 @@ UINT WINAPI MsiEnumPatchesW(LPCWSTR szProduct, DWORD iPatchIndex,
|
||||||
TRACE("(%s %d %p %p %p)\n", debugstr_w(szProduct), iPatchIndex,
|
TRACE("(%s %d %p %p %p)\n", debugstr_w(szProduct), iPatchIndex,
|
||||||
lpPatchBuf, lpTransformsBuf, pcchTransformsBuf);
|
lpPatchBuf, lpTransformsBuf, pcchTransformsBuf);
|
||||||
|
|
||||||
if (!szProduct || !squash_guid(szProduct, squished_pc))
|
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!lpPatchBuf || !lpTransformsBuf || !pcchTransformsBuf)
|
if (!lpPatchBuf || !lpTransformsBuf || !pcchTransformsBuf)
|
||||||
|
@ -2279,7 +2295,7 @@ static UINT fetch_machine_product( const WCHAR *match, DWORD index, DWORD *idx,
|
||||||
{'S','o','f','t','w','a','r','e','\\','C','l','a','s','s','e','s','\\',
|
{'S','o','f','t','w','a','r','e','\\','C','l','a','s','s','e','s','\\',
|
||||||
'I','n','s','t','a','l','l','e','r','\\','P','r','o','d','u','c','t','s',0};
|
'I','n','s','t','a','l','l','e','r','\\','P','r','o','d','u','c','t','s',0};
|
||||||
UINT r;
|
UINT r;
|
||||||
WCHAR product[GUID_SIZE];
|
WCHAR product[SQUASHED_GUID_SIZE];
|
||||||
DWORD i = 0, len;
|
DWORD i = 0, len;
|
||||||
REGSAM access = KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY;
|
REGSAM access = KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY;
|
||||||
HKEY key;
|
HKEY key;
|
||||||
|
@ -2340,7 +2356,7 @@ static UINT fetch_user_product( const WCHAR *match, const WCHAR *usersid, DWORD
|
||||||
'I','n','s','t','a','l','l','e','r','\\','P','r','o','d','u','c','t','s',0};
|
'I','n','s','t','a','l','l','e','r','\\','P','r','o','d','u','c','t','s',0};
|
||||||
UINT r;
|
UINT r;
|
||||||
const WCHAR *subkey;
|
const WCHAR *subkey;
|
||||||
WCHAR path[MAX_PATH], product[GUID_SIZE], user[128];
|
WCHAR path[MAX_PATH], product[SQUASHED_GUID_SIZE], user[128];
|
||||||
DWORD i = 0, j = 0, len_product, len_user;
|
DWORD i = 0, j = 0, len_product, len_user;
|
||||||
REGSAM access = KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY;
|
REGSAM access = KEY_ENUMERATE_SUB_KEYS | KEY_WOW64_64KEY;
|
||||||
HKEY key_users, key_products;
|
HKEY key_users, key_products;
|
||||||
|
|
|
@ -191,27 +191,20 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
|
||||||
LPWSTR szVolumeLabel, LPDWORD pcchVolumeLabel,
|
LPWSTR szVolumeLabel, LPDWORD pcchVolumeLabel,
|
||||||
LPWSTR szDiskPrompt, LPDWORD pcchDiskPrompt)
|
LPWSTR szDiskPrompt, LPDWORD pcchDiskPrompt)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
static const WCHAR fmt[] = {'#','%','d',0};
|
||||||
WCHAR convert[11];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE], convert[11];
|
||||||
LPWSTR value = NULL;
|
WCHAR *value = NULL, *data = NULL, *ptr, *ptr2;
|
||||||
LPWSTR data = NULL;
|
|
||||||
LPWSTR ptr, ptr2;
|
|
||||||
HKEY source, media;
|
HKEY source, media;
|
||||||
DWORD valuesz, datasz = 0;
|
DWORD valuesz, datasz = 0, type, numvals, size;
|
||||||
DWORD type;
|
|
||||||
DWORD numvals, size;
|
|
||||||
LONG res;
|
LONG res;
|
||||||
UINT r;
|
UINT r;
|
||||||
static DWORD index = 0;
|
static DWORD index = 0;
|
||||||
|
|
||||||
static const WCHAR fmt[] = {'#','%','d',0};
|
|
||||||
|
|
||||||
TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p)\n", debugstr_w(szProductCodeOrPatchCode),
|
TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p)\n", debugstr_w(szProductCodeOrPatchCode),
|
||||||
debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szVolumeLabel,
|
debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szVolumeLabel,
|
||||||
pcchVolumeLabel, szDiskPrompt, pcchDiskPrompt);
|
pcchVolumeLabel, szDiskPrompt, pcchDiskPrompt);
|
||||||
|
|
||||||
if (!szProductCodeOrPatchCode ||
|
if (!szProductCodeOrPatchCode || !squash_guid( szProductCodeOrPatchCode, squashed_pc ))
|
||||||
!squash_guid(szProductCodeOrPatchCode, squished_pc))
|
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (dwContext == MSIINSTALLCONTEXT_MACHINE && szUserSid)
|
if (dwContext == MSIINSTALLCONTEXT_MACHINE && szUserSid)
|
||||||
|
@ -229,8 +222,7 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
|
||||||
if (dwIndex != index)
|
if (dwIndex != index)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
r = OpenSourceKey(szProductCodeOrPatchCode, &source,
|
r = OpenSourceKey(szProductCodeOrPatchCode, &source, dwOptions, dwContext, FALSE);
|
||||||
dwOptions, dwContext, FALSE);
|
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
@ -403,23 +395,20 @@ UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUs
|
||||||
DWORD dwOptions, DWORD dwIndex,
|
DWORD dwOptions, DWORD dwIndex,
|
||||||
LPWSTR szSource, LPDWORD pcchSource)
|
LPWSTR szSource, LPDWORD pcchSource)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
static const WCHAR format[] = {'%','d',0};
|
||||||
WCHAR name[32];
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE], name[32];
|
||||||
HKEY source = NULL;
|
HKEY source = NULL, subkey = NULL;
|
||||||
HKEY subkey = NULL;
|
|
||||||
LONG res;
|
LONG res;
|
||||||
UINT r = ERROR_INVALID_PARAMETER;
|
UINT r = ERROR_INVALID_PARAMETER;
|
||||||
static DWORD index = 0;
|
static DWORD index = 0;
|
||||||
|
|
||||||
static const WCHAR format[] = {'%','d',0};
|
|
||||||
|
|
||||||
TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_w(szProductCodeOrPatch),
|
TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_w(szProductCodeOrPatch),
|
||||||
debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource);
|
debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource);
|
||||||
|
|
||||||
if (dwIndex == 0)
|
if (dwIndex == 0)
|
||||||
index = 0;
|
index = 0;
|
||||||
|
|
||||||
if (!szProductCodeOrPatch || !squash_guid(szProductCodeOrPatch, squished_pc))
|
if (!szProductCodeOrPatch || !squash_guid( szProductCodeOrPatch, squashed_pc ))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
if (szSource && !pcchSource)
|
if (szSource && !pcchSource)
|
||||||
|
@ -437,8 +426,7 @@ UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUs
|
||||||
if (dwIndex != index)
|
if (dwIndex != index)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
r = OpenSourceKey(szProductCodeOrPatch, &source,
|
r = OpenSourceKey( szProductCodeOrPatch, &source, dwOptions, dwContext, FALSE );
|
||||||
dwOptions, dwContext, FALSE);
|
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
@ -534,18 +522,15 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
|
||||||
LPCWSTR szProperty, LPWSTR szValue,
|
LPCWSTR szProperty, LPWSTR szValue,
|
||||||
LPDWORD pcchValue)
|
LPDWORD pcchValue)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
static const WCHAR mediapack[] = {'M','e','d','i','a','P','a','c','k','a','g','e',0};
|
||||||
|
WCHAR *source, *ptr, squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
HKEY sourcekey, media;
|
HKEY sourcekey, media;
|
||||||
LPWSTR source, ptr;
|
|
||||||
DWORD size;
|
DWORD size;
|
||||||
UINT rc;
|
UINT rc;
|
||||||
|
|
||||||
static const WCHAR mediapack[] = {
|
|
||||||
'M','e','d','i','a','P','a','c','k','a','g','e',0};
|
|
||||||
|
|
||||||
TRACE("%s %s\n", debugstr_w(szProduct), debugstr_w(szProperty));
|
TRACE("%s %s\n", debugstr_w(szProduct), debugstr_w(szProperty));
|
||||||
|
|
||||||
if (!szProduct || !squash_guid(szProduct, squished_pc))
|
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (szValue && !pcchValue)
|
if (szValue && !pcchValue)
|
||||||
|
@ -761,19 +746,16 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
|
||||||
MSIINSTALLCONTEXT dwContext, DWORD dwOptions,
|
MSIINSTALLCONTEXT dwContext, DWORD dwOptions,
|
||||||
LPCWSTR szProperty, LPCWSTR szValue)
|
LPCWSTR szProperty, LPCWSTR szValue)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
static const WCHAR media_package[] = {'M','e','d','i','a','P','a','c','k','a','g','e',0};
|
||||||
|
WCHAR squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
HKEY sourcekey, media;
|
HKEY sourcekey, media;
|
||||||
LPCWSTR property;
|
LPCWSTR property;
|
||||||
UINT rc;
|
UINT rc;
|
||||||
|
|
||||||
static const WCHAR media_package[] = {
|
|
||||||
'M','e','d','i','a','P','a','c','k','a','g','e',0
|
|
||||||
};
|
|
||||||
|
|
||||||
TRACE("%s %s %x %x %s %s\n", debugstr_w(szProduct), debugstr_w(szUserSid),
|
TRACE("%s %s %x %x %s %s\n", debugstr_w(szProduct), debugstr_w(szUserSid),
|
||||||
dwContext, dwOptions, debugstr_w(szProperty), debugstr_w(szValue));
|
dwContext, dwOptions, debugstr_w(szProperty), debugstr_w(szValue));
|
||||||
|
|
||||||
if (!szProduct || !squash_guid(szProduct, squished_pc))
|
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!szProperty)
|
if (!szProperty)
|
||||||
|
@ -845,12 +827,9 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
|
||||||
UINT WINAPI MsiSourceListAddSourceW( LPCWSTR szProduct, LPCWSTR szUserName,
|
UINT WINAPI MsiSourceListAddSourceW( LPCWSTR szProduct, LPCWSTR szUserName,
|
||||||
DWORD dwReserved, LPCWSTR szSource)
|
DWORD dwReserved, LPCWSTR szSource)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR *sidstr = NULL, squashed_pc[SQUASHED_GUID_SIZE];
|
||||||
INT ret;
|
INT ret;
|
||||||
LPWSTR sidstr = NULL;
|
DWORD sidsize = 0, domsize = 0, context;
|
||||||
DWORD sidsize = 0;
|
|
||||||
DWORD domsize = 0;
|
|
||||||
DWORD context;
|
|
||||||
HKEY hkey = 0;
|
HKEY hkey = 0;
|
||||||
UINT r;
|
UINT r;
|
||||||
|
|
||||||
|
@ -862,7 +841,7 @@ UINT WINAPI MsiSourceListAddSourceW( LPCWSTR szProduct, LPCWSTR szUserName,
|
||||||
if (dwReserved != 0)
|
if (dwReserved != 0)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!szProduct || !squash_guid(szProduct, squished_pc))
|
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!szUserName || !*szUserName)
|
if (!szUserName || !*szUserName)
|
||||||
|
@ -1056,24 +1035,19 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
|
||||||
MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szSource,
|
MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szSource,
|
||||||
DWORD dwIndex)
|
DWORD dwIndex)
|
||||||
{
|
{
|
||||||
HKEY sourcekey;
|
static const WCHAR fmt[] = {'%','i',0};
|
||||||
HKEY typekey;
|
HKEY sourcekey, typekey;
|
||||||
UINT rc;
|
UINT rc;
|
||||||
struct list sourcelist;
|
struct list sourcelist;
|
||||||
media_info *info;
|
media_info *info;
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR *source, squashed_pc[SQUASHED_GUID_SIZE], name[10];
|
||||||
WCHAR name[10];
|
|
||||||
LPWSTR source;
|
|
||||||
LPCWSTR postfix;
|
LPCWSTR postfix;
|
||||||
DWORD size, count;
|
DWORD size, count, index;
|
||||||
DWORD index;
|
|
||||||
|
|
||||||
static const WCHAR fmt[] = {'%','i',0};
|
|
||||||
|
|
||||||
TRACE("%s %s %x %x %s %i\n", debugstr_w(szProduct), debugstr_w(szUserSid),
|
TRACE("%s %s %x %x %s %i\n", debugstr_w(szProduct), debugstr_w(szUserSid),
|
||||||
dwContext, dwOptions, debugstr_w(szSource), dwIndex);
|
dwContext, dwOptions, debugstr_w(szSource), dwIndex);
|
||||||
|
|
||||||
if (!szProduct || !squash_guid(szProduct, squished_pc))
|
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!szSource || !*szSource)
|
if (!szSource || !*szSource)
|
||||||
|
@ -1215,21 +1189,17 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
|
||||||
MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwDiskId,
|
MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwDiskId,
|
||||||
LPCWSTR szVolumeLabel, LPCWSTR szDiskPrompt)
|
LPCWSTR szVolumeLabel, LPCWSTR szDiskPrompt)
|
||||||
{
|
{
|
||||||
HKEY sourcekey;
|
|
||||||
HKEY mediakey;
|
|
||||||
UINT rc;
|
|
||||||
WCHAR szIndex[10];
|
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
|
||||||
LPWSTR buffer;
|
|
||||||
DWORD size;
|
|
||||||
|
|
||||||
static const WCHAR fmt[] = {'%','i',0};
|
static const WCHAR fmt[] = {'%','i',0};
|
||||||
|
HKEY sourcekey, mediakey;
|
||||||
|
UINT rc;
|
||||||
|
WCHAR *buffer, squashed_pc[SQUASHED_GUID_SIZE], szIndex[10];
|
||||||
|
DWORD size;
|
||||||
|
|
||||||
TRACE("%s %s %x %x %i %s %s\n", debugstr_w(szProduct),
|
TRACE("%s %s %x %x %i %s %s\n", debugstr_w(szProduct),
|
||||||
debugstr_w(szUserSid), dwContext, dwOptions, dwDiskId,
|
debugstr_w(szUserSid), dwContext, dwOptions, dwDiskId,
|
||||||
debugstr_w(szVolumeLabel), debugstr_w(szDiskPrompt));
|
debugstr_w(szVolumeLabel), debugstr_w(szDiskPrompt));
|
||||||
|
|
||||||
if (!szProduct || !squash_guid(szProduct, squished_pc))
|
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (dwOptions != MSICODE_PRODUCT && dwOptions != MSICODE_PATCH)
|
if (dwOptions != MSICODE_PRODUCT && dwOptions != MSICODE_PATCH)
|
||||||
|
|
|
@ -2721,7 +2721,7 @@ UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg )
|
||||||
IEnumSTATSTG *stgenum = NULL;
|
IEnumSTATSTG *stgenum = NULL;
|
||||||
TRANSFORMDATA *transform;
|
TRANSFORMDATA *transform;
|
||||||
TRANSFORMDATA *tables = NULL, *columns = NULL;
|
TRANSFORMDATA *tables = NULL, *columns = NULL;
|
||||||
HRESULT r;
|
HRESULT hr;
|
||||||
STATSTG stat;
|
STATSTG stat;
|
||||||
string_table *strings;
|
string_table *strings;
|
||||||
UINT ret = ERROR_FUNCTION_FAILED;
|
UINT ret = ERROR_FUNCTION_FAILED;
|
||||||
|
@ -2734,8 +2734,8 @@ UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg )
|
||||||
if( !strings )
|
if( !strings )
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
r = IStorage_EnumElements( stg, 0, NULL, 0, &stgenum );
|
hr = IStorage_EnumElements( stg, 0, NULL, 0, &stgenum );
|
||||||
if( FAILED( r ) )
|
if (FAILED( hr ))
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
list_init(&transforms);
|
list_init(&transforms);
|
||||||
|
@ -2746,8 +2746,8 @@ UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg )
|
||||||
WCHAR name[0x40];
|
WCHAR name[0x40];
|
||||||
ULONG count = 0;
|
ULONG count = 0;
|
||||||
|
|
||||||
r = IEnumSTATSTG_Next( stgenum, 1, &stat, &count );
|
hr = IEnumSTATSTG_Next( stgenum, 1, &stat, &count );
|
||||||
if ( FAILED( r ) || !count )
|
if (FAILED( hr ) || !count)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
decode_streamname( stat.pwcsName, name );
|
decode_streamname( stat.pwcsName, name );
|
||||||
|
@ -2777,12 +2777,10 @@ UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg )
|
||||||
TRACE("transform contains stream %s\n", debugstr_w(name));
|
TRACE("transform contains stream %s\n", debugstr_w(name));
|
||||||
|
|
||||||
/* load the table */
|
/* load the table */
|
||||||
r = TABLE_CreateView( db, transform->name, (MSIVIEW**) &tv );
|
if (TABLE_CreateView( db, transform->name, (MSIVIEW**) &tv ) != ERROR_SUCCESS)
|
||||||
if( r != ERROR_SUCCESS )
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
r = tv->view.ops->execute( &tv->view, NULL );
|
if (tv->view.ops->execute( &tv->view, NULL ) != ERROR_SUCCESS)
|
||||||
if( r != ERROR_SUCCESS )
|
|
||||||
{
|
{
|
||||||
tv->view.ops->delete( &tv->view );
|
tv->view.ops->delete( &tv->view );
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -92,10 +92,8 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
|
||||||
static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
|
static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
|
||||||
{
|
{
|
||||||
MSIPACKAGE *package = param;
|
MSIPACKAGE *package = param;
|
||||||
WCHAR product[GUID_SIZE];
|
WCHAR product[SQUASHED_GUID_SIZE];
|
||||||
DWORD index = 0;
|
DWORD index = 0, attributes = 0, sz = sizeof(product)/sizeof(product[0]);
|
||||||
DWORD attributes = 0;
|
|
||||||
DWORD sz = GUID_SIZE;
|
|
||||||
LPCWSTR upgrade_code;
|
LPCWSTR upgrade_code;
|
||||||
HKEY hkey = 0;
|
HKEY hkey = 0;
|
||||||
UINT rc = ERROR_SUCCESS;
|
UINT rc = ERROR_SUCCESS;
|
||||||
|
|
|
@ -112,7 +112,7 @@ reactos/dll/win32/msg711.acm # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/msgsm32.acm # Synced to WineStaging-1.9.11
|
reactos/dll/win32/msgsm32.acm # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/mshtml # Synced to WineStaging-1.7.55
|
reactos/dll/win32/mshtml # Synced to WineStaging-1.7.55
|
||||||
reactos/dll/win32/mshtml.tlb # Synced to WineStaging-1.7.55
|
reactos/dll/win32/mshtml.tlb # Synced to WineStaging-1.7.55
|
||||||
reactos/dll/win32/msi # Synced to WineStaging-1.9.16
|
reactos/dll/win32/msi # Synced to WineStaging-1.9.23
|
||||||
reactos/dll/win32/msimg32 # Synced to WineStaging-1.9.11
|
reactos/dll/win32/msimg32 # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/msimtf # Synced to WineStaging-1.9.23
|
reactos/dll/win32/msimtf # Synced to WineStaging-1.9.23
|
||||||
reactos/dll/win32/msisip # Synced to WineStaging-1.9.11
|
reactos/dll/win32/msisip # Synced to WineStaging-1.9.11
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue