From 302dc37fb9baa45c5864af533664c4139e209590 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 9 Feb 2022 22:37:22 +0100 Subject: Windows: Make Travel Disk contains 32-bit and arm64 binaries when VeraCrypt installed using MSI --- src/COMReg/COMReg.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/COMReg/COMReg.cpp (limited to 'src/COMReg/COMReg.cpp') diff --git a/src/COMReg/COMReg.cpp b/src/COMReg/COMReg.cpp new file mode 100644 index 00000000..d1f97492 --- /dev/null +++ b/src/COMReg/COMReg.cpp @@ -0,0 +1,30 @@ +#include "Tcdefs.h" +#include +#include "SelfExtract.h" + +int APIENTRY _tWinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPTSTR lpCmdLine, + int nCmdShow) +{ + wchar_t SetupFilesDir[TC_MAX_PATH]; + wchar_t *s; + UNREFERENCED_PARAMETER(hInstance); + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(nCmdShow); + + if (lpCmdLine[0] == L'/' && lpCmdLine[1] == L'p') + { + MessageBox(NULL, L"",L"",0); + SelfExtractStartupInit(); + GetModuleFileName (NULL, SetupFilesDir, ARRAYSIZE (SetupFilesDir)); + s = wcsrchr (SetupFilesDir, L'\\'); + if (s) + s[1] = 0; + + /* Create self-extracting package */ + MakeSelfExtractingPackage (NULL, SetupFilesDir, TRUE); + } + + return 0; +} -- cgit v1.2.3