[ui] fix Windows format prompts not being suppressed

This commit is contained in:
Pete Batard 2019-07-08 19:21:40 +01:00
parent 1bbb053f70
commit 3e1d0b309f
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
3 changed files with 9 additions and 7 deletions

View file

@ -1998,7 +1998,8 @@ void SetAlertPromptMessages(void)
char mui_path[MAX_PATH];
// Fetch the localized strings in the relevant MUI
static_sprintf(mui_path, "%s\\%s\\shell32.dll.mui", system_dir, GetCurrentMUI());
// Must use sysnative_dir rather than system_dir as we may not find the MUI's otherwise
static_sprintf(mui_path, "%s\\%s\\shell32.dll.mui", sysnative_dir, GetCurrentMUI());
mui_lib = LoadLibraryU(mui_path);
if (mui_lib != NULL) {
// 4097 = "You need to format the disk in drive %c: before you can use it." (dialog text)
@ -2014,7 +2015,7 @@ void SetAlertPromptMessages(void)
}
FreeLibrary(mui_lib);
}
static_sprintf(mui_path, "%s\\%s\\urlmon.dll.mui", system_dir, GetCurrentMUI());
static_sprintf(mui_path, "%s\\%s\\urlmon.dll.mui", sysnative_dir, GetCurrentMUI());
mui_lib = LoadLibraryU(mui_path);
if (mui_lib != NULL) {
// 2070 = "Windows Security Warning" (yes, that's what MS uses for a stupid cookie!)