aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/registration.cpp
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2022-01-09 23:23:51 -0500
committerBob Arnson <github@bobs.org>2022-01-10 00:47:18 -0500
commita96db4a508f1d1774500ab89f2c57e581fb5a13a (patch)
tree40de5d2904e564e28c04c5816fd7528f8f090e2c /src/burn/engine/registration.cpp
parentbae756f4354fed4de6097c931590ccafc907fdb2 (diff)
downloadwix-a96db4a508f1d1774500ab89f2c57e581fb5a13a.tar.gz
wix-a96db4a508f1d1774500ab89f2c57e581fb5a13a.tar.bz2
wix-a96db4a508f1d1774500ab89f2c57e581fb5a13a.zip
Add registry bitness to RegUtil and BUtil.
Fixes https://github.com/wixtoolset/issues/issues/6669. Fixes https://github.com/wixtoolset/issues/issues/6670.
Diffstat (limited to 'src/burn/engine/registration.cpp')
-rw-r--r--src/burn/engine/registration.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp
index ffeb39d1..a5b061eb 100644
--- a/src/burn/engine/registration.cpp
+++ b/src/burn/engine/registration.cpp
@@ -1742,38 +1742,38 @@ static BOOL IsRegistryRebootPending()
1742 HKEY hk = NULL; 1742 HKEY hk = NULL;
1743 BOOL fRebootPending = FALSE; 1743 BOOL fRebootPending = FALSE;
1744 1744
1745 hr = RegKeyReadNumber(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\ServerManager", L"CurrentRebootAttempts", TRUE, &dwValue); 1745 hr = RegKeyReadNumber(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\ServerManager", L"CurrentRebootAttempts", REG_KEY_DEFAULT, &dwValue);
1746 fRebootPending = SUCCEEDED(hr) && 0 < dwValue; 1746 fRebootPending = SUCCEEDED(hr) && 0 < dwValue;
1747 1747
1748 if (!fRebootPending) 1748 if (!fRebootPending)
1749 { 1749 {
1750 hr = RegKeyReadNumber(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Updates", L"UpdateExeVolatile", TRUE, &dwValue); 1750 hr = RegKeyReadNumber(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Updates", L"UpdateExeVolatile", REG_KEY_DEFAULT, &dwValue);
1751 fRebootPending = SUCCEEDED(hr) && 0 < dwValue; 1751 fRebootPending = SUCCEEDED(hr) && 0 < dwValue;
1752 1752
1753 if (!fRebootPending) 1753 if (!fRebootPending)
1754 { 1754 {
1755 fRebootPending = RegValueExists(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Component Based Servicing\\RebootPending", NULL, TRUE); 1755 fRebootPending = RegValueExists(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Component Based Servicing\\RebootPending", NULL, REG_KEY_DEFAULT);
1756 1756
1757 if (!fRebootPending) 1757 if (!fRebootPending)
1758 { 1758 {
1759 fRebootPending = RegValueExists(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Component Based Servicing\\RebootInProgress", NULL, TRUE); 1759 fRebootPending = RegValueExists(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Component Based Servicing\\RebootInProgress", NULL, REG_KEY_DEFAULT);
1760 1760
1761 if (!fRebootPending) 1761 if (!fRebootPending)
1762 { 1762 {
1763 hr = RegKeyReadNumber(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsUpdate\\Auto Update", L"AUState", TRUE, &dwValue); 1763 hr = RegKeyReadNumber(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsUpdate\\Auto Update", L"AUState", REG_KEY_DEFAULT, &dwValue);
1764 fRebootPending = SUCCEEDED(hr) && 8 == dwValue; 1764 fRebootPending = SUCCEEDED(hr) && 8 == dwValue;
1765 1765
1766 if (!fRebootPending) 1766 if (!fRebootPending)
1767 { 1767 {
1768 fRebootPending = RegValueExists(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Session Manager", L"PendingFileRenameOperations", TRUE); 1768 fRebootPending = RegValueExists(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Session Manager", L"PendingFileRenameOperations", REG_KEY_DEFAULT);
1769 1769
1770 if (!fRebootPending) 1770 if (!fRebootPending)
1771 { 1771 {
1772 fRebootPending = RegValueExists(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Session Manager", L"PendingFileRenameOperations2", TRUE); 1772 fRebootPending = RegValueExists(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Session Manager", L"PendingFileRenameOperations2", REG_KEY_DEFAULT);
1773 1773
1774 if (!fRebootPending) 1774 if (!fRebootPending)
1775 { 1775 {
1776 hr = RegOpen(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\FileRenameOperations", KEY_READ | KEY_WOW64_64KEY, &hk); 1776 hr = RegOpenEx(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\FileRenameOperations", KEY_READ, REG_KEY_DEFAULT, &hk);
1777 if (SUCCEEDED(hr)) 1777 if (SUCCEEDED(hr))
1778 { 1778 {
1779 DWORD cSubKeys = 0; 1779 DWORD cSubKeys = 0;