@@ -58,19 +58,15 @@ LR"(- For any custom themes to work SecureUxTheme or another patcher must be ins
5858 - or LogonUI must be hooked
5959)" ;
6060
61- // RegRenameKey is undocumented
62-
6361static DWORD RenameDefaultColors ()
6462{
6563 const auto old_name = std::wstring{ kCurrentColorsPath } + kCurrentColorsName ;
66- // return RegRenameKey(HKEY_LOCAL_MACHINE, old_name.c_str(), kCurrentColorsBackup);
6764 return utl::rename_key (old_name.c_str (), kCurrentColorsBackup );
6865}
6966
7067static DWORD RestoreDefaultColors ()
7168{
7269 const auto old_name = std::wstring{ kCurrentColorsPath } + kCurrentColorsBackup ;
73- // return RegRenameKey(HKEY_LOCAL_MACHINE, old_name.c_str(), kCurrentColorsName);
7470 return utl::rename_key (old_name.c_str (), kCurrentColorsName );
7571}
7672
@@ -92,6 +88,13 @@ static std::wstring GetPatcherDllPath()
9288 return path;
9389}
9490
91+ static bool IsWin10 ()
92+ {
93+ ULONG major = 0 , minor = 0 , build = 0 ;
94+ RtlGetNtVersionNumbers (&major, &minor, &build);
95+ return major == 10 ;
96+ }
97+
9598static bool IsLoadedInSession ()
9699{
97100 const auto h = OpenEventW (
@@ -506,7 +509,7 @@ void MainDialog::UpdatePatcherState()
506509 _is_loaded =
507510 is_loaded
508511 ? PatcherState::Yes
509- : (_is_installed == PatcherState::Outdated ? PatcherState::Probably : PatcherState::No);
512+ : (_is_installed == PatcherState::Outdated || (! IsWin10 () && _is_installed == PatcherState::Yes) ? PatcherState::Probably : PatcherState::No);
510513 _is_logonui = reg_logonui ? PatcherState::Yes : PatcherState::No;
511514 _is_explorer = reg_explorer ? PatcherState::Yes : PatcherState::No;
512515 _is_systemsettings = reg_systemsettings ? PatcherState::Yes : PatcherState::No;
@@ -732,7 +735,7 @@ Are you sure you want to continue?)",
732735%s
733736The error encountered was: %s.
734737Do you want to continue?)" ,
735- _is_elevated
738+ ! _is_elevated
736739 ? L" Try executing the tool as administrator."
737740 : L" It seems like we're already elevated. Consider submitting a but report." ,
738741 utl::ErrorToString (fix_result).c_str ()
@@ -742,7 +745,7 @@ Do you want to continue?)",
742745 return ;
743746 }
744747
745- if (_is_installed == PatcherState::Yes && _is_loaded != PatcherState::Yes )
748+ if (_is_installed == PatcherState::Yes && _is_loaded == PatcherState::No )
746749 {
747750 const auto answer = utl::FormattedMessageBox (
748751 _hwnd,
0 commit comments