1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 02:58:02 -06:00

Windows: Fix failure to create Traveler Disk when VeraCrypt is installed using MSI

This commit is contained in:
Mounir IDRASSI
2022-02-02 01:21:35 +01:00
parent 06841f67c7
commit ebb67499f1
2 changed files with 152 additions and 75 deletions

View File

@@ -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 ())