summaryrefslogtreecommitdiff
path: root/configmgr/source/winreg.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-07-14 10:44:52 +0100
committerAndras Timar <andras.timar@collabora.com>2015-07-14 20:20:32 +0000
commit097292feab4fc3c064983e1dd08ac4bebe1fe216 (patch)
tree9462e11e11b8013c25936cde79f96c0760c56d8d /configmgr/source/winreg.cxx
parent0a7375e372ee9583d31d44a7cc7b6a21e6197bf1 (diff)
Add HKEY_CURRENT_USER registry integration.
It seems rather odd that we dump this to a file and parse again to me. Change-Id: Ia32ba9ff3e7878d40032bd7d10fba2c143d11757 Reviewed-on: https://gerrit.libreoffice.org/17033 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'configmgr/source/winreg.cxx')
-rw-r--r--configmgr/source/winreg.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/configmgr/source/winreg.cxx b/configmgr/source/winreg.cxx
index a5723d7588ef..455c7119f329 100644
--- a/configmgr/source/winreg.cxx
+++ b/configmgr/source/winreg.cxx
@@ -188,10 +188,11 @@ void dumpWindowsRegistryKey(HKEY hKey, OUString aKeyName, oslFileHandle aFileHan
}
}
-bool dumpWindowsRegistry(OUString* pFileURL)
+bool dumpWindowsRegistry(OUString* pFileURL, WinRegType eType)
{
HKEY hKey;
- if(RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Policies\\LibreOffice", 0, KEY_READ, &hKey) != ERROR_SUCCESS)
+ HKEY hDomain = eType == LOCAL_MACHINE ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
+ if(RegOpenKeyExW(hDomain, L"SOFTWARE\\Policies\\LibreOffice", 0, KEY_READ, &hKey) != ERROR_SUCCESS)
{
SAL_INFO(
"configmgr",