From ebb67499f1eda64d3a6f7705fe6ec0c5fd12a1e3 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 2 Feb 2022 01:21:35 +0100 Subject: Windows: Fix failure to create Traveler Disk when VeraCrypt is installed using MSI --- src/SetupDLL/Setup.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/SetupDLL') 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 ()) -- cgit v1.2.3