VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-09-03 00:58:34 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-09-03 00:58:34 +0200
commitd68b9546bd36fa34093b8592d3927ba581fc8e59 (patch)
tree6aa7b9d98cfc9bf526662cbfb1d4805652de2196 /src/Setup
parent7b48d16fbd3340f052a41a5c40b75d81e93cc012 (diff)
downloadVeraCrypt-d68b9546bd36fa34093b8592d3927ba581fc8e59.tar.gz
VeraCrypt-d68b9546bd36fa34093b8592d3927ba581fc8e59.zip
Windows: simpler and more robust safe dll loading combined with delay loading thanks to Windows 7 being minimum supported version.
We also block execution on Windows versions older than Windows 7. A lot of code was removed thanks to this.
Diffstat (limited to 'src/Setup')
-rw-r--r--src/Setup/Portable.vcxproj8
-rw-r--r--src/Setup/Setup.c5
-rw-r--r--src/Setup/Setup.vcxproj8
3 files changed, 8 insertions, 13 deletions
diff --git a/src/Setup/Portable.vcxproj b/src/Setup/Portable.vcxproj
index 07ffdc61..1c758b2b 100644
--- a/src/Setup/Portable.vcxproj
+++ b/src/Setup/Portable.vcxproj
@@ -108,7 +108,7 @@
<AdditionalDependencies>libcmtd.lib;atlsd.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;mpr.dll;bcrypt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Portable.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
@@ -146,7 +146,7 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl
<AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;mpr.dll;bcrypt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -184,7 +184,7 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl
<AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;mpr.dll;bcrypt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -222,7 +222,7 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl
<AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;mpr.dll;bcrypt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index 33fcab85..e505bb05 100644
--- a/src/Setup/Setup.c
+++ b/src/Setup/Setup.c
@@ -2782,7 +2782,6 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
if (IsAdmin () != TRUE)
if (MessageBoxW (NULL, GetString ("SETUP_ADMIN"), lpszTitle, MB_YESNO | MB_ICONQUESTION) != IDYES)
{
- FinalizeApp ();
exit (1);
}
#endif
@@ -2835,7 +2834,6 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
#else
MessageBox (NULL, L"Error: This portable installer file does not contain any compressed files.\n\nTo create a self-extracting portable installation package (with embedded compressed files), run:\n\"VeraCrypt Portable.exe\" /p", L"VeraCrypt", MB_ICONERROR | MB_SETFOREGROUND | MB_TOPMOST);
#endif
- FinalizeApp ();
exit (1);
}
@@ -2856,7 +2854,6 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
bUninstall = TRUE;
break;
default:
- FinalizeApp ();
exit (1);
}
}
@@ -2890,7 +2887,6 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
)
{
// Language dialog cancelled by user: exit the installer
- FinalizeApp ();
exit (1);
}
}
@@ -2927,6 +2923,5 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
}
#endif
}
- FinalizeApp ();
return 0;
}
diff --git a/src/Setup/Setup.vcxproj b/src/Setup/Setup.vcxproj
index bd0f6447..d1159c0b 100644
--- a/src/Setup/Setup.vcxproj
+++ b/src/Setup/Setup.vcxproj
@@ -108,7 +108,7 @@
<AdditionalDependencies>libcmtd.lib;atlsd.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;..\Common\Debug\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;bcrypt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Setup.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
@@ -147,7 +147,7 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" &gt;NUL
<AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;bcrypt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -185,7 +185,7 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" &gt;NUL
<AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;bcrypt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -223,7 +223,7 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" &gt;NUL
<AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;..\Common\Release\lzma.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;bcrypt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>