VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup
diff options
context:
space:
mode:
Diffstat (limited to 'src/Setup')
-rw-r--r--src/Setup/Portable.rc4
-rw-r--r--src/Setup/Setup.c18
-rw-r--r--src/Setup/Setup.rc4
3 files changed, 21 insertions, 5 deletions
diff --git a/src/Setup/Portable.rc b/src/Setup/Portable.rc
index 0574854a..1ecfa8fd 100644
--- a/src/Setup/Portable.rc
+++ b/src/Setup/Portable.rc
@@ -26,8 +26,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,26,17,0
- PRODUCTVERSION 1,26,17,0
+ FILEVERSION 1,26,17,2
+ PRODUCTVERSION 1,26,17,2
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index 0a66dccd..ed236616 100644
--- a/src/Setup/Setup.c
+++ b/src/Setup/Setup.c
@@ -765,6 +765,9 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir)
BOOL bOK = TRUE;
int i, x, fileNo;
wchar_t curFileName [TC_MAX_PATH] = {0};
+#ifndef PORTABLE
+ PRIVILEGE_STATE originalPrivileges = { 0 };
+#endif
if (!bUninstall && !bDevm)
{
@@ -783,6 +786,10 @@ BOOL DoFilesInstall (HWND hwndDlg, wchar_t *szDestDir)
if (szDestDir[x - 1] != L'\\')
StringCbCatW (szDestDir, MAX_PATH, L"\\");
+#ifndef PORTABLE
+ EnableRequiredSetupPrivileges(&originalPrivileges);
+#endif
+
for (i = 0; i < sizeof (szFiles) / sizeof (szFiles[0]); i++)
{
BOOL bResult, zipFile = FALSE;
@@ -1114,10 +1121,19 @@ err:
if (lpMsgBuf) LocalFree (lpMsgBuf);
- if (!Silent && MessageBoxW (hwndDlg, szTmp2, lpszTitle, MB_YESNO | MB_ICONHAND) != IDYES)
+ if (!Silent && MessageBoxW(hwndDlg, szTmp2, lpszTitle, MB_YESNO | MB_ICONHAND) != IDYES)
+ {
+#ifndef PORTABLE
+ RestorePrivilegeState(&originalPrivileges);
+#endif
return FALSE;
+ }
}
}
+
+#ifndef PORTABLE
+ RestorePrivilegeState(&originalPrivileges);
+#endif
if (bUninstall == FALSE)
{
diff --git a/src/Setup/Setup.rc b/src/Setup/Setup.rc
index d4107dfd..34b138b7 100644
--- a/src/Setup/Setup.rc
+++ b/src/Setup/Setup.rc
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,26,17,0
- PRODUCTVERSION 1,26,17,0
+ FILEVERSION 1,26,17,2
+ PRODUCTVERSION 1,26,17,2
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L