'I','n','s','t','a','l','l','e','r','\\','F','e','a','t','u','r','e','s','\\',0};
static const WCHAR szInstaller_ClassesUpgradeCode[] = {
+ 'S','o','f','t','w','a','r','e','\\','C','l','a','s','s','e','s','\\',
'I','n','s','t','a','l','l','e','r','\\','U','p','g','r','a','d','e','C','o','d','e','s','\\',0};
static const WCHAR szInstaller_ClassesUpgradeCodes[] = {
+ 'S','o','f','t','w','a','r','e','\\','C','l','a','s','s','e','s','\\',
'I','n','s','t','a','l','l','e','r','\\','U','p','g','r','a','d','e','C','o','d','e','s',0};
static const WCHAR szInstaller_Features[] = {
strcpyW(keypath, szInstaller_ClassesUpgradeCode);
strcatW(keypath, squished_pc);
- if (create) return RegCreateKeyExW(HKEY_CLASSES_ROOT, keypath, 0, NULL, 0, access, NULL, key, NULL);
- return RegOpenKeyExW(HKEY_CLASSES_ROOT, keypath, 0, access, key);
+ if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
+ return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
}
UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode)
if (!squash_guid(szUpgradeCode, squished_pc)) return ERROR_FUNCTION_FAILED;
TRACE("%s squished %s\n", debugstr_w(szUpgradeCode), debugstr_w(squished_pc));
- if (RegOpenKeyExW(HKEY_CLASSES_ROOT, 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);
RegCloseKey(hkey);
return r;
UINT r;
WCHAR szKeyName[SQUISH_GUID_SIZE];
HKEY key;
+ REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
DWORD machine_count, managed_count, unmanaged_count;
WCHAR keypath[MAX_PATH];
LPWSTR usersid = NULL;
return ERROR_INVALID_PARAMETER;
key = 0;
- r = RegCreateKeyW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesProducts, &key);
+ r = RegCreateKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesProducts, 0, NULL, 0, access, NULL, &key, NULL);
if( r != ERROR_SUCCESS ) goto failed;
r = RegQueryInfoKeyW(key, NULL, NULL, NULL, &machine_count, NULL, NULL,
sprintfW(keypath, szInstaller_LocalManaged_fmt, usersid);
LocalFree(usersid);
- r = RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, &key);
+ r = RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &key, NULL);
if( r != ERROR_SUCCESS ) goto failed;
r = RegQueryInfoKeyW(key, NULL, NULL, NULL, &managed_count, NULL, NULL,
UINT WINAPI MsiEnumComponentsW(DWORD index, LPWSTR lpguid)
{
- HKEY hkeyComponents = 0;
- DWORD r;
+ HKEY hkey;
+ REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
WCHAR szKeyName[SQUISH_GUID_SIZE];
+ DWORD r;
TRACE("%d %p\n", index, lpguid);
- r = RegCreateKeyW(HKEY_LOCAL_MACHINE, szInstaller_Components, &hkeyComponents);
+ r = RegCreateKeyExW(HKEY_LOCAL_MACHINE, szInstaller_Components, 0, NULL, 0, access, NULL, &hkey, NULL);
if( r != ERROR_SUCCESS )
return ERROR_NO_MORE_ITEMS;
- r = RegEnumKeyW(hkeyComponents, index, szKeyName, SQUISH_GUID_SIZE);
+ r = RegEnumKeyW(hkey, index, szKeyName, SQUISH_GUID_SIZE);
if( r == ERROR_SUCCESS )
unsquash_guid(szKeyName, lpguid);
- RegCloseKey(hkeyComponents);
+ RegCloseKey(hkey);
return r;
}
static const CHAR badprod[] = "Software\\Microsoft\\Windows\\CurrentVersion"
"\\Installer\\Products"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
- static const CHAR machprod[] = "Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
- static const CHAR machup[] = "Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
+ static const CHAR machprod[] = "Software\\Classes\\Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
+ static const CHAR machup[] = "Software\\Classes\\Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
if (is_process_limited())
{
RegCloseKey(hkey);
machprod:
- res = RegOpenKeyExA(HKEY_CLASSES_ROOT, machprod, 0, access, &hkey);
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, machprod, 0, access, &hkey);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST");
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
RegCloseKey(hkey);
- res = RegOpenKeyExA(HKEY_CLASSES_ROOT, machup, 0, access, &hkey);
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, machup, 0, access, &hkey);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL);