Index: base/applications/regedit/lang/en-US.rc =================================================================== --- base/applications/regedit/lang/en-US.rc (revision 57770) +++ base/applications/regedit/lang/en-US.rc (working copy) @@ -434,7 +434,7 @@ STRINGTABLE DISCARDABLE BEGIN - IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly. If you do not trust the source of this information in '%1', do not add it to registry.\n\nAre you sure you want to continue?" + IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%1', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%1' have been successfully added to the registry." IDS_IMPORT_ERROR "Cannot import '%1': Error opening the file. There may be a disk, file system error or file may not exist." IDS_EXPORT_ERROR "Cannot export '%1': Error creating or writing to the file. There may be a disk or file system error." Index: base/applications/regedit/main.c =================================================================== --- base/applications/regedit/main.c (revision 57770) +++ base/applications/regedit/main.c (working copy) @@ -213,7 +213,7 @@ /* Perform application initialization */ if (!InitInstance(hInstance, nCmdShow)) { - return FALSE; + return 1; } hAccel = LoadAcceleratorsW(hInstance, MAKEINTRESOURCEW(ID_ACCEL)); Index: base/applications/regedit/regedit.c =================================================================== --- base/applications/regedit/regedit.c (revision 57770) +++ base/applications/regedit/regedit.c (working copy) @@ -158,10 +158,24 @@ /* Request import confirmation */ if (!silent) { + int choice; + LoadStringW(hInst, IDS_IMPORT_PROMPT, szText, COUNT_OF(szText)); - if (InfoMessageBox(NULL, MB_YESNO | MB_ICONWARNING, szTitle, szText, filename) != IDYES) - goto cont; + choice = InfoMessageBox(NULL, MB_YESNOCANCEL | MB_ICONWARNING, szTitle, szText, filename); + + switch(choice) + { + case IDNO: + goto cont; + case IDCANCEL: + /* The cancel case is useful if the user is importing more than one registry file + at a time, and wants to back out anytime during the import process. This way, the + user doesn't have to resort to ending the regedit process abruptly just to cancel + the operation. */ + return TRUE; + default:break; + } } /* Open the file */