From 3dfd4a533264807898a2d1b58f113ba48ee6f13d Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 23 Jul 2017 11:57:25 +0200 Subject: Windows: display notice about creating new Rescue Disk at first boot after upgrade. --- src/Common/Dlgcode.c | 13 +++++++++++++ src/Common/Dlgcode.h | 5 ++++- src/Common/Language.xml | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) (limited to 'src/Common') diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 5dedcd7e..a5c5a293 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -2534,6 +2534,7 @@ void SavePostInstallTasksSettings (int command) case TC_POST_INSTALL_CFG_REMOVE_ALL: _wremove (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_TUTORIAL)); _wremove (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES)); + _wremove (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_RESCUE_DISK)); break; case TC_POST_INSTALL_CFG_TUTORIAL: @@ -2544,6 +2545,10 @@ void SavePostInstallTasksSettings (int command) f = _wfopen (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES), L"w"); break; + case TC_POST_INSTALL_CFG_RESCUE_DISK: + f = _wfopen (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_RESCUE_DISK), L"w"); + break; + default: return; } @@ -2584,6 +2589,14 @@ void DoPostInstallTasks (HWND hwndDlg) bDone = TRUE; } + if (FileExists (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_RESCUE_DISK))) + { + if (AskYesNo ("AFTER_UPGRADE_RESCUE_DISK", hwndDlg) == IDYES) + PostMessage (hwndDlg, VC_APPMSG_CREATE_RESCUE_DISK, 0, 0); + + bDone = TRUE; + } + if (bDone) SavePostInstallTasksSettings (TC_POST_INSTALL_CFG_REMOVE_ALL); } diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h index d2db4ba4..a997bfa8 100644 --- a/src/Common/Dlgcode.h +++ b/src/Common/Dlgcode.h @@ -79,6 +79,7 @@ enum #define TC_APPD_FILENAME_NONSYS_INPLACE_ENC_WIPE L"In-Place Encryption Wipe Algo" #define TC_APPD_FILENAME_POST_INSTALL_TASK_TUTORIAL L"Post-Install Task - Tutorial" #define TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES L"Post-Install Task - Release Notes" +#define TC_APPD_FILENAME_POST_INSTALL_TASK_RESCUE_DISK L"Post-Install Task - Rescue Disk" #define VC_FILENAME_RENAMED_SUFFIX L"_old" @@ -94,7 +95,8 @@ enum { TC_POST_INSTALL_CFG_REMOVE_ALL = 0, TC_POST_INSTALL_CFG_TUTORIAL, - TC_POST_INSTALL_CFG_RELEASE_NOTES + TC_POST_INSTALL_CFG_RELEASE_NOTES, + TC_POST_INSTALL_CFG_RESCUE_DISK, }; extern char *LastDialogId; @@ -178,6 +180,7 @@ enum tc_app_msg_ids TC_APPMSG_MOUNT_ENABLE_DISABLE_CONTROLS = WM_APP + 201, TC_APPMSG_MOUNT_SHOW_WINDOW = WM_APP + 202, TC_APPMSG_PREBOOT_PASSWORD_MODE = WM_APP + 203, + VC_APPMSG_CREATE_RESCUE_DISK = WM_APP + 204, // Format TC_APPMSG_VOL_TRANSFORM_THREAD_ENDED = WM_APP + 301, TC_APPMSG_FORMAT_FINISHED = WM_APP + 302, diff --git a/src/Common/Language.xml b/src/Common/Language.xml index ab348a82..4fc56d28 100644 --- a/src/Common/Language.xml +++ b/src/Common/Language.xml @@ -1422,6 +1422,7 @@ WARNING: Inexperienced users should never attempt to manually edit boot loader configurations.\n\nContinue? WARNING: Failed to validate the XML format of the Boot Loader configuration. Please check your modifications. Advanced Options + It is strongly recommended that you create a new VeraCrypt Rescue Disk (which will contain the new version of the VeraCrypt Boot Loader) by selecting 'System' > 'Create Rescue Disk'.\nDo you want to do it now? -- cgit v1.2.3