VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/SetupDLL/Setup.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2022-02-02 01:21:35 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2022-02-02 01:23:34 +0100
commitebb67499f1eda64d3a6f7705fe6ec0c5fd12a1e3 (patch)
treead58b69591523626cfbad36ce45988f6bc1dba4f /src/SetupDLL/Setup.c
parent06841f67c78baa3adc6eec02998ac9f96ffd27df (diff)
downloadVeraCrypt-ebb67499f1eda64d3a6f7705fe6ec0c5fd12a1e3.tar.gz
VeraCrypt-ebb67499f1eda64d3a6f7705fe6ec0c5fd12a1e3.zip
Windows: Fix failure to create Traveler Disk when VeraCrypt is installed using MSI
Diffstat (limited to 'src/SetupDLL/Setup.c')
-rw-r--r--src/SetupDLL/Setup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/SetupDLL/Setup.c b/src/SetupDLL/Setup.c
index f262a914..7ccd94f9 100644
--- a/src/SetupDLL/Setup.c
+++ b/src/SetupDLL/Setup.c
@@ -2743,6 +2743,13 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostInstall(MSIHANDLE hInstaller)
HANDLE h;
wchar_t szTmp[TC_MAX_PATH];
+ // delete "VeraCrypt Setup.exe" if it exists
+ StringCbPrintfW (szTmp, sizeof(szTmp), L"%s%s", szInstallDir.c_str(), L"VeraCrypt Setup.exe");
+ if (FileExists(szTmp))
+ {
+ ForceDeleteFile(szTmp);
+ }
+
StringCbPrintfW (szTmp, sizeof(szTmp), L"%s%s", szInstallDir.c_str(), L"VeraCrypt.exe");
if (Is64BitOs ())