VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/SetupDLL/Setup.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-09-01 17:20:01 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-09-01 17:20:01 +0200
commit71dc18aaa2a57531c95465dbab302987d6562e76 (patch)
tree296447442d06c28a1227ff191c6236c5dc429eb1 /src/SetupDLL/Setup.c
parent61fe6cc82f6d562fc25350599083912b6b3188e5 (diff)
downloadVeraCrypt-71dc18aaa2a57531c95465dbab302987d6562e76.tar.gz
VeraCrypt-71dc18aaa2a57531c95465dbab302987d6562e76.zip
Windows: Fix MSI not installing all new documentation file. Remove old files left from old versions. Increment version to 1.26.15.
Diffstat (limited to 'src/SetupDLL/Setup.c')
-rw-r--r--src/SetupDLL/Setup.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/SetupDLL/Setup.c b/src/SetupDLL/Setup.c
index e5c3337f..00d64766 100644
--- a/src/SetupDLL/Setup.c
+++ b/src/SetupDLL/Setup.c
@@ -2336,6 +2336,38 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostInstall(MSIHANDLE hInstaller)
UINT uiRet = ERROR_INSTALL_FAILURE;
BOOL bOK = TRUE;
WCHAR szCurrentDir[MAX_PATH];
+ const wchar_t* oldFileNames[] = {
+ L"docs\\html\\en\\AddNewSystemVar.jpg",
+ L"docs\\html\\en\\CertificateCannotBeVerified.jpg",
+ L"docs\\html\\en\\CertVerifyFails.jpg",
+ L"docs\\html\\en\\DistributionPackageDamaged.jpg",
+ L"docs\\html\\en\\DownloadVS2010.jpg",
+ L"docs\\html\\en\\DownloadVS2019.jpg",
+ L"docs\\html\\en\\DownloadVSBuildTools.jpg",
+ L"docs\\html\\en\\gzipCommandLine.jpg",
+ L"docs\\html\\en\\NasmCommandLine.jpg",
+ L"docs\\html\\en\\RegeditPermissions-1.jpg",
+ L"docs\\html\\en\\RegeditPermissions-2.jpg",
+ L"docs\\html\\en\\RegeditPermissions-3.jpg",
+ L"docs\\html\\en\\RegeditPermissions-4.jpg",
+ L"docs\\html\\en\\SelectAdvancedSystemSettings.jpg",
+ L"docs\\html\\en\\SelectEnvironmentVariables.jpg",
+ L"docs\\html\\en\\SelectPathVariable.jpg",
+ L"docs\\html\\en\\SelectThisPC.jpg",
+ L"docs\\html\\en\\upxCommandLine.jpg",
+ L"docs\\html\\en\\VS2010BuildSolution.jpg",
+ L"docs\\html\\en\\VS2010Win32Config.jpg",
+ L"docs\\html\\en\\VS2010X64Config.jpg",
+ L"docs\\html\\en\\VS2019ARM64Config.jpg",
+ L"docs\\html\\en\\VS2019BuildSolution.jpg",
+ L"docs\\html\\en\\YasmCommandLine.jpg",
+ L"docs\\html\\en\\BCH_Logo_48x30.png",
+ L"docs\\html\\en\\LinuxPrepAndBuild.sh",
+ L"docs\\html\\en\\LinuxPrepAndBuild.zip",
+ L"docs\\html\\en\\RIPEMD-160.html",
+ L"docs\\html\\en\\ru\\BCH_Logo_48x30.png",
+ L"Languages\\Language.ru - Copy.xml",
+ };
MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin VC_CustomAction_PostInstall");
@@ -2446,6 +2478,7 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostInstall(MSIHANDLE hInstaller)
WIN32_FIND_DATA f;
HANDLE h;
wchar_t szTmp[TC_MAX_PATH];
+ size_t i;
// delete "VeraCrypt Setup.exe" if it exists
StringCbPrintfW (szTmp, sizeof(szTmp), L"%s%s", szInstallDir.c_str(), L"VeraCrypt Setup.exe");
@@ -2454,6 +2487,16 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostInstall(MSIHANDLE hInstaller)
ForceDeleteFile(szTmp);
}
+ // delete files wrongly installed by previous versions in installation folder
+ for (i = 0; i < ARRAYSIZE(oldFileNames); i++)
+ {
+ StringCbPrintfW (szTmp, sizeof(szTmp), L"%s%s", szInstallDir.c_str(), oldFileNames[i]);
+ if (FileExists(szTmp))
+ {
+ ForceDeleteFile(szTmp);
+ }
+ }
+
StringCbPrintfW (szTmp, sizeof(szTmp), L"%s%s", szInstallDir.c_str(), L"VeraCrypt.exe");
if (Is64BitOs ())
@@ -3153,6 +3196,7 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostUninstall(MSIHANDLE hInstaller)
EnableWow64FsRedirection (TRUE);
}
+
}
if (bSystemRestore && !bTempSkipSysRestore)