Index: dll/win32/syssetup/wizard.c =================================================================== --- dll/win32/syssetup/wizard.c (révision 63798) +++ dll/win32/syssetup/wizard.c (copie de travail) @@ -862,6 +862,8 @@ { STARTUPINFOW StartupInfo; PROCESS_INFORMATION ProcessInformation; + MSG msg; + DWORD ret; WCHAR CmdLine[MAX_PATH] = L"rundll32.exe shell32.dll,Control_RunDLL "; ZeroMemory(&StartupInfo, sizeof(StartupInfo)); @@ -870,7 +872,7 @@ ASSERT(_countof(CmdLine) > wcslen(CmdLine) + wcslen(pwszCPLParameters)); wcscat(CmdLine, pwszCPLParameters); - if (!CreateProcessW(NULL, + if (CreateProcessW(NULL, CmdLine, NULL, NULL, @@ -881,14 +883,34 @@ &StartupInfo, &ProcessInformation)) { + EnableWindow(hwnd, FALSE); + for (;;) + { + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + if (msg.message == WM_QUIT) + goto done; + TranslateMessage(&msg); + DispatchMessage(&msg); + } + + ret = MsgWaitForMultipleObjects(1, &ProcessInformation.hProcess, FALSE, INFINITE, QS_ALLEVENTS | QS_ALLINPUT); + if (ret == WAIT_OBJECT_0) + break; + } + done: + EnableWindow(hwnd, TRUE); + + CloseHandle(ProcessInformation.hThread); + CloseHandle(ProcessInformation.hProcess); + return TRUE; + } + else + { MessageBoxW(hwnd, L"Error: Failed to launch the Control Panel Applet.", NULL, MB_ICONERROR); return FALSE; } - WaitForSingleObject(ProcessInformation.hProcess, INFINITE); - CloseHandle(ProcessInformation.hThread); - CloseHandle(ProcessInformation.hProcess); - return TRUE; } else {