VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format
diff options
context:
space:
mode:
Diffstat (limited to 'src/Format')
-rw-r--r--src/Format/Tcformat.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index d55cc064..4984e6cc 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -266,14 +266,18 @@ static BOOL ElevateWholeWizardProcess (string arguments)
GetModuleFileName (NULL, modPath, sizeof (modPath));
- if ((int)ShellExecute (MainDlg, "runas", modPath, (string("/q UAC ") + arguments).c_str(), NULL, SW_SHOWNORMAL) > 32)
- {
- exit (0);
- }
- else
+ while (true)
{
- Error ("UAC_INIT_ERROR", MainDlg);
- return FALSE;
+ if ((int)ShellExecute (MainDlg, "runas", modPath, (string("/q UAC ") + arguments).c_str(), NULL, SW_SHOWNORMAL) > 32)
+ {
+ exit (0);
+ }
+ else
+ {
+ if (IDRETRY == ErrorRetryCancel ("UAC_INIT_ERROR", MainDlg))
+ continue;
+ return FALSE;
+ }
}
}