summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-01-11 17:16:38 +0300
committerAndras Timar <andras.timar@collabora.com>2020-01-12 13:20:24 +0100
commit87103d71e733ab6d7aaf6a390932d3056fafe858 (patch)
tree7b3ad51fccd2a043a3b97a27cdc109694db4b75a
parent350d25da375f221edfa37309324ce3c68cf297ef (diff)
Make RunQuickstartAtFirstStart branding-dependent key
This should not be common to all installed branded flavors of LibreOffice. This is controlled by an installer option, and so should be specific to an installation. Change-Id: I88d30d947b6114f5a271286b226b0e22c171265a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86603 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--desktop/source/app/app.cxx4
-rw-r--r--scp2/source/quickstart/registryitem_quickstart.scp2
2 files changed, 4 insertions, 2 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index ea01399eb954..96172623cb45 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -48,6 +48,7 @@
#endif
#include <i18nlangtag/languagetag.hxx>
+#include <o3tl/char16_t2wchar_t.hxx>
#include <o3tl/runtimetooustring.hxx>
#include <svl/languageoptions.hxx>
#include <svtools/javacontext.hxx>
@@ -2549,10 +2550,11 @@ void Desktop::CheckFirstRun( )
#ifdef _WIN32
// Check if Quickstarter should be started (on Windows only)
+ OUString sRootKey = ReplaceStringHookProc("Software\\%OOOVENDOR\\%PRODUCTNAME\\%PRODUCTVERSION");
WCHAR szValue[8192];
DWORD nValueSize = sizeof(szValue);
HKEY hKey;
- if ( ERROR_SUCCESS == RegOpenKeyW( HKEY_LOCAL_MACHINE, L"Software\\LibreOffice", &hKey ) )
+ if (ERROR_SUCCESS == RegOpenKeyW(HKEY_LOCAL_MACHINE, o3tl::toW(sRootKey.getStr()), &hKey))
{
if ( ERROR_SUCCESS == RegQueryValueExW( hKey, L"RunQuickstartAtFirstStart", nullptr, nullptr, reinterpret_cast<LPBYTE>(szValue), &nValueSize ) )
{
diff --git a/scp2/source/quickstart/registryitem_quickstart.scp b/scp2/source/quickstart/registryitem_quickstart.scp
index 58b794e2bd3f..3f015aa61dc6 100644
--- a/scp2/source/quickstart/registryitem_quickstart.scp
+++ b/scp2/source/quickstart/registryitem_quickstart.scp
@@ -20,7 +20,7 @@
RegistryItem gid_Regitem_Software_OpenOffice_RunQuickstartAtFirstStart
ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
- Subkey = "Software\LibreOffice";
+ Subkey = "Software\%MANUFACTURER\%PRODUCTNAME\%PRODUCTVERSION";
ModuleID = gid_Module_Optional_Quickstart;
Name = "RunQuickstartAtFirstStart";
Value = "1";