diff options
Diffstat (limited to 'src')
37 files changed, 8713 insertions, 52 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 179ea217..2e0b507a 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -9523,8 +9523,11 @@ BOOL PrintHardCopyTextUTF16 (wchar_t *text, wchar_t *title, size_t textByteLen) BOOL IsNonInstallMode () { - HKEY hkey; + HKEY hkey, hkeybis; DWORD dw; + WCHAR szBuffer[512]; + DWORD dwBufferSize = sizeof(szBuffer); + std::wstring msiProductGUID; if (bPortableModeConfirmed) return TRUE; @@ -9582,6 +9585,29 @@ BOOL IsNonInstallMode () CloseHandle (hDriverTmp); } + // The following test checks whether the MSI is installed, which means we're not in portable mode. + // The ProductGUID is read from registry. + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\VeraCrypt_MSI", 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY, &hkey) == ERROR_SUCCESS || + RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\VeraCrypt_MSI", 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS) + { + if (ERROR_SUCCESS == RegQueryValueExW(hkey, L"ProductGuid", 0, NULL, (LPBYTE)szBuffer, &dwBufferSize)) + { + msiProductGUID = szBuffer; + + std::wstring regKey = L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"; + regKey += msiProductGUID; + + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, regKey.c_str(), 0, KEY_READ | KEY_WOW64_32KEY, &hkeybis) == ERROR_SUCCESS || + RegOpenKeyEx(HKEY_LOCAL_MACHINE, regKey.c_str(), 0, KEY_READ, &hkeybis) == ERROR_SUCCESS) + { + RegCloseKey(hkeybis); + return FALSE; + } + } + + RegCloseKey(hkey); + } + // The following test may be unreliable in some cases (e.g. after the user selects restore "Last Known Good // Configuration" from the Windows boot menu). if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt", 0, KEY_READ | KEY_WOW64_32KEY, &hkey) == ERROR_SUCCESS) @@ -11335,12 +11361,21 @@ BYTE *MapResource (wchar_t *resourceType, int resourceId, PDWORD size) { HGLOBAL hResL; HRSRC hRes; + HINSTANCE hResInst = NULL; + +#ifdef SETUP_DLL + // In case we're being called from the SetupDLL project, FindResource() + // and LoadResource() with NULL will fail since we're in a DLL. We need + // to call them with the HINSTANCE of the DLL instead, which we set in + // Setup.c of SetupDLL, DllMain() function. + hResInst = hInst; +#endif - hRes = FindResource (NULL, MAKEINTRESOURCE(resourceId), resourceType); - hResL = LoadResource (NULL, hRes); + hRes = FindResource (hResInst, MAKEINTRESOURCE(resourceId), resourceType); + hResL = LoadResource (hResInst, hRes); if (size != NULL) - *size = SizeofResource (NULL, hRes); + *size = SizeofResource (hResInst, hRes); return (BYTE *) LockResource (hResL); } diff --git a/src/Release/Setup Files/Custom_InstallDir.wxs b/src/Release/Setup Files/Custom_InstallDir.wxs new file mode 100644 index 00000000..3c9563fd --- /dev/null +++ b/src/Release/Setup Files/Custom_InstallDir.wxs @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> + + + +<!-- +First-time install dialog sequence: + - WixUI_WelcomeDlg + - WixUI_LicenseAgreementDlg + - WixUI_InstallDirDlg + - WixUI_VerifyReadyDlg + - WixUI_DiskCostDlg + +Maintenance dialog sequence: + - WixUI_MaintenanceWelcomeDlg + - WixUI_MaintenanceTypeDlg + - WixUI_InstallDirDlg + - WixUI_VerifyReadyDlg + +Patch dialog sequence: + - WixUI_WelcomeDlg + - WixUI_VerifyReadyDlg + +--> + +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> + <Fragment> + <UI Id="Custom_InstallDir"> + <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /> + <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" /> + <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" /> + + <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" /> + <Property Id="WixUI_Mode" Value="InstallDir" /> + + <DialogRef Id="BrowseDlg" /> + <DialogRef Id="DiskCostDlg" /> + <DialogRef Id="ErrorDlg" /> + <DialogRef Id="FatalError" /> + <DialogRef Id="FilesInUse" /> + <DialogRef Id="MsiRMFilesInUse" /> + <DialogRef Id="PrepareDlg" /> + <DialogRef Id="ProgressDlg" /> + <DialogRef Id="ResumeDlg" /> + <DialogRef Id="UserExit" /> + + <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish> + <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish> + + <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish> + + <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed</Publish> + <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish> + + <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish> + <!-- When user clicks on Next, it means they accepted license, therefore we execute the CA SetAcceptLicense so that ACCEPTLICENSE is set to YES --> + <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="DoAction" Value="SetAcceptLicense">1</Publish> + <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirAndOptionalShortcutsDlg">LicenseAccepted = "1"</Publish> + + <Publish Dialog="InstallDirAndOptionalShortcutsDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish> + <Publish Dialog="InstallDirAndOptionalShortcutsDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish> + <Publish Dialog="InstallDirAndOptionalShortcutsDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish> + <Publish Dialog="InstallDirAndOptionalShortcutsDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish> + <Publish Dialog="InstallDirAndOptionalShortcutsDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish> + <Publish Dialog="InstallDirAndOptionalShortcutsDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish> + <Publish Dialog="InstallDirAndOptionalShortcutsDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish> + + <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirAndOptionalShortcutsDlg" Order="1">NOT Installed</Publish> + <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish> + <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish> + + <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish> + + <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish> + <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish> + <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish> + + <Property Id="ARPNOMODIFY" Value="1" /> + </UI> + + <UIRef Id="WixUI_Common" /> + </Fragment> +</Wix> diff --git a/src/Release/Setup Files/Custom_InstallDirDlg.wxs b/src/Release/Setup Files/Custom_InstallDirDlg.wxs new file mode 100644 index 00000000..1893801b --- /dev/null +++ b/src/Release/Setup Files/Custom_InstallDirDlg.wxs @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> + + +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> + <Fragment> + <UI> + <Dialog Id="InstallDirAndOptionalShortcutsDlg" Width="370" Height="270" Title="!(loc.InstallDirDlg_Title)"> + <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" /> + <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" /> + <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)"> + <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish> + </Control> + + <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.CustomInstallDirDlgDescription)" /> + <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.InstallDirDlgTitle)" /> + <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" /> + <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" /> + <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" /> + + <Control Id="FolderLabel" Type="Text" X="20" Y="60" Width="290" Height="30" NoPrefix="yes" Text="!(loc.InstallDirDlgFolderLabel)" /> + <Control Id="Folder" Type="PathEdit" X="20" Y="100" Width="320" Height="18" Property="WIXUI_INSTALLDIR" Indirect="yes" /> + <Control Id="ChangeFolder" Type="PushButton" X="20" Y="120" Width="56" Height="17" Text="!(loc.InstallDirDlgChange)" /> + + <Control Id="InstallForAllUsersCheckbox" Type="CheckBox" + X="20" Y="140" Width="200" Height="17" + Property="ALLUSERS" CheckBoxValue="1" + Text="!(loc.InstallForAllUsersDesc)" /> + <Control Id="InstallDesktopShortcutCheckbox" Type="CheckBox" + X="20" Y="160" Width="200" Height="17" + Property="INSTALLDESKTOPSHORTCUT" CheckBoxValue="1" + Text="!(loc.CreateDesktopShortcutDesc)" /> + <Control Id="InstallStartMenuShortcutCheckbox" Type="CheckBox" + X="20" Y="180" Width="200" Height="17" + Property="INSTALLSTARTMENUSHORTCUT" CheckBoxValue="1" + Text="!(loc.CreateStartMenuShortcutDesc)" /> + <Control Id="AssociateVCFileExtensionCheckBox" Type="CheckBox" + X="20" Y="200" Width="200" Height="17" + Property="REGISTERVCFILEEXT" CheckBoxValue="1" + Text="!(loc.AssociateVCFileExtensionDesc)" /> + + </Dialog> + </UI> + </Fragment> +</Wix>
\ No newline at end of file diff --git a/src/Release/Setup Files/Product64.wxs b/src/Release/Setup Files/Product64.wxs new file mode 100644 index 00000000..7bd7388b --- /dev/null +++ b/src/Release/Setup Files/Product64.wxs @@ -0,0 +1,1709 @@ +<?xml version="1.0" encoding="utf-8"?> +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" + xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> + + <!-- FullProductVersion's first 3 parts MUST BE incremented at each release in order + for upgrades to work ; Windows Installer ignores the 4th part --> + <?define var.FullProductVersion = 1.24.25?> + <?define var.ProductName = VeraCrypt $(var.FullProductVersion)?> + + <!-- Unique GUID identifying this family of product (32-bit and 64-bit have the same) --> + <?define var.UpgradeCode = {298F5D2B-3B01-4A13-BEFD-4B3C7BE43BC6}?> + + <!-- Unique GUID identifying this product release (32-bit and 64-bit have different ones) --> + <!-- MUST BE regenerated for each new release --> + <?define var.ProductGuid = {4B0DDCE8-2DAC-4350-8F5E-632BD9BA9209}?> + + <!-- Unique GUID identifying a particular Windows Installer package --> + <!-- When compiling a product, it should not be set in order to allow it to be generated for each build --> + <?define var.PackageCode = "*"?> + + <!-- Set path to License file --> + <?define var.licenseRtf = "$(sys.CURRENTDIR)\License.rtf"?> + + <!-- See https://wixtoolset.org/documentation/manual/v3/xsd/wix/product.html --> + <!-- Lang will be defined in a .wxl file which will be passed to the WIX linker 'light' --> + <Product Id="$(var.ProductGuid)" + Language="!(loc.Lang)" + Manufacturer="IDRIX" + Name="$(var.ProductName)" + Version="$(var.FullProductVersion)" + UpgradeCode="$(var.UpgradeCode)"> + + <!-- See https://wixtoolset.org/documentation/manual/v3/xsd/wix/package.html --> + <!-- InstallerVersion="500"(v5.0) Released with Windows 7 and later, see https://en.wikipedia.org/wiki/Windows_Installer --> + <!-- Language IDs (LCIDs) can be found here https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms912047(v=winembedded.10)?redirectedfrom=MSDN --> + <!-- InstallScope="perMachine" sets <Property Id="ALLUSERS" Value="1". Because we set it manually from checkbox, we do not set InstallScope. /> --> + <!-- InstallPrivileges="elevated" makes it so that Install button has little shield which prompts for Admin password if needed. + If the MSI is installed from an elevated cmd, no password is asked --> + <!-- Languages is optional ; We set it to 0 to avoid LGHT0309 : Failed to open merge module for validation --> + <Package Compressed="yes" + Id="$(var.PackageCode)" + InstallerVersion="500" + InstallPrivileges="elevated" + Keywords="VeraCrypt MSI Installer" + Manufacturer="IDRIX" + Languages="0" + Platform="x64" + Description="VeraCrypt $(var.FullProductVersion) 64-bit MSI Installer" + Comments="MSI Installer of VeraCrypt for Windows 64-bit editions" + /> + + <!-- Major upgrade --> + <!-- Prevent downgrades --> + <!-- Prevent same versions upgrades to avoid having 2 products --> + <!-- Since the Windows Installer only uses the first 3 parts of the version in upgrade scenarios, + versions a.b.c.d and a.b.c.e are treated as being the same version. + By setting 'AllowSameVersionUpgrades' to 'yes', version a.b.c.d and a.b.c.e can upgrade each other : + this fixes the issue for a.b.c.e upgrading a.b.c.d but also enables downgrades from a.b.c.e to a.b.c.d. + Therefore, this property is not set to 'yes' --> + <!-- We guarantee that two different x.y.z versions will have a different ProductId, so + everything is always a MajorUpgrade. MinorUpdates and Patches have many requirements + for Feature and Component changes, which we will no doubt forget about in the future. + A MajorUpgrade is a small price to pay to prevent any mishaps. + Since we strictly follow component rules, we use afterInstallExecute to speed things up a bit. --> + <!-- We schedule RemoveExistingProducts after InstallExecute, so that, the install of the new version's files precedes the + removal of obsolete files. In this scenario files are only replaced if they are versioned and newer than installed files, + and for unversioned files, the file replacement rules basically states that the file will only be + overwritten if it has not been changed on disk, meaning it will keep files that have been changed. + So, what happens is MSI will PreInst, InstallFiles and PostInst first, as if 'NOT Installed' is true. + Here, UPGRADINGPRODUCTCODE is not set. + Then, it will execute RemoveExistingProducts where the ACTUAL upgrade happens. + Here, UPGRADINGPRODUCTCODE is set. + We do this to avoid the following : + - Windows Installer determines which files to install. It decides that some files don't need to be installed + (possibly because they already exist and are of the same or newer versions as the ones in the MSI). + - The previous version of software is removed, including the files Windows Installer determined didn't need to be installed. + - Windows installer installs files for the new installation, but does not install files that it determined did not need to be installed. + The end result is that a bunch of files are missing after upgrading the software. --> + <MajorUpgrade + AllowSameVersionUpgrades="no" + DowngradeErrorMessage="!(loc.NoDowngrade)" + Schedule="afterInstallExecute" + /> + + <!-- Windows 8 (602) is our Min OS --> + <!-- See https://docs.microsoft.com/en-us/windows/win32/msi/operating-system-property-values --> + <!-- 'Installed' is a Windows Installer property that is set only if the product is installed per-machine or for the current user. + Using !Installed ensures the check is only done when the user is installing the application, rather than on a repair or remove --> + <!-- Notice the ! : If Not Installed AND VersionNT < 602 => Show error message --> + <Condition Message="!(loc.MinOs)"> + <![CDATA[ + Installed + OR (VersionNT = 602) + OR (VersionNT > 602) + ]]> + </Condition> + + <!-- This installer can only be executed under 64bit, never under 32-bit --> + <Condition Message="!(loc.OS64Bitness)"> + <![CDATA[ + Installed + OR (VersionNT64) + ]]> + </Condition> + + <!-- Uncomment the following if you want the installer to only be runnable by Admin. + This means that, in order to be be run, an elevated cmd must be used or it must be run using "run as admin". + Otherwise, an error message is shown. + --> + <!-- + <Property Id="MSIUSEREALADMINDETECTION" Value="1" /> + <Condition Message="!(loc.AdminNeeded)"> + NOT Installed AND NOT Privileged + </Condition> + --> + + <!-- Media describes a disk that makes up the source media for the installation --> + <!-- For DiskId and compression --> + <Media Id="1" Cabinet="VeraCrypt.cab" EmbedCab="yes" /> + + <!-- Icon used for Add/Remove Programs icon --> + <Icon Id="Setup.ico" SourceFile="$(sys.CURRENTDIR)\Setup.ico"/> + + <!-- Icon used for Shortcut, ProgId, or Class elements (but not UI controls) --> + <Icon Id="VeraCrypt.ico" SourceFile="$(sys.CURRENTDIR)\VeraCrypt.ico"/> + + <!-- Top banner --> + <WixVariable Id="WixUIBannerBmp" Value="$(sys.CURRENTDIR)\VeraCrypt_setup.bmp" /> + + <!-- Background bitmap used on the welcome and completion dialogs --> + <WixVariable Id="WixUIDialogBmp" Value="$(sys.CURRENTDIR)\VeraCrypt_setup_background.bmp" /> + + <!-- The primary icon displayed in Add/Remove Programs --> + <!-- Cannot set the MSI Installer exe icon, only possible using Bundle and IconSourceFile --> + <Property Id="ARPPRODUCTICON" Value="Setup.ico" /> + + <!-- URL for the link to the publishers home page or the application's home page --> + <Property Id="ARPURLINFOABOUT" Value="https://www.idrix.fr"/> + + <!-- Following properties are meant to install the Desktop and StartMenu shortcuts --> + <!-- They make it possible to give the user checkboxes to choose whether to install or not --> + <!-- By default, we install all the shortcuts --> + <Property Id="INSTALLDESKTOPSHORTCUT" Value ="1" /> + <Property Id="INSTALLSTARTMENUSHORTCUT" Value ="1" /> + + <!-- Following property is meant to install the RegKeys --> + <!-- They make it possible to give the user checkboxes to choose whether to install or not --> + <!-- By default, we install all the RegKeys --> + <Property Id="REGISTERVCFILEEXT" Value ="1" /> + + <!-- Following property is meant to set whether to install for All users or just the current one --> + <!-- They make it possible to give the user checkboxes to choose what to do --> + <!-- By default, we install all for all users --> + <Property Id="ALLUSERS" Value="1" /> + + <!-- Following property sets the default acceptance of the license. + In UI mode, the user needs to check the license box in order to accept + the license, which sets 'LicenseAccepted' to '1', but not 'ACCEPTLICENSE'. + Therefore, for UI mode, we need to set 'ACCEPTLICENSE' manually when + we detect that 'LicenseAccepted' is set, and only in UI sequence. + In silent mode, 'LicenseAccepted' is by default set to '1', therefore, + the user must only specify 'ACCEPTLICENSE' to 'YES' in msiexec. + By default, the license is not accepted. --> + <Property Id="ACCEPTLICENSE" Value="NO"/> + + <!-- Directory layout / structure for the product --> + <!-- Windows Installer expects the Directory tree to always be rooted in a + Directory row where the primary key (Directory/@Id) is "TARGETDIR" + and the DefaultDir column (Directory/@Name) is "SourceDir" --> + <!-- During an install, TARGETDIR will default to the largest drive on the machine. + SourceDir will be set to the location where the MSI is being executed --> + <!-- See https://wixtoolset.org/documentation/manual/v3/bundle/bundle_built_in_variables.html --> + <Directory Id="TARGETDIR" Name="SourceDir"> + + <!-- Reference DesktopFolder to create a Desktop Shortcut --> + <Directory Id="DesktopFolder" Name="Desktop"/> + + <!-- Reference APPLICATIONPROGRAMSFOLDER to create a Start Menu Shortcut --> + <!-- See https://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/create_start_menu_shortcut.html --> + <Directory Id="ProgramMenuFolder"> + <Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/> + </Directory> + + <!-- We do not Reference QuickLaunchFolder under AppDataFolder to create a Quick Launch Shortcut --> + <!-- The shortcut is installed under C:/Users/<user>/AppData/Roaming/Microsoft/Internet Explorer/QuickLaunch + which is not created for all users (only for the one under which the install occurred) because of + perMachine installation (sets ALLUSERS to 1) + Also, when uninstalling, and if the user that uninstalls is not the same that has installed, + the shortcut is not cleared from the quick launch of the installing user. + Therefore, we avoid this. + --> + + <!-- Reference C:\Windows\System32 --> + <Directory Id="System64Folder"> + + <!-- Reference C:\Windows\System32\Drivers --> + <!-- The directory is not created here, instead if is implicitly created when we add install using { Component, Files } ... --> + <!-- The creation can be forced without installing files by setting CreateFolder inside Component --> + <Directory Id="DRIVERSFOLDER" Name="Drivers"/> + + </Directory> + + <!-- Reference C:\Program Files (only 64-bit) --> + <Directory Id="ProgramFiles64Folder"> + + <!-- Reference C:\Program Files\VeraCrypt --> + <!-- The directory is not created here, instead if is implicitly created when we install files using { Component, Files } ... --> + <!-- The creation can be forced without installing files by setting CreateFolder inside Component --> + <Directory Id="APPLICATIONROOTFOLDER" Name="VeraCrypt"> + + <!-- Reference C:\Program Files\VeraCrypt\Languages --> + <Directory Id="LANGUAGESFOLDER" Name="Languages"/> + + <!-- Reference C:\Program Files\VeraCrypt\docs --> + <Directory Id="DOCSFOLDER" Name="docs"> + + <!-- Reference C:\Program Files\VeraCrypt\docs\EFI-DCS --> + <Directory Id="EFIDOCSFOLDER" Name="EFI-DCS"/> + + <!-- Reference C:\Program Files\VeraCrypt\docs\html --> + <Directory Id="HTMLDOCSFOLDER" Name="html"> + + <!-- Reference C:\Program Files\VeraCrypt\docs\html\en --> + <Directory Id="ENHTMLDOCSFOLDER" Name="en"/> + + </Directory> + + </Directory> + + </Directory> + + </Directory> + + </Directory> + + <!-- Directories referencing to install components --> + + <!-- Refer to C:\Windows\System32\Drivers in order to install files in it --> + <DirectoryRef Id="DRIVERSFOLDER"> + + <!-- Add files to the installer package inside components --> + <!-- We restrict ourselves to a single file per component to avoid any problems --> + <!-- Generatable guids are supported only for components with a single file as the component's keypath or no files and a registry value as the keypath --> + <!-- The KeyPath for a Component is a single resource that the Windows Installer uses to determine if a Component "exists" on a machine --> + <Component Id="veracryptDriverSys" Guid="{6A1833A1-8A99-42B0-8ABF-9601EFE54DB8}" > + <File Id="veracryptDriver.sys" Name="veracrypt.sys" Source="$(sys.CURRENTDIR)\veracrypt-x64.sys" KeyPath="yes" DiskId="1" /> + </Component> + + </DirectoryRef> + + <!-- Refer to C:\Program Files\VeraCrypt in order to install files in it --> + <DirectoryRef Id="APPLICATIONROOTFOLDER"> + + <Component Id="LICENSEFile" Guid="{370D29C4-3A58-4B9E-A0D6-A06430FCCA6D}"> + <File Id="LICENSE" Name="LICENSE" Source="$(sys.CURRENTDIR)\LICENSE" KeyPath="yes" DiskId="1" /> + </Component> + <Component Id="LicenseTxt" Guid="{14F0F218-FBA2-4C68-820B-376345AB9D33}"> + <File Id="License.txt" Name="License.txt" Source="$(sys.CURRENTDIR)\License.txt" KeyPath="yes" DiskId="1" /> + </Component> + <Component Id="NOTICEFile" Guid="{56980D3E-9568-446D-8518-CA381EBE56C4}"> + <File Id="NOTICE" Name="NOTICE" Source="$(sys.CURRENTDIR)\NOTICE" KeyPath="yes" DiskId="1" /> + </Component> + <Component Id="VeraCrypt_FormatExe" Guid="{55F89F55-62A6-40D0-A7B4-BC2505C118AA}"> + <File Id="VeraCrypt_Format.exe" Name="VeraCrypt Format.exe" Source="$(sys.CURRENTDIR)\VeraCrypt Format-x64.exe" KeyPath="yes" DiskId="1" /> + </Component> + <Component Id="veracryptCat" Guid="{F1910CF2-3DA7-471D-845E-1A1C20AD3076}"> + <File Id="veracrypt.cat" Name="veracrypt.cat" Source="$(sys.CURRENTDIR)\veracrypt-x64.cat" KeyPath="yes" DiskId="1" /> + </Component> + <Component Id="VeraCryptExe" Guid="{9C13F7BE-6ACE-48DE-BD44-714F421ADC2C}"> + <File Id="VeraCrypt.exe" Name="VeraCrypt.exe" Source="$(sys.CURRENTDIR)\VeraCrypt-x64.exe" KeyPath="yes" DiskId="1" /> + </Component> + <Component Id="veracryptInf" Guid="{955B99DC-74C3-476D-8ECE-52FD0916EA34}"> + <File Id="veracrypt.inf" Name="veracrypt.inf" Source="$(sys.CURRENTDIR)\veracrypt.inf" KeyPath="yes" DiskId="1" /> + </Component> + <Component Id="veracryptSys" Guid="{5CE01773-01EA-417C-BBA4-8363881763DC}"> + <File Id="veracrypt.sys" Name="veracrypt.sys" Source="$(sys.CURRENTDIR)\veracrypt-x64.sys" KeyPath="yes" DiskId="1" /> + </Component> + <Component Id="VeraCryptExpanderExe" Guid="{FF1F4376-9025-4124-808E-1C4B58024F14}"> + <File Id="VeraCryptExpander.exe" Name="VeraCryptExpander.exe" Source="$(sys.CURRENTDIR)\VeraCryptExpander-x64.exe" KeyPath="yes" DiskId="1" /> + </Component> + <Component Id="VeraCryptComRegExe" Guid="{A922CAA3-5D78-49BC-92C9-B317FD7050A7}"> + <!-- Needed only to be able to perform RegisterComServers() & UnregisterComServers --> + <File Id="VeraCryptComReg.exe" Name="VeraCrypt COMReg.exe" Source="$(sys.CURRENTDIR)\VeraCrypt COMReg.exe" Hidden="yes" KeyPath="yes" DiskId="1" /> + </Component> + + </DirectoryRef> + + <!-- Refer to C:\Program Files\VeraCrypt\Languages in order to install files in it --> + <!-- Components generated using 'heat dir ".\Translations" -gg -sfrag -template:fragment -out directory.wxs -var "sys.CURRENTDIR"' --> + <DirectoryRef Id="LANGUAGESFOLDER"> + + <Component Id="cmpF27E43A4E59E04A5B095C5101B229139" Guid="{8EB22F2F-AFE2-45E5-92C3-AB50B377935E}"> + <File Id="fil1B0F0BB59C5EE9FC44F8DA3BA57CB272" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ar.xml" DiskId="1" /> + </Component> + <Component Id="cmp4350812363930B900E24C845940DF416" Guid="{52F707BF-2C0D-4690-84E8-8C1806BFC740}"> + <File Id="fil7E02C9035678F667086D2D483D8FDF35" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.be.xml" DiskId="1" /> + </Component> + <Component Id="cmp1DD254125CF07901EACECC70930818B0" Guid="{AD31462E-039E-41CF-B2CF-D73FD4075C76}"> + <File Id="filA52BE38FF2164268AA9562C09281D09B" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.bg.xml" DiskId="1" /> + </Component> + <Component Id="cmp8C9E97CFD69D3BCB44B84D886720F3FC" Guid="{A328C74D-C352-4406-8C75-8BA159210936}"> + <File Id="fil2A31F450F9C022901212461A240C5D17" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ca.xml" DiskId="1" /> + </Component> + <Component Id="cmp2BC45D6EC406DDC470E8501442A7AF68" Guid="{5E99CB8F-33E2-430C-A0B2-A31058D6D449}"> + <File Id="fil0F3AB0CD6266BA1530A0253F059A85DD" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.cs.xml" DiskId="1" /> + </Component> + <Component Id="cmp74A0CA1914A6C6FE33D76DE1C01C676D" Guid="{F1E82507-7C31-41F0-A643-69BB53F3CD41}"> + <File Id="filDED1A10C5657065D291DC62CA9A32FAE" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.da.xml" DiskId="1" /> + </Component> + <Component Id="cmpC186D3472CE1EC872FF1B0CF3682B3B6" Guid="{C23FC0D1-A6B7-4AB1-BA05-EBDC1B4328F9}"> + <File Id="filF4D7849840B295D75BA68B5F6C12F7B3" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.de.xml" DiskId="1" /> + </Component> + <Component Id="cmp2AB0B613D25DDEF3466CBC86BD6B878B" Guid="{3757C2DE-FCC8-4970-8CB8-A0D9B2404A1C}"> + <File Id="fil7AECCD25826C51216C12F09DC87F1B22" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.el.xml" DiskId="1" /> + </Component> + <Component Id="cmpB09224EB45E097BF511CBC5DBE3E251C" Guid="{70B91FFF-BDB7-48AE-A664-243A057F1EA7}"> + <File Id="filC426C0D58EE0FC49743BDB8AEDA3C6BE" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.es.xml" DiskId="1" /> + </Component> + <Component Id="cmpF24BBBEB613F893CBC5FBF6533CB48C9" Guid="{F578356A-16E1-42CF-8DB2-2DC21B4C154B}"> + <File Id="fil38AB8BFA030ACBECA75C821E3574759A" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.et.xml" DiskId="1" /> + </Component> + <Component Id="cmp50E1DEF37599D2900447B13FC285B7B7" Guid="{1FDF2F45-97F1-40C0-A450-A2342BBF913C}"> + <File Id="fil1BCCDEC84EB4D85DB0380FCD6153D1FA" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.eu.xml" DiskId="1" /> + </Component> + <Component Id="cmp46E5A0DB48A03A91267C97A664BD9BD4" Guid="{07165ABB-1B3C-4C0F-A73E-E3A85AB37B58}"> + <File Id="fil1AC953E5BA23EC81206D212369F1544D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.fa.xml" DiskId="1" /> + </Component> + <Component Id="cmp95BAB91FA0B7E37D5B9343478899CC75" Guid="{F0ADBE30-225D-4EF9-B0F4-1ADEFEF07625}"> + <File Id="filEEF3EF4EEE97747B255238CFB88EAF9C" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.fi.xml" DiskId="1" /> + </Component> + <Component Id="cmpE73E4CCF9F6EC39998B9BE35E43768CC" Guid="{EA4FADF0-BF20-40FD-9BAA-D1023357FD28}"> + <File Id="filFB10C722F275051A8DDB25D4D9AF43E5" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.fr.xml" DiskId="1" /> + </Component> + <Component Id="cmp28EEAA4B2230460BDDA61DEFBC71A905" Guid="{68D7B2E5-273B-4782-AF3D-65F255BBF9B2}"> + <File Id="filD03BE3868262DD16654690ED91BC89C8" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.hu.xml" DiskId="1" /> + </Component> + <Component Id="cmpCFF4CB46421F1A713D45607393ED9B90" Guid="{F96AF79F-0364-4A68-8790-209C751C37FB}"> + <File Id="fil040570D344D75F6A57E5DD5ECB94BD8B" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.id.xml" DiskId="1" /> + </Component> + <Component Id="cmp31601B4199D0CD3977758A3F2B63CDE7" Guid="{9F347364-2673-4184-A069-342A88BAF90C}"> + <File Id="fil5A7288C1B9CC498419FC14D5B12B1D8D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.it.xml" DiskId="1" /> + </Component> + <Component Id="cmp8E2E0489348A190B00532591CE0AC325" Guid="{BE526CC3-99F7-4F94-AFC4-C86FCF0D742C}"> + <File Id="fil9DF155D4A63D3AAAFDBF3BEF8C47BBEA" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ja.xml" DiskId="1" /> + </Component> + <Component Id="cmpEE57E2901F12294E638E66C39F1B39BB" Guid="{C2CAFD97-84B7-4053-A8D0-DE21F4D8F741}"> + <File Id="filFD48E7A9628E7FF9B3D96BD222A3A0D9" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ka.xml" DiskId="1" /> + </Component> + <Component Id="cmp2F1F644C870AFF8970FE18AF2CD151C4" Guid="{96564F4E-7D92-40B3-84F6-84B357EB4F41}"> + <File Id="filF68A13BECFA9D8DD21B371298AF93B5B" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ko.xml" DiskId="1" /> + </Component> + <Component Id="cmp4B8E0B5A7B7A8BE4267C722B1434E4CF" Guid="{E9AD4FA0-9CD7-43B9-8099-69AD6EB1A305}"> + <File Id="fil23F177B7621D7D78240CAA60E6AB1048" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.lv.xml" DiskId="1" /> + </Component> + <Component Id="cmp84BB49D30BDBB4212707D14B7A9C13F1" Guid="{B63CC062-CD52-463F-8B30-1E611A90EDA9}"> + <File Id="filA7135961859CF705E28FFF4DA79A28C2" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.my.xml" DiskId="1" /> + </Component> + <Component Id="cmp406E3BE632055CDDE1E42F45E31318DC" Guid="{627980E8-F6BE-4794-B9BC-68F96267D721}"> + <File Id="filF46FDB7781620EB1D7491039E4029463" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.nl.xml" DiskId="1" /> + </Component> + <Component Id="cmp4E363AF94947A27A4E9CF57C69E6DE54" Guid="{9D17F34C-4475-4995-A696-FE3EA54F2FBB}"> + <File Id="fil24BA52B3E3209F48021C1D75AF5BBDB4" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.nn.xml" DiskId="1" /> + </Component> + <Component Id="cmp562F7970AF2F9EF535AC21A84C7229D1" Guid="{9F36CA4F-BF14-40D7-81A2-8ADFCC0EF30B}"> + <File Id="fil8C40C1C5E3776F4C0FCF8BD02D742D70" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.pl.xml" DiskId="1" /> + </Component> + <Component Id="cmp19EF976916B5E207A32BA08C3143A281" Guid="{B0EAEA97-9176-4613-9338-41B63B85CB18}"> + <File Id="fil6CC66A3690F008524FCCB68FA1EE1176" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.pt-br.xml" DiskId="1" /> + </Component> + <Component Id="cmp4C9B5090256B2E88D27C9CF7E6CFD9EF" Guid="{8D783A02-023C-4018-8315-79A82BA593E2}"> + <File Id="filA3239DE9C316B9C04171EB42F4F9653D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ro.xml" DiskId="1" /> + </Component> + <Component Id="cmp91165C08D5943C21F132A349F8CBAAE7" Guid="{0C3290FF-8000-42CF-8329-92C828AE5A53}"> + <File Id="fil77375796E780F641C2FF5E6E3D4CAFDB" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.ru.xml" DiskId="1" /> + </Component> + <Component Id="cmp4A51B27F9D8DBBABFE4581EC2B162832" Guid="{FB8CCAC7-0EAC-4C1A-B5E5-BEFD8F7B47E6}"> + <File Id="fil414686FD325EB0C5D03FC4693978451D" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.sk.xml" DiskId="1" /> + </Component> + <Component Id="cmp041827E393D8777802256FD480D377FC" Guid="{7FEB72AD-48CA-4330-A4C9-A22218EC5D8F}"> + <File Id="fil4EABC40F288E8289D4888EB0BE6F07B1" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.sl.xml" DiskId="1" /> + </Component> + <Component Id="cmp68CC2DB5FA70FC1F6CA959FB5E1B78BF" Guid="{00D9FB47-120C-4061-B2DB-8F3D5D94F221}"> + <File Id="fil90E6ABC4A98B19C0ECCDCC9712928162" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.sv.xml" DiskId="1" /> + </Component> + <Component Id="cmpFF128AFA659D8C2E65E0BE55E0943F83" Guid="{5AB50FC2-867A-4239-850F-AD2C0FCDA2DE}"> + <File Id="fil5BF14221A225DAB25A02463BBC92DC37" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.th.xml" DiskId="1" /> + </Component> + <Component Id="cmp1896040764F0DF6F89280C428013ECE7" Guid="{3A2D27E8-4AB3-471A-A574-F148DCDF8D8C}"> + <File Id="filE839661CD956C44F0E95C85AAA11D6FF" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.tr.xml" DiskId="1" /> + </Component> + <Component Id="cmpA52EAD237A44CBD337E302185BE12FB2" Guid="{4D7A4A01-5AFB-4B37-93C7-91B9DA96BA30}"> + <File Id="fil9E3A6DE502ECEF2025129A97D3F98CA2" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.uk.xml" DiskId="1" /> + </Component> + <Component Id="cmpBBB82A6228B54372ACAF9B1310CB2025" Guid="{939C9CDD-0CEA-4161-9812-96B77B643C2E}"> + <File Id="fil4B209843380976D1FBEB96B21EB849B5" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.uz.xml" DiskId="1" /> + </Component> + <Component Id="cmp4A275EC29DB9B5ECD56CD9C62D358750" Guid="{0E29F3C1-2D27-4F1F-BEC0-C39CA1B4EAAF}"> + <File Id="fil1FD00998B7A757165A03FDFD6D241F14" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.vi.xml" DiskId="1" /> + </Component> + <Component Id="cmp8DF0B84F470901D8800F8CAB88A90656" Guid="{7B9A6F50-C242-4DAE-BD10-CDF2D63FB4AC}"> + <File Id="fil4EC683D0A468CAA1D4B8FC6FFCBFEAD6" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.zh-cn.xml" DiskId="1" /> + </Component> + <Component Id="cmp529250BEE557732B5B8CBC47914A0F2A" Guid="{2D4E3902-96E9-4C8B-BF8C-623D10FF7B57}"> + <File Id="fil915C308602F025646FC5A874F74AA475" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.zh-hk.xml" DiskId="1" /> + </Component> + <Component Id="cmp38274F8F5E4F600A9AC5225A0472D656" Guid="{74B65782-BFB6-42CD-B3BA-D736C7B0B3BE}"> + <File Id="filFD4B1ECAE9F0FF855503D800C1A2891A" KeyPath="yes" Source="$(sys.CURRENTDIR)\Languages\Language.zh-tw.xml" DiskId="1" /> + </Component> + + </DirectoryRef> + + <!-- Refer to C:\Program Files\VeraCrypt\docs in order to install files in it --> + <DirectoryRef Id="DOCSFOLDER"> + + <Component Id="VCUserGuideChm" Guid="{8CBE67F1-D493-4B33-9141-DB221021C59B}"> + <File Id="VeraCrypt_User_Guide.chm" Name="VeraCrypt User Guide.chm" Source="$(sys.CURRENTDIR)\docs\VeraCrypt User Guide.chm" KeyPath="yes" DiskId="1" /> + </Component> + + </DirectoryRef> + + <!-- Refer to C:\Program Files\VeraCrypt\docs\EFI-DCS in order to install files in it --> + <DirectoryRef Id="EFIDOCSFOLDER"> + + <Component Id="dcs_tpm_owner_02_pdf" Guid="{DC75D11E-8250-4DDD-9BD2-451194F8717D}"> + <File Id="dcs_tpm_owner_02.pdf" Name="dcs_tpm_owner_02.pdf" Source="$(sys.CURRENTDIR)\docs\EFI-DCS\dcs_tpm_owner_02.pdf" KeyPath="yes" DiskId="1" /> + </Component> + + <Component Id="disk_encryption_v1_2_pdf" Guid="{DFD46CE4-B65B-468A-B236-3E5C43090235}"> + <File Id="disk_encryption_v1_2.pdf" Name="disk_encryption_v1_2.pdf" Source="$(sys.CURRENTDIR)\docs\EFI-DCS\disk_encryption_v1_2.pdf" KeyPath="yes" DiskId="1" /> + </Component> + + </DirectoryRef> + + <!-- Refer to C:\Program Files\VeraCrypt\docs\html\en in order to install files in it --> + <!-- Components generated using 'heat dir ".\html" -gg -sfrag -template:fragment -out directory.wxs -var "sys.CURRENTDIR"' --> + <DirectoryRef Id="ENHTMLDOCSFOLDER"> + + <Component Id="cmp5A2505C1E4CE33EAC578A8D1C8C505D2" Guid="{EB5FB334-0E04-4DC8-BCA7-9233982B0FF8}"> + <File Id="fil2FC60DD03A8AFECD3E1FB3B2F358CDF5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Acknowledgements.html" DiskId="1" /> + </Component> + <Component Id="cmpE985CD1A96188861286D758A12A1D0A1" Guid="{25ED8C45-E6AF-4582-ADDE-5EDF51BF4EC2}"> + <File Id="fil81B62ADB5DD42B4C9666C61A4F59E00C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Additional Security Requirements and Precautions.html" DiskId="1" /> + </Component> + <Component Id="cmp310514F655B6D66F5308A5823B0AB691" Guid="{B18F4EA7-2A2E-4DB2-BA72-E1AE3C090C4D}"> + <File Id="fil8194761219752C0F565AAD6F30B00920" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\AES.html" DiskId="1" /> + </Component> + <Component Id="cmp0664DF8B1FE440C02B1E20D2F23C2CDF" Guid="{2A048A0F-A19B-4EE2-A1FA-2761C8931A29}"> + <File Id="fil6B563B1A4AA551468283EEB5872DD176" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\arrow_right.gif" DiskId="1" /> + </Component> + <Component Id="cmp2934E77CB835216789F88BD686160A94" Guid="{084CDB58-6A9F-4985-9818-727FBFF0D95B}"> + <File Id="fil960742ACFA2D79EEC2E6D45D7A93047B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Authenticity and Integrity.html" DiskId="1" /> + </Component> + <Component Id="cmp688E76C9A297923D616068E33A6A4F49" Guid="{63DABE8B-7EE0-479E-890F-701C7E890647}"> + <File Id="filCC9CD11F958A26366B700B8EE8812A65" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Authors.html" DiskId="1" /> + </Component> + <Component Id="cmp2ABB10C0A5AC0F1084EDF94E0FDFFD09" Guid="{034D6A64-B712-49C1-9450-5585B207C8AD}"> + <File Id="fil63E5CE3D0A91ACFF543B523A58476CCF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\bank_30x30.png" DiskId="1" /> + </Component> + <Component Id="cmp32E7F4F5C0F44D00B53E3946E7E1FCF9" Guid="{4A9AD9E2-8ADA-41BF-B2EC-643579DF9B35}"> + <File Id="filD1052E711F1CD089D66C27B04EDD6113" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\BCH_Logo_48x30.png" DiskId="1" /> + </Component> + <Component Id="cmp989B890D94671F634D04D8F945090F21" Guid="{4C123649-753C-404B-908D-AF1B48CBB844}"> + <File Id="fil02D4C60C8A30C22AE1F14E33DA3DA38C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\BC_Logo_30x30.png" DiskId="1" /> + </Component> + <Component Id="cmp109BF0667C5A7B7036CCAAD9B29D9449" Guid="{5951DADE-1544-4213-A018-E33CC10AFA5C}"> + <File Id="fil07FA1CE512F8C8605304C23C4DFE264D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial.html" DiskId="1" /> + </Component> + <Component Id="cmp82ABD3094B751094F3A49CD338A3713D" Guid="{1D02B8D8-92E6-4E2E-B29B-1C3633C625BB}"> + <File Id="fil4431451829FDF5841BC97BA0A0CA8133" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_001.jpg" DiskId="1" /> + </Component> + <Component Id="cmpE6A18205CB9F847CD7C4375AED2196D5" Guid="{D84BA05D-74CB-47CE-8098-C3C27E9292BA}"> + <File Id="fil89FAEFEC223673825DC022EED971C0E0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_002.jpg" DiskId="1" /> + </Component> + <Component Id="cmpAA4D61C5E17E2A8513EC120AC9B1DB8A" Guid="{62C84C2A-D459-4BE2-84B4-7D43F3C5726E}"> + <File Id="filE334137ACF34B80CE263C7A3868862FE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_003.jpg" DiskId="1" /> + </Component> + <Component Id="cmp39251BC13DA4AD6508E18D90D86DF06D" Guid="{E4095A6D-EAD5-429C-A75F-39758A7F1C87}"> + <File Id="fil924A6AEB99A9EF73D5240117A35F4A73" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_004.jpg" DiskId="1" /> + </Component> + <Component Id="cmpBABB0BD95FD763E9C72D2F51C325CF15" Guid="{0905EB74-CB03-4479-8D47-D5F1071E6D1C}"> + <File Id="fil2C527AD0D6FF9D8991263AEAEF0028C1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_005.jpg" DiskId="1" /> + </Component> + <Component Id="cmp2FE3B3719DCC4362AFF8BF7B4CADFF80" Guid="{8F29956A-6555-45C9-B254-F277FD9D0230}"> + <File Id="fil1CCA48715513D4C909E9B413C8D1DDD0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_007.jpg" DiskId="1" /> + </Component> + <Component Id="cmp2FC8BD312D06FEC4E244604E27117B62" Guid="{22F89049-FED2-46D8-A298-E43ECE3226B9}"> + <File Id="fil4F7DCD31A2B30BC40BCC4E76DDCE58C1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_008.jpg" DiskId="1" /> + </Component> + <Component Id="cmpAE99FB30CC29DF92E71A31EC39E61EF5" Guid="{C125C0FE-AEC0-455B-A7A6-BD216E712F11}"> + <File Id="fil3E632F1EA36028C0146D810EB2A994BB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_009.jpg" DiskId="1" /> + </Component> + <Component Id="cmp535B1A9BACA231F518973D620DC23779" Guid="{35958B4E-683D-4F34-B510-04E5801B4A1C}"> + <File Id="fil820662B184499949D0F2AF8C702010BF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_010.jpg" DiskId="1" /> + </Component> + <Component Id="cmpD2ED5F6D8C0A4CA0D26F9F1BB34AB8BA" Guid="{E3CDE6DA-DCC0-418C-926F-406962D00BB7}"> + <File Id="fil0377513CEC808B0549D7B1D3AC22DED8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_011.jpg" DiskId="1" /> + </Component> + <Component Id="cmp5F7E0D8587039E1BA0F236F228C163BD" Guid="{B3E56E0C-7368-42D8-9EEC-56FC2568A649}"> + <File Id="fil07880CC54CBA150765E18E78D707B361" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_012.jpg" DiskId="1" /> + </Component> + <Component Id="cmpF4DA2D3DABC768C2040A67A993C53E9E" Guid="{817105D4-7E68-417B-9592-F664A20AD861}"> + <File Id="filA63E7BA341C510BB5F5BE441475173A0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_013.jpg" DiskId="1" /> + </Component> + <Component Id="cmpC0AD9100DE0F43E8149F8D3271B02D17" Guid="{81CFCB27-3F21-493C-AA7A-836E05157AC3}"> + <File Id="fil1872F82E98E3D4AAE017F70E311912DE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_014.jpg" DiskId="1" /> + </Component> + <Component Id="cmp32646E8087D106AE2B62E5DCF2419EDD" Guid="{54C078C1-1641-4A06-BBCA-D6A2C0389695}"> + <File Id="fil0C921426CF20987C0ED9364F11F534F0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_015.jpg" DiskId="1" /> + </Component> + <Component Id="cmpB3C777FAF214F7D304EE7CF907D7FF57" Guid="{C44D9DD8-7803-41C1-9323-4CFD516C2DEB}"> + <File Id="filE9FA9200D40A4970139496FD4D09CC9C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_016.jpg" DiskId="1" /> + </Component> + <Component Id="cmp338115DF524F0B412A21AB64F59240DD" Guid="{D4B1FD10-580F-4889-95F4-EDFFFC3C1309}"> + <File Id="fil74DD6EA64196A3168E669A1FF7AE3E0A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_017.jpg" DiskId="1" /> + </Component> + <Component Id="cmp2F24E0C7B7175D60257F6D01231C8373" Guid="{BF43A78C-C0A8-498E-A3EF-7D0265F1E312}"> + <File Id="fil37771854D19D4FEC1E9E8DB377B24B8D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_018.jpg" DiskId="1" /> + </Component> + <Component Id="cmpAE9D52ADD94D3A2711AA79FA0C91CA00" Guid="{3EF7862C-7D09-4662-BF1C-67D05EBF9711}"> + <File Id="filEC84ED23804D7FD220C90FF50B92FD7C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_019.jpg" DiskId="1" /> + </Component> + <Component Id="cmp0A6270FD26128E8D1CC83E392E91A772" Guid="{5252F18E-BFB7-4FCC-865E-809BBD431C22}"> + <File Id="filBB21339DA6F921A2596897061F9C1F7E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_020.jpg" DiskId="1" /> + </Component> + <Component Id="cmpEDB0E152195A7EB91BBB28631B689E0B" Guid="{C3750B19-85AF-4B35-98C9-969168C0C19F}"> + <File Id="fil23F7783C38C515A1DAA07F85B306D695" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_021.jpg" DiskId="1" /> + </Component> + <Component Id="cmpFD76EB6B5546D1C38CC33FABA95FAA15" Guid="{AA874CBC-A2B7-48C6-AC23-654C190C65B0}"> + <File Id="fil769661E570AC147356DE7C8AD17F9F76" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_022.jpg" DiskId="1" /> + </Component> + <Component Id="cmpDC4FD19F507A5152351B9F71C8691486" Guid="{5B95B2F6-EF6F-4D08-9014-F4C621EA49D3}"> + <File Id="fil6AD3B2642AC17EBF625FEBC38F376F96" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_023.gif" DiskId="1" /> + </Component> + <Component Id="cmp9E45BE754042F9DD742A0B7B9F27E786" Guid="{7DD3EFD4-E5DC-4D5A-BCE0-5E2F6FA86E9C}"> + <File Id="fil29A133B2F2F200139A6F8BA5753FD673" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_024.gif" DiskId="1" /> + </Component> + <Component Id="cmpB6AC414023A6BDBF855F4A807DAE138C" Guid="{557B4D3A-C503-4EAF-8DFC-5B9177A1F737}"> + <File Id="filE1FF7E56D4D7BAE636B289521CD0C787" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Beginner's Tutorial_Image_034.png" DiskId="1" /> + </Component> + <Component Id="cmp053692809BD5B3F5682AFCC539A767A3" Guid="{C99F1ECB-6AAB-4D06-B4C7-134CD2502104}"> + <File Id="fil9D6A859E5E76057E4E64E35D03BF1739" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Camellia.html" DiskId="1" /> + </Component> + <Component Id="cmp9049A791E9E1AB7FF01BD7F08D1CB069" Guid="{F9B7E6CD-6AAB-4FD2-9CCC-8D13191057FA}"> + <File Id="fil768C59AC95806B46E5921E83E17DF406" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Cascades.html" DiskId="1" /> + </Component> + <Component Id="cmp4E6F9484484A40645D519F688ED9C21E" Guid="{5231376B-B4D8-4733-8EA9-ECA11DD034BF}"> + <File Id="fil45397F2F396BA3408992A437902E6951" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Changing Passwords and Keyfiles.html" DiskId="1" /> + </Component> + <Component Id="cmp3CF724F2A2347A2A30C85CB76490F687" Guid="{BB072BB5-3F7F-4F18-B00F-0A75D3AC0F49}"> + <File Id="filF949C326CAEAC18B9572844C807C9D19" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Choosing Passwords and Keyfiles.html" DiskId="1" /> + </Component> + <Component Id="cmp3858A4BB7577362DE87F4485575DFC99" Guid="{94549BE1-9A7B-4DA7-A66F-17193865335E}"> + <File Id="fil72F9481463D425378DDDD5FCDBCC909B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Command Line Usage.html" DiskId="1" /> + </Component> + <Component Id="cmp90AB4CF273108F47223E3432838CDE37" Guid="{9510EAF5-F452-4991-9BA2-F1F641C1D697}"> + <File Id="fil1DAD595818432F019735F37E86305500" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Contact.html" DiskId="1" /> + </Component> + <Component Id="cmpB9A0461BF7CF75538111B088C986A62F" Guid="{EC931A38-5F11-4C02-AA88-3A072E802C0B}"> + <File Id="fil8ABFD40EA9A1BE1765D794C2B8EAF909" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Contributed Resources.html" DiskId="1" /> + </Component> + <Component Id="cmpD8C7B52BC03709FAB2642B93BFE4FFE8" Guid="{1592BAD3-086F-4DDE-8970-199B44FFBD6E}"> + <File Id="filE99ED4C6D87549A1F623A37A5C47552A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Converting TrueCrypt volumes and partitions.html" DiskId="1" /> + </Component> + <Component Id="cmpFD6EB163EA6B74C4F59FF04D2B3796CC" Guid="{60D5BA7E-7466-4F09-ADB4-571A7502DD7B}"> + <File Id="filBD6D90F11807407F91F2F7AEA5DDC8EA" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Converting TrueCrypt volumes and partitions_truecrypt_convertion.jpg" DiskId="1" /> + </Component> + <Component Id="cmp612D2E75E857D164665BE8CA37570D04" Guid="{6D667BD9-F8C1-4C46-BEA0-6AAA44B838CA}"> + <File Id="fil14C75587323CCC7F69E32786D82A5BD6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Creating New Volumes.html" DiskId="1" /> + </Component> + <Component Id="cmpF65BF759DA7F65BAD6D74A83FEF9D205" Guid="{08FEF348-778B-42C7-81B9-F62EA5F658A6}"> + <File Id="filDAF1BCFE93CF42677E91DCF5E515D861" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Data Leaks.html" DiskId="1" /> + </Component> + <Component Id="cmpA6A249B42C89657DE664B9D88D04DB3F" Guid="{76F64E31-ED27-46A8-8A0D-6CFB4A79B856}"> + <File Id="fil58A7A13A2773C5CDDBF9D85254395A75" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Default Mount Parameters.html" DiskId="1" /> + </Component> + <Component Id="cmpEE8A03DA56EF1B35979430E8711A6960" Guid="{034B338B-7719-4E70-B08E-C118CBCD2432}"> + <File Id="fil7D0C9ABA361EB2D263FA1F2EDB839223" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Default Mount Parameters_VeraCrypt_password_using_default_parameters.png" DiskId="1" /> + </Component> + <Component Id="cmp628E75C5DD0F38348B6F8694D5D5149C" Guid="{B4CA9CED-3087-4115-AC8C-A8E12C3A4383}"> + <File Id="filAFAAE965983C249FC9A818A28333DFA4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Defragmenting.html" DiskId="1" /> + </Component> + <Component Id="cmp40BDD4F3CA20DEE006E087930EF3847C" Guid="{696CB75F-F832-4E11-9617-E4F05B6CA29A}"> + <File Id="fil7887EE82BC26C1CFAAC5CD3A29EF5049" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Digital Signatures.html" DiskId="1" /> + </Component> + <Component Id="cmp7AEEABAF151FCE92735664A55F7B8FFA" Guid="{40361F33-E50C-492C-8D5F-9B32B2318FBF}"> + <File Id="filE430D3D4AD453AD90952510D4194438A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Disclaimers.html" DiskId="1" /> + </Component> + <Component Id="cmp9380DDE2560B4D8EE9CC363AF4BC7B5F" Guid="{787E2CF2-DF61-4341-94A2-497BCF9882C8}"> + <File Id="fil04BCDEC7438B23A6BBF1C95ACF126266" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Documentation.html" DiskId="1" /> + </Component> + <Component Id="cmp84A94F04CD486338F57C03B316145945" Guid="{44F12D12-3BB4-4FE5-B829-5D471C05A2AF}"> + <File Id="fil07C7557AAF506EE9095B8C76E9C56776" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation.html" DiskId="1" /> + </Component> + <Component Id="cmpDF544847A4B1F86B3BA3468336CD73FE" Guid="{8E46CB17-1956-4E28-B8F4-30DEFCEA1CF6}"> + <File Id="filD27301F6F853ABFC08499D4085599774" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_Bank.html" DiskId="1" /> + </Component> + <Component Id="cmp9A6A861B59A23E534C7407EF95500AA5" Guid="{044EF38F-E86C-4A28-B675-CA7E8E318559}"> + <File Id="fil87AEAF6DE829555C03BF7888DDD40D8F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate.gif" DiskId="1" /> + </Component> + <Component Id="cmp09C34B1CBDE9F2F4E897340B1C67728E" Guid="{CEA5EA37-6E8B-4DC0-A4DC-F95A050D36A1}"> + <File Id="fil2E4790AC38717B6E5E9B77A926CA98C4" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_CHF.gif" DiskId="1" /> + </Component> + <Component Id="cmpD3183A7373751A19B4B7C9B041F9035D" Guid="{23A3ADFD-3BC8-4F77-9281-EED6A67CAFFD}"> + <File Id="fil12198C69AEB78A4CDE5C4343E8EE27A7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_Dollars.gif" DiskId="1" /> + </Component> + <Component Id="cmp3DED9073AB120DC026C48E9CDF9283EB" Guid="{8F9DA5BB-3BFE-4D21-8B79-65AFBFC93ECF}"> + <File Id="filDA4E4CC3AAE26E3ADE9CFF4940975500" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_Euros.gif" DiskId="1" /> + </Component> + <Component Id="cmp0FF3027C2662D967ACB4B01BA7BC85F9" Guid="{1B9D2475-C2D0-4695-B51D-AE53BFF05A46}"> + <File Id="filF7C4F27359F58FD995B964FF3B5AAAFF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_GBP.gif" DiskId="1" /> + </Component> + <Component Id="cmp3FC9C0126A2074CAABCF73197358F824" Guid="{7AD29EC1-38EF-4F2A-8038-E70A6D360CA0}"> + <File Id="fil0D75D569E37C808031A4217294796BC7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_PLN.gif" DiskId="1" /> + </Component> + <Component Id="cmp1830E220882FBA276350032258B478AA" Guid="{A1A3410C-6B91-44FF-AC33-BDB18F4F2022}"> + <File Id="fil7779997A454E1C0068F2DF292319AA6A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_donate_YEN.gif" DiskId="1" /> + </Component> + <Component Id="cmpE5D6E9DF3EE1301C6D5A4F44362BCE96" Guid="{0811DEAF-F857-4839-A31B-C1B3A2C932FE}"> + <File Id="fil83A3E2E3996B9CC933A606F6E4661FD5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_BitcoinCash.png" DiskId="1" /> + </Component> + <Component Id="cmpB7B429D414CF1DD05A4B70CE94E343F7" Guid="{04490FFA-387E-4FD7-9449-AB6C99886EA9}"> + <File Id="fil25C86292E018E61CB762731F14261986" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Bitcoin_small.png" DiskId="1" /> + </Component> + <Component Id="cmp00845B9781D5633702C834BCB4EB93D1" Guid="{A41BFAC5-42BF-45DB-BFF9-703F9DBE7346}"> + <File Id="filAD426632459DB7AB1528AC311CE28870" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Ethereum.png" DiskId="1" /> + </Component> + <Component Id="cmp47F92D029E335F7865F8ACB30763FED2" Guid="{A6C96C85-D0E8-442B-8C84-8705F17EE4C7}"> + <File Id="fil155C2578FFCBDBD39679AB6AF62EEA7B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Litecoin.png" DiskId="1" /> + </Component> + <Component Id="cmpF3B90B0C1F316854E9142B22783ACF19" Guid="{A369FF58-377C-47B9-A2A6-B222CA95898C}"> + <File Id="filBE9E8FB59340806B67751E8BC2E00071" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Donation_VeraCrypt_Monero.png" DiskId="1" /> + </Component> + <Component Id="cmp2EC17F48BC15C5405D2DB40FC6E01745" Guid="{700262B3-5BB2-4482-B96B-A511EA875986}"> + <File Id="filACA26698300072DB7F917CA47A8AB6B3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Encryption Algorithms.html" DiskId="1" /> + </Component> + <Component Id="cmpE00F8980768E14DF59474B5CB3D84041" Guid="{45C099F3-92B5-4514-9049-BEA244F0C942}"> + <File Id="fil0B06214692CAA0ACCACC01D1372A93B5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Encryption Scheme.html" DiskId="1" /> + </Component> + <Component Id="cmpD17B73F5892E45458E960025558B3452" Guid="{F974B54B-B964-4B65-A718-DF09BE96F106}"> + <File Id="filAEB57F6A5B5C2593D13AEF942A2C721C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Ethereum_Logo_19x30.png" DiskId="1" /> + </Component> + <Component Id="cmpF45A8248FAFA80A8DF62989C477E7C0F" Guid="{9184BA24-53AB-4753-907C-E88D7F56B3FE}"> + <File Id="filA72BC6DCFD81551D166437E20BA8224F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\FAQ.html" DiskId="1" /> + </Component> + <Component Id="cmpD066CBBD66E8CABB4AD4B928F823A5D2" Guid="{A8B260B0-505C-4948-801F-A03236A0D61D}"> + <File Id="filACB34BF3CCD1B081CBA230C962B4023D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Favorite Volumes.html" DiskId="1" /> + </Component> + <Component Id="cmpACFE3B967BB844C3FD0FE21C9E87EE5B" Guid="{46D1B528-C7B7-4AEC-B5AE-0A3F91D4312E}"> + <File Id="fil88A41060BD4F57CB6135E162D4AB5CD7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-au-small.png" DiskId="1" /> + </Component> + <Component Id="cmpFAA171DECE81EA4EA99B5570C9FF7D0E" Guid="{6EC15848-F7A8-40B3-88DF-52010E89E634}"> + <File Id="fil16558379B1C9116103DF96CB9C5C36AD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-au.png" DiskId="1" /> + </Component> + <Component Id="cmp7C1E782A2C12520E4CACF0D8FD4EAA4E" Guid="{625A778A-7F8A-42D8-A725-85973721DFF0}"> + <File Id="filA16A3EF20ACB7C21ACD09A4D1593A6F1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-eu-small.png" DiskId="1" /> + </Component> + <Component Id="cmpE9009D51D7CF4AA8BBA735E91F1D6044" Guid="{58D024BC-047D-44AA-9818-9E68C256D84D}"> + <File Id="filCEC0006C74C3A5D4FB0CDA60EEE61C91" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-eu.png" DiskId="1" /> + </Component> + <Component Id="cmp5D46BFDD0D54DD715695756148C22028" Guid="{42A27E61-0190-4654-8996-91B092CC314F}"> + <File Id="filE84495221B2E5A505F3AA4CA4595C7A9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-gb-small.png" DiskId="1" /> + </Component> + <Component Id="cmpE34BBB4D255F23D71B0143270915E6D7" Guid="{5E95AE9C-8807-4E4D-81DA-1A83DACDC8A1}"> + <File Id="filECFBF3D126ECCB088B3B313A370D71ED" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-gb.png" DiskId="1" /> + </Component> + <Component Id="cmpEB665F1BFDB30B20C90142CCD1DA7664" Guid="{DB6617B7-2FEE-4FDB-A2DA-834B33B29C3E}"> + <File Id="fil968867F284C9559835DFF02CFA106E13" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-nz-small.png" DiskId="1" /> + </Component> + <Component Id="cmpFDCC994071E7ADACE3EB2CBACC60E34A" Guid="{0494762C-CFB8-4CF7-85AA-0650B2B4E813}"> + <File Id="filF5C5A9923D299431406A6B5D8D2BF34D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-nz.png" DiskId="1" /> + </Component> + <Component Id="cmp21A3A9B1C7FAA004EF937114F0F41C61" Guid="{2F88A1FE-94B5-46E0-93C2-DE9F9BEE58FF}"> + <File Id="filC1071DD08F53BDD0249A4E15993448D6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-us-small.png" DiskId="1" /> + </Component> + <Component Id="cmpFD4A149B4654FEF0542A5ECE211A86B8" Guid="{CC1D951A-2C70-4AE4-AC3C-E2D56789B981}"> + <File Id="fil1120ADD37C4E5039A94D7442675B202D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flag-us.png" DiskId="1" /> + </Component> + <Component Id="cmpE7CDDDCDA7CD20F1150F2879E0293D1D" Guid="{67630C6C-178E-41CF-A74A-AA086E5B4553}"> + <File Id="filA42CDEA93CCFE721C2569FA3D0786D57" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\flattr-badge-large.png" DiskId="1" /> + </Component> + <Component Id="cmp9CDBE7ACC2D5393535D2981C3DD73682" Guid="{97414D97-9C51-419A-9FE2-392223B7600A}"> + <File Id="fil901AA5AF4A010844A1F50A5881B8FD16" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\gf2_mul.gif" DiskId="1" /> + </Component> + <Component Id="cmpF09EAA16502FCF137AAD38D70D50B200" Guid="{95BBE9B0-AB65-43FF-A3C4-0D347BE43DF0}"> + <File Id="fil3E73719A927F1E24178C1E3C05DC1384" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hardware Acceleration.html" DiskId="1" /> + </Component> + <Component Id="cmp62D4B7B5DACB58D3EEA9E6D3385769A7" Guid="{285C17A2-418E-4ACD-B0E8-A3940A9E9E61}"> + <File Id="fil05C2A8A0846F0288FDC2580173316E05" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hash Algorithms.html" DiskId="1" /> + </Component> + <Component Id="cmpBF36D06FA293DFD3AFA1543C43A54E17" Guid="{EC20DE1B-F10D-4F9E-9CEA-8E06170EE71C}"> + <File Id="fil12E28B4819EEC3590C5CFA611E8BAF01" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Header Key Derivation.html" DiskId="1" /> + </Component> + <Component Id="cmp7345D3EE0CFEA227E8AA9ADADF95E623" Guid="{F5E2342E-2879-48B1-B3CE-5C626AEDC366}"> + <File Id="fil25DB00F86CBD631E7750B8050A9CC9CD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hibernation File.html" DiskId="1" /> + </Component> + <Component Id="cmpE92C5D4B774B7214B49931528F7EDCF6" Guid="{44B9627E-29EC-4B8E-9B20-3D0ECCC77C1E}"> + <File Id="filA094EFE79FB6AAAEDCCC3C997972E35E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hidden Operating System.html" DiskId="1" /> + </Component> + <Component Id="cmpB6A3927A1BE4D2836C1007D3CC989C4B" Guid="{13D8AB5D-0F73-4C29-AB08-9086313EF010}"> + <File Id="filC7CDBCEC9B1D4BA6BCFC0362CE353D51" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hidden Volume.html" DiskId="1" /> + </Component> + <Component Id="cmp28666EA10A3DCEC7D2583ADD52785FDC" Guid="{55E58038-C992-4683-AA9F-9CA4111884FF}"> + <File Id="fil707007462E284E1048B6AB488EFFD466" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_facebook_veracrypt.png" DiskId="1" /> + </Component> + <Component Id="cmp08768A6308C114126260614CCDF6F72E" Guid="{30FDB2BD-5E5B-421E-97AE-F819944A4B57}"> + <File Id="filFA4C178FEBD09C0A4D38AA90B4523E9E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_reddit.png" DiskId="1" /> + </Component> + <Component Id="cmpF00E284DEEE43B341D12987E20DB76C5" Guid="{A2160846-E461-4C23-BC88-64531B3D2C59}"> + <File Id="fil4A9EA521DBB6DD5E280E4186CD34FA11" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_utilities-file-archiver-3.png" DiskId="1" /> + </Component> + <Component Id="cmpB75BD74E0F63097DC1777FF4BF440479" Guid="{E2C9732A-0FD0-4A33-9B69-0BCD132AB427}"> + <File Id="filDABCE60F828DEEE9AE5064EA3F71EC67" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_VeraCrypt_Default_Mount_Parameters.png" DiskId="1" /> + </Component> + <Component Id="cmp1745256A6ECE8FB1779B0DA82CEECAB9" Guid="{1A5FBC9F-430E-4F8D-AEA4-7391D85F2E27}"> + <File Id="fil9C3B9E9CFB06A1F7C162B4941656906A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Home_VeraCrypt_menu_Default_Mount_Parameters.png" DiskId="1" /> + </Component> + <Component Id="cmp3F248F4BDDB12D98D3CF173FEA01CE24" Guid="{1B2E6370-1DD1-42D8-9E84-6D85922DFA07}"> + <File Id="fil9E39BB9774782EA2337679D8B86AB1A5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Hot Keys.html" DiskId="1" /> + </Component> + <Component Id="cmp1209E63998A1D1504B062C4ECC45EE07" Guid="{ED60D316-7B35-4622-90B5-938260E9E150}"> + <File Id="fil2B4301AD5F5E385426DEEE0DE166D557" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\How to Back Up Securely.html" DiskId="1" /> + </Component> + <Component Id="cmp035C544DF9B46B9DD7871AD7898B7D36" Guid="{44C5611E-FF00-41F3-B744-E18801513D89}"> + <File Id="filF60B07EAEE2B63ECAA396508EC68858F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Incompatibilities.html" DiskId="1" /> + </Component> + <Component Id="cmpA891AF32EF72B7AC80533FC31773B604" Guid="{305DB86E-AE27-4634-9CE1-C4C875EF9569}"> + <File Id="fil8F60E744AB05081B8929E635DDF7B733" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Introduction.html" DiskId="1" /> + </Component> + <Component Id="cmp1FC684D1C3742A927228DE9A669A2895" Guid="{EE9D3F20-7EB4-4628-ADE6-51238E60A998}"> + <File Id="fil9BA13C18F0927CFB3AFBFBDA5944B166" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Issues and Limitations.html" DiskId="1" /> + </Component> + <Component Id="cmp265116FC4778248E01BADFB30A2C32A7" Guid="{37C6EB1F-7A7D-4F00-9204-51240EB7FB81}"> + <File Id="filC57676C07D244DB5A336F1D52D978004" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Journaling File Systems.html" DiskId="1" /> + </Component> + <Component Id="cmpB2A3FFEE7A15E23A2835A843438E3669" Guid="{BF14B9BF-8AFB-4E5E-80E4-CA2F3D132F51}"> + <File Id="filF08A4DB40EFF11FE0784034B3D70B750" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Keyfiles in VeraCrypt.html" DiskId="1" /> + </Component> + <Component Id="cmpFC8FB415783E0AA424FBD685EFACF54E" Guid="{01FCB5FD-953B-49D6-B993-6AC117052F6B}"> + <File Id="fil6DA5794E0BA3F26779AFE828D4E41AAC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Keyfiles in VeraCrypt_Image_040.gif" DiskId="1" /> + </Component> + <Component Id="cmp2BCEA21755E1C812ACCF15A09210FCCD" Guid="{0CECEA1A-AB6B-49B6-8D07-8D86B452995A}"> + <File Id="fil5450B4F3DD747980B87B30ACEC318F6E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Keyfiles.html" DiskId="1" /> + </Component> + <Component Id="cmp9EC1750F7CD9717D3A761FC2930C509D" Guid="{980F49E8-EBCD-4720-8466-C03DC2B3BBD7}"> + <File Id="fil780042F951150166D5D328C10993CE7E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Kuznyechik.html" DiskId="1" /> + </Component> + <Component Id="cmp4298A84BD6956E2A2742B5678BCFF173" Guid="{2809427F-697F-48A4-853B-5BE4AE1E720A}"> + <File Id="fil01E37EFCBAF6AB983418B79E3DD75E88" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Language Packs.html" DiskId="1" /> + </Component> + <Component Id="cmp2D9F7D88EF1F843BDEA5A39D13330B8A" Guid="{7A515A66-AD7E-4B89-8935-62C7B3FCF0A7}"> + <File Id="fil587E308C1A86BF1B8DA5BEFF409C509E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Legal Information.html" DiskId="1" /> + </Component> + <Component Id="cmp58EAECCB29CB9ABDDDB72F9378E4EE77" Guid="{03CB945A-4EE1-4EC6-8360-56B00FD8C7E8}"> + <File Id="fil76CDD0FA0D1CFE86ABAFDF8ED174B7D5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\liberapay_donate.svg" DiskId="1" /> + </Component> + <Component Id="cmp61C660976A230AD4AD8B42A90D4BCC7C" Guid="{7B5EFF52-9EBF-4A15-8117-684E0B40EC9E}"> + <File Id="filE7AA75571211982F69DEE42B8A42D2BA" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\LTC_Logo_30x30.png" DiskId="1" /> + </Component> + <Component Id="cmp29A0605ED3FB7D4E2EAC833D56411563" Guid="{A65BBFC8-1956-4F8E-A0C8-74D32230342F}"> + <File Id="fil9DB1C5CAE05C434550F18FEFC614D725" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Main Program Window.html" DiskId="1" /> + </Component> + <Component Id="cmp4A0EF1CFD1E1DE8B4E7BF698E05680E9" Guid="{273E1197-B7FC-40E4-AFB0-317D1D0AD816}"> + <File Id="fil8F40D01C235606BC89A05FF0956B7146" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Malware.html" DiskId="1" /> + </Component> + <Component Id="cmp1E4F8137AD337BEA1B902E6B003AB953" Guid="{6FF05277-1E0B-4885-8AC4-9B3044DA19CA}"> + <File Id="fil1C19C87ED25856F0A34F96A3AA92D695" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Memory Dump Files.html" DiskId="1" /> + </Component> + <Component Id="cmp8D35F7D61B2B7DF0EDEAE2E56031E7CB" Guid="{41103C48-5692-4593-8042-75B847917265}"> + <File Id="fil03685445FCFED7E0BA2CA91812337283" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Miscellaneous.html" DiskId="1" /> + </Component> + <Component Id="cmpDE2C66707086A509EABD0F9F6E8BDB1A" Guid="{077B9131-7B76-4E56-9895-0A34F2B7DB5A}"> + <File Id="fil52FBC994010BF4A06B7C78261E002986" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Modes of Operation.html" DiskId="1" /> + </Component> + <Component Id="cmpA80443C3767E3E51F3DE88BFD0D7A33B" Guid="{221A050D-548A-42F2-9555-7ECA43D71CB6}"> + <File Id="filD4C6BB0CDA1B086217E6C8B6E4930DEE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Monero_Logo_30x30.png" DiskId="1" /> + </Component> + <Component Id="cmp214446AAABEBAC0C3827B8977083FAE2" Guid="{76AB42FF-2CD5-4CC2-9E32-640FFA611F17}"> + <File Id="fil82C85BB54B2E986169D519B2AAF71A46" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Mounting VeraCrypt Volumes.html" DiskId="1" /> + </Component> + <Component Id="cmp4AF022868FE6883520C700676C43B15D" Guid="{DE7F786D-2B71-4654-86F1-C02CCDA23E23}"> + <File Id="fil1B5039BFF40C7C3BAA602D9AE17668E6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Multi-User Environment.html" DiskId="1" /> + </Component> + <Component Id="cmpC27AA2C4496C9EFA95DCD663B031B5D0" Guid="{23C15FAB-969E-491A-802E-ADE3255F9002}"> + <File Id="fil5FA8E7B0268E1EF7F9FAFA478FE0C8B1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Notation.html" DiskId="1" /> + </Component> + <Component Id="cmp9CBBC8311BBFC54C8DC1162BB17E5AED" Guid="{9C5C22CF-AB15-4D0C-B715-AF1E31B0AFD0}"> + <File Id="fil7A50CAD8D98A751781AF007ABEE22CD2" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Paging File.html" DiskId="1" /> + </Component> + <Component Id="cmp033461B0777614621A2ED7B4E2B08D55" Guid="{1A3135F7-200E-4563-90C3-79E5511394CD}"> + <File Id="fil45662024A9E5B2BEBA51908F9478105E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Parallelization.html" DiskId="1" /> + </Component> + <Component Id="cmp0E43CDBBAE343957423AE2907AC16883" Guid="{5C63387F-3BB8-405A-BA0A-10F87C828F9A}"> + <File Id="fil70B46565AEC42A408480FE289D55EA5E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\paypal_30x30.png" DiskId="1" /> + </Component> + <Component Id="cmp8A8526D2061A14810E1B7A8A6E527DCD" Guid="{F46FE563-00F0-465E-A7E7-901B1B3F412E}"> + <File Id="filF33DCC20E8AA63F4190D46B9D22D71C6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM).html" DiskId="1" /> + </Component> + <Component Id="cmpAE2DADEF126C59D8CCD3A18D8CDC49C8" Guid="{EF70E2B7-4109-4327-BE89-0D411119AC4D}"> + <File Id="fil357A891A8A012F17A7B040E444D36B5F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_Step1.png" DiskId="1" /> + </Component> + <Component Id="cmp2F972A5C99F7EE708B7C232EE8647672" Guid="{3190ECDC-675E-4845-A885-F12A1DF98B80}"> + <File Id="filF8BC3136E117642C05A9DE926C174FAF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_Step2.png" DiskId="1" /> + </Component> + <Component Id="cmpB21F7D781FE7B006ABCA7974A21F29E2" Guid="{E07A247C-4600-4FAD-9766-585D2385EA6B}"> + <File Id="fil559077BE31FD160F8A07CC74414D0B6A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_System_Step1.png" DiskId="1" /> + </Component> + <Component Id="cmpF345174585735CD7A31AE138DDE8B439" Guid="{516094A0-18EA-4AA4-806C-DAFC7BAF1245}"> + <File Id="fil191704A44DE6065F1A5919C5EB1D49E1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_ChangePIM_System_Step2.png" DiskId="1" /> + </Component> + <Component Id="cmp06772C03A0ECA40F11F1D5C5ACD607D8" Guid="{9235C68E-30B0-4B4C-94EB-6BDBC4057677}"> + <File Id="filF226612AEE0B01C8ECE40DDF61B34478" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_UsePIM_Step1.png" DiskId="1" /> + </Component> + <Component Id="cmp79E890B8891FA87AA5B10A67E15E7E8E" Guid="{E0EA3C67-4624-47E1-A528-9859B868C7A5}"> + <File Id="fil6351515AD3FA423CD458336ABC480500" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Personal Iterations Multiplier (PIM)_VeraCrypt_UsePIM_Step2.png" DiskId="1" /> + </Component> + <Component Id="cmp89C46AE8EC4175E62A9CFE3DF9DF924A" Guid="{0A572658-4C6A-4F2A-8302-FF92CCEA3FB4}"> + <File Id="fil0435E327F9A0E86EC58E465ED1474BBB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Physical Security.html" DiskId="1" /> + </Component> + <Component Id="cmpC8F860B10D41961424874F69C6D84ED3" Guid="{ED207B14-7958-4933-BF3A-1A1F85ECBA4E}"> + <File Id="fil3B718B54EE1655F0A905435EE96043B9" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Pipelining.html" DiskId="1" /> + </Component> + <Component Id="cmp285021B8CBC8E92B1CBCE4C88731083C" Guid="{86BDBC99-AC0B-4542-B14E-99908DD27628}"> + <File Id="filB7C15B9F7B056DB59B2E536B74F5F1AE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Plausible Deniability.html" DiskId="1" /> + </Component> + <Component Id="cmpABE9B0A93A9B14C0732EBD8CD17A11AE" Guid="{5EE9BF82-FFB8-4511-B967-3383965953FB}"> + <File Id="filE75832AA56BFC08BDB777474186CECD6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Portable Mode.html" DiskId="1" /> + </Component> + <Component Id="cmpD9B960879A3227B971E33222CE13BC18" Guid="{BD467209-9DA1-4383-BE25-E2EC8C9616ED}"> + <File Id="filFBF0DB894794EFB2376487A579DFED67" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Preface.html" DiskId="1" /> + </Component> + <Component Id="cmp3B3BB414D13FDBF2B0C7A9CEBD7D98F5" Guid="{2CF8409E-3423-44A2-96FA-54D793EEB3F0}"> + <File Id="fil7F7441447BC07C288597FEFA0D495255" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Program Menu.html" DiskId="1" /> + </Component> + <Component Id="cmpB39B1096387C2617720F515D24953B37" Guid="{48233666-96CF-4C73-9284-259EC39EA2B7}"> + <File Id="filBE0C2BED7FB2DD3D2FC511AC4D7D385A" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes.html" DiskId="1" /> + </Component> + <Component Id="cmp493A37205039E2A3A476A1A4F5360EBF" Guid="{3D92A6B0-B03F-4C86-8020-F756FBAADDC8}"> + <File Id="filC70F6B9415FAADA8160DB4529D0BE54D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_027.jpg" DiskId="1" /> + </Component> + <Component Id="cmpF36A771DF9B1C4CD8E82C08A6D3D0786" Guid="{C0D77203-5FAC-4052-A490-ABB0346384AF}"> + <File Id="filE1423115AD04FF5AEC6F63AA963CB4D6" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_028.jpg" DiskId="1" /> + </Component> + <Component Id="cmp63F6A68C5538B45661168554BC3B93D1" Guid="{252A5E82-AD3A-49A7-8185-421735A09DCE}"> + <File Id="fil5286E3B666BFB60D10FBA4CF8D8F6925" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_029.jpg" DiskId="1" /> + </Component> + <Component Id="cmp0158A6D8BED6391AC7150B6C6AE2A9F9" Guid="{5A0D3271-1439-4E71-B7F6-D645FEC8FD49}"> + <File Id="fil2C5151D680BC4575AC607487970F87D8" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_030.jpg" DiskId="1" /> + </Component> + <Component Id="cmpDE45667E9E3CD9F800EAC1E02B57AAB7" Guid="{333167EF-38B6-49E2-A24A-04E08F7D87BE}"> + <File Id="fil1B03C5F8575364F36A893E5EE4723659" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Protection of Hidden Volumes_Image_031.jpg" DiskId="1" /> + </Component> + <Component Id="cmp632453049391BAACDD117A40EC442743" Guid="{75B50C72-2495-4A22-BFDA-5BFE041EB265}"> + <File Id="fil37E6C8BC6738BF93446E4F2D13E312EC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Random Number Generator.html" DiskId="1" /> + </Component> + <Component Id="cmpCE16E453CAD75A461B4FEBF451A51B7B" Guid="{E68D3F57-0A30-4492-9088-F2D1B0C7934A}"> + <File Id="filC3043FC38C97C7B8038FF12DD7882D85" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Reallocated Sectors.html" DiskId="1" /> + </Component> + <Component Id="cmpC741D187A28A87BD33866C9AC09A1298" Guid="{FB850461-6BD1-495F-9C10-19A34CFA0F16}"> + <File Id="filFFB70B91C00A69849F9E36950C6606B3" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\References.html" DiskId="1" /> + </Component> + <Component Id="cmpB313B00E647A121B2CBE47F3048A18A7" Guid="{5985576D-6F6C-4D96-9B3E-9E0961CF9FAF}"> + <File Id="fil2EB5F87C05CCC55D3964D595C85EF19E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Release Notes.html" DiskId="1" /> + </Component> + <Component Id="cmp400428F6494DE58618E3B92539548C39" Guid="{0A1869ED-25F1-4430-97A5-4C6EA8CDA7FC}"> + <File Id="filEDEDEF956F04F36B4163989F9AB9285F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Removable Medium Volume.html" DiskId="1" /> + </Component> + <Component Id="cmpFB2313AB16EF2467366ED136C0E61CE6" Guid="{CFEC9559-9F85-46C6-9E98-AEBB573B96FE}"> + <File Id="filE496203C4727FDF47F8352CB9722A8C7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Removing Encryption.html" DiskId="1" /> + </Component> + <Component Id="cmp960F36632D3FB602421D1195E4EB6FE1" Guid="{321F49A5-8A1B-4881-A32D-12EDA99D1B85}"> + <File Id="fil324009D5856BF4C5270D40F1EC4110EB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\RIPEMD-160.html" DiskId="1" /> + </Component> + <Component Id="cmpB4C7B1A7A3EC0CB2DE805AC5CC5FC0D7" Guid="{4534E8B2-114E-4173-AE3E-75E0D96EB573}"> + <File Id="fil8CFD1CFDCBE261B6F91D9E587F8720C0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Model.html" DiskId="1" /> + </Component> + <Component Id="cmp00540BF93A805E0B9996945B61E1BC2F" Guid="{1D5B7A85-87F3-45AF-9C09-BA7E088A835D}"> + <File Id="filA7A29851126AC571C090BB0FBEE83CB5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Requirements and Precautions.html" DiskId="1" /> + </Component> + <Component Id="cmp4C46C6668AD830D543AFE593D51676B3" Guid="{4CD21E9D-243F-4A58-A535-AA8EF9D2BFD1}"> + <File Id="fil440C5158A3CD96689918C976DC917325" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Requirements for Hidden Volumes.html" DiskId="1" /> + </Component> + <Component Id="cmp6EE914124966E3A0F695359116413DD4" Guid="{724FA79D-49BC-4075-ABF4-0C318AE39855}"> + <File Id="filD229058EB41E2E150C0CA4D0EC1DF39B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Tokens & Smart Cards.html" DiskId="1" /> + </Component> + <Component Id="cmp28E29B4CA17AB51913B756CD9397EEFE" Guid="{1B9083B9-8E76-44CA-AE3E-0771B1ABA62B}"> + <File Id="filC173058120D357E87951F41755A9210B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Serpent.html" DiskId="1" /> + </Component> + <Component Id="cmp5DF24509F284FABC600232197F803DE5" Guid="{120A40CF-E44A-4F4F-9072-93248DABACA2}"> + <File Id="fil01F3ACD810057C4A059A5C424E1B79E1" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\SHA-256.html" DiskId="1" /> + </Component> + <Component Id="cmp09E31B885345FBEA1F473AF7A10FD88D" Guid="{1B1C80CF-6C3C-4C7D-BE7B-579042701D0F}"> + <File Id="fil2E702CC679444D8DDB66A3FBDB32C807" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\SHA-512.html" DiskId="1" /> + </Component> + <Component Id="cmpAE05C79A35A43ECCAC995A711DC4D60B" Guid="{151A493F-38A5-4EF1-9740-255B610B4117}"> + <File Id="fil167B9CF3B9CD2FA5458778733095F780" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Sharing over Network.html" DiskId="1" /> + </Component> + <Component Id="cmpB6D91209A93313D08150643F1738DED8" Guid="{270DF8A0-8859-49F3-BF05-2F155C3CA428}"> + <File Id="filF3B75776C2FEC0F4397274BCA02330DB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Source Code.html" DiskId="1" /> + </Component> + <Component Id="cmpDB66E821EC13977824FB1069DF5DAA69" Guid="{D08B0614-2B88-4445-9B47-52BEA0E29E77}"> + <File Id="filA67FBF7D25BFBA155A0E4570F404CBEE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Standard Compliance.html" DiskId="1" /> + </Component> + <Component Id="cmp159AB26E32632FC87229090B3AA89BF8" Guid="{B35B4FD4-D82C-47E9-BB2A-5539115F40CC}"> + <File Id="filBFED47E502C7539F724D68EAF73A554D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Streebog.html" DiskId="1" /> + </Component> + <Component Id="cmp5BE3E12343551B853E1B143371CBEBE6" Guid="{5ACC0589-AD8D-4BAC-BD40-201BAD7D07BC}"> + <File Id="filA40C816E149FB745F49DAF482DF97F3B" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\styles.css" DiskId="1" /> + </Component> + <Component Id="cmp0E081D9499DA225BB788494A1D86893D" Guid="{A79816FA-0683-4097-988B-75FB49DF3265}"> + <File Id="filB5B2E158090CD673A8FE9D55020AFC48" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Supported Operating Systems.html" DiskId="1" /> + </Component> + <Component Id="cmpBC7134AF21BAE309E9FD1A52ADF92527" Guid="{9570C06B-324A-4216-8D39-57AE06CAC70A}"> + <File Id="fil6D85A49AF2B16D6EE47465F315B140EF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Supported Systems for System Encryption.html" DiskId="1" /> + </Component> + <Component Id="cmpB586F01E9F9657C498F2AB64E1F51BD7" Guid="{9E7FE222-18AC-48E5-ADAD-2A45BD498DAB}"> + <File Id="fil4943B1ACB69010EBD9EC4E9D4E010E11" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\System Encryption.html" DiskId="1" /> + </Component> + <Component Id="cmp6EB049078039C276CADA69E7B79FDFA8" Guid="{8BDEFB8D-9143-45EE-8095-65B5F4C95417}"> + <File Id="fil5A3E287172F44E471AE59AE8AB15B797" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\System Favorite Volumes.html" DiskId="1" /> + </Component> + <Component Id="cmp3135BB68A1F44DDD9FE19B7D5FB4ED7B" Guid="{00ED20A0-F1D4-443F-91EE-646A14B229BA}"> + <File Id="fil2C3C74388CBEB07327ED4D549C0067FE" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Technical Details.html" DiskId="1" /> + </Component> + <Component Id="cmp98ECAD990DF7B535B05EF6E840B7B2DF" Guid="{1827AFAB-C8B0-46BF-B281-88662B87E583}"> + <File Id="filAB4D4629FE812B0E1CDB1E3CBFB4A297" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Trim Operation.html" DiskId="1" /> + </Component> + <Component Id="cmpFE417CCCB859A1C3E4FB90A9C4E132F0" Guid="{A03D9719-6170-4239-9E67-5857521417C3}"> + <File Id="filECA5FD7DEC2F3112CF19DB201F4DD774" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Troubleshooting.html" DiskId="1" /> + </Component> + <Component Id="cmpD91C00B1B2AACF38761B45D0574884D7" Guid="{52CD1733-C124-401A-9830-56AECD35F8DF}"> + <File Id="fil524C8D572AD8121392C6584496A57345" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\TrueCrypt Support.html" DiskId="1" /> + </Component> + <Component Id="cmp590EDE3CE6E09D0D43B35287E849B75A" Guid="{5A433701-05CD-4972-9B85-B318BFD5D8DD}"> + <File Id="fil35D6691D20085B8A5F8941864C44EC0C" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\TrueCrypt Support_truecrypt_mode_gui.jpg" DiskId="1" /> + </Component> + <Component Id="cmp9D6F95F912C3B9C95E92E39BA1CE6BC9" Guid="{95929E0A-1AB1-44BC-A86D-F4F4B552121F}"> + <File Id="filE04EC2E8B20706A01283B31462E0DB0F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\twitter_veracrypt.PNG" DiskId="1" /> + </Component> + <Component Id="cmpAD429D8A050A0D31B661626BDCA9C952" Guid="{6437B9F6-6024-4ACA-8FF1-23A613E2373E}"> + <File Id="filC71BF1DDF8EB4C886801C1E95CD42F31" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Twofish.html" DiskId="1" /> + </Component> + <Component Id="cmp3BDE199844AB81673ABB0E5E61E9B7B5" Guid="{95B5F172-3BBE-4620-B68A-F2D3473C066C}"> + <File Id="filD2BC6D56B2FF1A44DB6FF7B24B594430" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Unencrypted Data in RAM.html" DiskId="1" /> + </Component> + <Component Id="cmp0A4AB9AEF0D351FA5E63BCD67DC00607" Guid="{CF5B6BB4-4263-4354-BA4F-ADF283A0F238}"> + <File Id="fil82416621AEEFEB29EFA3DE265214EA14" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Uninstalling VeraCrypt.html" DiskId="1" /> + </Component> + <Component Id="cmpCC25F1CB6A1C9D8B47C407B818F73B59" Guid="{5E74CF1D-85A3-4A4F-B1D8-E965912E00DA}"> + <File Id="fil9D6D114ED531555871AD956FCBA5B7DC" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Using VeraCrypt Without Administrator Privileges.html" DiskId="1" /> + </Component> + <Component Id="cmpE0F5E8A2D6FEF181686370F0E1EAC632" Guid="{FDF54DAD-73B4-4D06-A292-353E3AFC27F7}"> + <File Id="fil980276E3BC07E82993537096C68872EF" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Background Task.html" DiskId="1" /> + </Component> + <Component Id="cmp46B2E8BCD50BD668153E793EB737BC39" Guid="{A899B8CF-2847-4BC2-BDD5-4B9C77EC13F9}"> + <File Id="filF1064BAE73402AAE56CBD0BED505159D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Hidden Operating System.html" DiskId="1" /> + </Component> + <Component Id="cmp0305CC2824E44F697B402E56A0CD1754" Guid="{4A81FE38-C1CE-430D-855B-2126B865A643}"> + <File Id="filB279C24D2499DFD0899469188292D02E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt License.html" DiskId="1" /> + </Component> + <Component Id="cmp0E00CBDCB82A904FD6AD82E458CA6AA7" Guid="{54998F1F-E717-4881-B63E-A3493B3EB7FD}"> + <File Id="fil069503600DD8A66DCDA448933183871D" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Rescue Disk.html" DiskId="1" /> + </Component> + <Component Id="cmp594B5E68E63675F4986F6717BC1F5950" Guid="{1216918B-2AEE-48BE-B956-9BF6F9AA568E}"> + <File Id="fil3AB9FDA0E3D8D0A0BD0C321E1779EC14" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt System Files.html" DiskId="1" /> + </Component> + <Component Id="cmp62748E79EC04EBE33DC46770AD65CDCE" Guid="{6A32F378-04F7-42B4-A9B2-7A500BB34071}"> + <File Id="filB21E0ACBD1948FFB662842F1F6A86DAB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Volume Format Specification.html" DiskId="1" /> + </Component> + <Component Id="cmpE1265CF3CC5E0B487E99D9D5936BB3F4" Guid="{ADFAD315-C3D8-4084-A7F3-FA957429C5F1}"> + <File Id="filDFCE636A6439CD7F236E004E67DBCD23" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt Volume.html" DiskId="1" /> + </Component> + <Component Id="cmp1C162513D52824629D7C9FAF96054182" Guid="{8772B5F9-85B5-4DB9-AD86-AF6FB0FECF13}"> + <File Id="fil0CC62FF0B0565DF602BDF277B36D1696" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\VeraCrypt128x128.png" DiskId="1" /> + </Component> + <Component Id="cmpB5FA2A488D2C7E59E0B52D18820CE00A" Guid="{CF1BAE7D-281D-49DB-A096-51C3B3DFC40F}"> + <File Id="filCEA5B6C14C18E120FCFF7BBD6791B9FD" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Volume Clones.html" DiskId="1" /> + </Component> + <Component Id="cmpBB1A4A1EB3FBBE5B2BF2752C302CDC2D" Guid="{69F8D869-FB10-436B-8D13-DBBA92BA4B29}"> + <File Id="fil78A530A8C9B138112029FBCC58AE22E7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Wear-Leveling.html" DiskId="1" /> + </Component> + <Component Id="cmp9D908DF026E6297D51B6C4A6700092F1" Guid="{567314CF-BEA8-4AA7-A9EF-F0C776EF80E1}"> + <File Id="fil21EEF98CAEE8AF1A7263353EE9D83C38" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Whirlpool.html" DiskId="1" /> + </Component> + + </DirectoryRef> + + <!-- Refer to Desktop folder in order to install files in it (shortcut) --> + <DirectoryRef Id="DesktopFolder"> + + <!-- Creating an advertised shortcut : enhances resiliency by verifying that all the components in the feature are installed when the shortcut is activated --> + <Component Id="VCShortcutDesktop" Guid="C7EBBEFB-8E9C-48D6-8014-2BBA1C7D1957"> + + <Condition>INSTALLDESKTOPSHORTCUT</Condition> + <Shortcut Id="VCDesktopShortcut" + Name="VeraCrypt" + Description="!(loc.VeraCryptDesc)" + Target="[APPLICATIONROOTFOLDER]VeraCrypt.exe" + WorkingDirectory="APPLICATIONROOTFOLDER" + Icon="VeraCrypt.ico"> + </Shortcut> + + <RemoveFolder Id="CleanupDesktopShortcut" On="uninstall"/> + + <RegistryValue + Root="HKCU" + Key="Software\VeraCrypt_MSI" + Name="VCDesktopShortcutInstalled" + Type="integer" + Value="1" + KeyPath="yes"/> + + </Component> + + </DirectoryRef> + + <!-- Refer to ApplicationProgramsFolder folder in order to install files in it (shortcut) --> + <DirectoryRef Id="ApplicationProgramsFolder"> + + <!-- Creating an advertised shortcut : enhances resiliency by verifying that all the components in the feature are installed when the shortcut is activated --> + <Component Id="VCShortcutStartMenu" Guid="{9CA5F425-0268-4424-8E41-A94D90F1118D}"> + + <Condition>INSTALLSTARTMENUSHORTCUT</Condition> + <Shortcut Id="VCMenuShortcut" + Name="VeraCrypt" + Description="!(loc.VeraCryptDesc)" + Target="[APPLICATIONROOTFOLDER]VeraCrypt.exe" + WorkingDirectory="APPLICATIONROOTFOLDER" + Icon="VeraCrypt.ico"> + </Shortcut> + + <RemoveFolder Id="CleanupVCStartMenuShortcut" On="uninstall"/> + + <RegistryValue + Root="HKCU" + Key="Software\VeraCrypt_MSI" + Name="VCStartMenuShortcutInstalled" + Type="integer" + Value="1" + KeyPath="yes"/> + + </Component> + + <!-- Creating an advertised shortcut : enhances resiliency by verifying that all the components in the feature are installed when the shortcut is activated --> + <Component Id="VCExpanderShortcutStartMenu" Guid="9BA70A97-CB6D-4ED4-A0F7-A4CF9885DC33"> + + <Condition>INSTALLSTARTMENUSHORTCUT</Condition> + <Shortcut Id="VCExpanderStartMenuShortcut" + Name="VeraCryptExpander" + Description="!(loc.VeraCryptExpanderDesc)" + Target="[APPLICATIONROOTFOLDER]VeraCryptExpander.exe" + WorkingDirectory="APPLICATIONROOTFOLDER" + Icon="VeraCrypt.ico"> + </Shortcut> + + <RemoveFolder Id="CleanupVCExpanderStartMenuShortcut" On="uninstall"/> + + <RegistryValue + Root="HKCU" + Key="Software\VeraCrypt_MSI" + Name="VCEexpanderStartMenuShortcutInstalled" + Type="integer" + Value="1" + KeyPath="yes"/> + + </Component> + + <!-- Creating an advertised shortcut : enhances resiliency by verifying that all the components in the feature are installed when the shortcut is activated --> + <Component Id="VCWebsiteShortcutStartMenu" Guid="{D5AA7FFE-5256-4234-AEE1-F9F1EB6ECA4A}"> + + <Condition>INSTALLSTARTMENUSHORTCUT</Condition> + <util:InternetShortcut Id="VCWebsiteStartMenuShortcut" + Name="VeraCrypt Website" + Target="https://www.veracrypt.fr" + Type="url" + IconFile="VeraCrypt.ico"> + </util:InternetShortcut> + + <RemoveFolder Id="CleanupVCWebsiteStartMenuShortcut" On="uninstall"/> + + <RegistryValue + Root="HKCU" + Key="Software\VeraCrypt_MSI" + Name="VCWebsiteStartMenuShortcutInstalled" + Type="integer" + Value="1" + KeyPath="yes"/> + + </Component> + + </DirectoryRef> + + <!-- Registry Keys --> + <!-- When Name is not provided the default value for the registry key will be set instead. --> + <!-- We use " for when a " is needed in a Value --> + <DirectoryRef Id="TARGETDIR"> + + <!-- Win64="no" means the RegKey / RegValue will be created in the 32-bit node of HKLM (HKLM32) --> + <!-- By default, on 64-bit, Win64 is set to "yes" ; On 32-bit, there are no 64-bit regkeys / regvalues --> + <Component Id="VeraCryptVolume_Main_64" Guid="{C0C6A818-7D7B-483C-98B5-D2BDFF35A84D}" Win64="yes"> + + <!-- Create only if user checks "Associate .hc to VC" --> + <Condition>REGISTERVCFILEEXT</Condition> + + <!-- MSI already removes all values and subkeys that it creates : no need to set Action="createAndRemoveOnUninstall" --> + <RegistryKey Root="HKLM" Key="SOFTWARE\Classes\VeraCryptVolume" > + <RegistryValue Type="string" Value="VeraCrypt Volume" KeyPath="yes" /> + <RegistryValue Type="string" Name="AppUserModelID" Value="IDRIX.VeraCrypt" KeyPath="no" /> + </RegistryKey> + </Component> + + <Component Id="VeraCryptVolume_DefaultIcon_64" Guid="{4A30C85F-935B-4EE6-98BC-5FAE89621C54}" Win64="yes"> + + <!-- Create only if user checks "Associate .hc to VC" --> + <Condition>REGISTERVCFILEEXT</Condition> + + <!-- MSI already removes all values and subkeys that it creates : no need to set Action="createAndRemoveOnUninstall" --> + <RegistryKey Root="HKLM" Key="SOFTWARE\Classes\VeraCryptVolume\DefaultIcon" > + <RegistryValue Type="string" Value="[APPLICATIONROOTFOLDER]\VeraCrypt.exe,1" KeyPath="yes" /> + </RegistryKey> + </Component> + + <Component Id="VeraCryptVolume_Open_64" Guid="{99300DB4-5A81-44C1-B358-3CA356169BAB}" Win64="yes"> + + <!-- Create only if user checks "Associate .hc to VC" --> + <Condition>REGISTERVCFILEEXT</Condition> + + <!-- MSI already removes all values and subkeys that it creates : no need to set Action="createAndRemoveOnUninstall" --> + <RegistryKey Root="HKLM" Key="SOFTWARE\Classes\VeraCryptVolume\Shell\open\command" > + <RegistryValue Type="string" Value=""[APPLICATIONROOTFOLDER]\VeraCrypt.exe" /v "%%1"" KeyPath="yes" /> + </RegistryKey> + </Component> + + <Component Id="VeraCryptVolume_Extension_64" Guid="{89EC023F-4BB3-446E-A2A6-FD7BFC5B4962}" Win64="yes"> + + <!-- Create only if user checks "Associate .hc to VC" --> + <Condition>REGISTERVCFILEEXT</Condition> + + <!-- MSI already removes all values and subkeys that it creates : no need to set Action="createAndRemoveOnUninstall" --> + <RegistryKey Root="HKLM" Key="SOFTWARE\Classes\.hc" > + <RegistryValue Type="string" Value="VeraCryptVolume" KeyPath="yes" /> + </RegistryKey> + </Component> + + <Component Id="VeraCrypt_ProductGUID" Guid="{C8F09E5D-47CE-4FCE-BF4D-853C56AA20C6}" Win64="yes"> + + <!-- MSI already removes all values and subkeys that it creates : no need to set Action="createAndRemoveOnUninstall" --> + <RegistryKey Root="HKLM" Key="SOFTWARE\VeraCrypt_MSI" > + <RegistryValue Type="string" Name="ProductGuid" Value="$(var.ProductGuid)" KeyPath="yes" /> + </RegistryKey> + </Component> + + </DirectoryRef> + + <!-- Smallest installable units ; Regroups Components to be installed in the same unit into one Feature --> + <!-- Tell Windows Installer to install --> + + <Feature Id="Install_System" + Absent="disallow" + Level="1"> + + <!-- C:\Windows\System32\Drivers --> + <ComponentRef Id="veracryptDriverSys" /> + + </Feature> + + <Feature Id="Install_Exe" + Absent="disallow" + Level="1"> + + <!-- C:\Program Files\VeraCrypt --> + <ComponentRef Id="LICENSEFile" /> + <ComponentRef Id="LicenseTxt" /> + <ComponentRef Id="NOTICEFile" /> + <ComponentRef Id="VeraCrypt_FormatExe" /> + <ComponentRef Id="veracryptCat" /> + <ComponentRef Id="VeraCryptExe" /> + <ComponentRef Id="veracryptInf" /> + <ComponentRef Id="veracryptSys" /> + <ComponentRef Id="VeraCryptExpanderExe" /> + <ComponentRef Id="VeraCryptComRegExe" /> + + </Feature> + + <Feature Id="Install_Lang" + Absent="disallow" + Level="1"> + + <!-- C:\Program Files\VeraCrypt\Languages --> + <ComponentRef Id="cmpF27E43A4E59E04A5B095C5101B229139" /> + <ComponentRef Id="cmp4350812363930B900E24C845940DF416" /> + <ComponentRef Id="cmp1DD254125CF07901EACECC70930818B0" /> + <ComponentRef Id="cmp8C9E97CFD69D3BCB44B84D886720F3FC" /> + <ComponentRef Id="cmp2BC45D6EC406DDC470E8501442A7AF68" /> + <ComponentRef Id="cmp74A0CA1914A6C6FE33D76DE1C01C676D" /> + <ComponentRef Id="cmpC186D3472CE1EC872FF1B0CF3682B3B6" /> + <ComponentRef Id="cmp2AB0B613D25DDEF3466CBC86BD6B878B" /> + <ComponentRef Id="cmpB09224EB45E097BF511CBC5DBE3E251C" /> + <ComponentRef Id="cmpF24BBBEB613F893CBC5FBF6533CB48C9" /> + <ComponentRef Id="cmp50E1DEF37599D2900447B13FC285B7B7" /> + <ComponentRef Id="cmp46E5A0DB48A03A91267C97A664BD9BD4" /> + <ComponentRef Id="cmp95BAB91FA0B7E37D5B9343478899CC75" /> + <ComponentRef Id="cmpE73E4CCF9F6EC39998B9BE35E43768CC" /> + <ComponentRef Id="cmp28EEAA4B2230460BDDA61DEFBC71A905" /> + <ComponentRef Id="cmpCFF4CB46421F1A713D45607393ED9B90" /> + <ComponentRef Id="cmp31601B4199D0CD3977758A3F2B63CDE7" /> + <ComponentRef Id="cmp8E2E0489348A190B00532591CE0AC325" /> + <ComponentRef Id="cmpEE57E2901F12294E638E66C39F1B39BB" /> + <ComponentRef Id="cmp2F1F644C870AFF8970FE18AF2CD151C4" /> + <ComponentRef Id="cmp4B8E0B5A7B7A8BE4267C722B1434E4CF" /> + <ComponentRef Id="cmp84BB49D30BDBB4212707D14B7A9C13F1" /> + <ComponentRef Id="cmp406E3BE632055CDDE1E42F45E31318DC" /> + <ComponentRef Id="cmp4E363AF94947A27A4E9CF57C69E6DE54" /> + <ComponentRef Id="cmp562F7970AF2F9EF535AC21A84C7229D1" /> + <ComponentRef Id="cmp19EF976916B5E207A32BA08C3143A281" /> + <ComponentRef Id="cmp4C9B5090256B2E88D27C9CF7E6CFD9EF" /> + <ComponentRef Id="cmp91165C08D5943C21F132A349F8CBAAE7" /> + <ComponentRef Id="cmp4A51B27F9D8DBBABFE4581EC2B162832" /> + <ComponentRef Id="cmp041827E393D8777802256FD480D377FC" /> + <ComponentRef Id="cmp68CC2DB5FA70FC1F6CA959FB5E1B78BF" /> + <ComponentRef Id="cmpFF128AFA659D8C2E65E0BE55E0943F83" /> + <ComponentRef Id="cmp1896040764F0DF6F89280C428013ECE7" /> + <ComponentRef Id="cmpA52EAD237A44CBD337E302185BE12FB2" /> + <ComponentRef Id="cmpBBB82A6228B54372ACAF9B1310CB2025" /> + <ComponentRef Id="cmp4A275EC29DB9B5ECD56CD9C62D358750" /> + <ComponentRef Id="cmp8DF0B84F470901D8800F8CAB88A90656" /> + <ComponentRef Id="cmp529250BEE557732B5B8CBC47914A0F2A" /> + <ComponentRef Id="cmp38274F8F5E4F600A9AC5225A0472D656" /> + + </Feature> + + <Feature Id="Install_Help" + Absent="disallow" + Level="1"> + + <!-- C:\Program Files\VeraCrypt\docs --> + <ComponentRef Id="VCUserGuideChm" /> + + <!-- C:\Program Files\VeraCrypt\docs\EFI-DCS --> + <ComponentRef Id="dcs_tpm_owner_02_pdf" /> + <ComponentRef Id="disk_encryption_v1_2_pdf" /> + + <ComponentRef Id="cmp5A2505C1E4CE33EAC578A8D1C8C505D2" /> + <ComponentRef Id="cmpE985CD1A96188861286D758A12A1D0A1" /> + <ComponentRef Id="cmp310514F655B6D66F5308A5823B0AB691" /> + <ComponentRef Id="cmp0664DF8B1FE440C02B1E20D2F23C2CDF" /> + <ComponentRef Id="cmp2934E77CB835216789F88BD686160A94" /> + <ComponentRef Id="cmp688E76C9A297923D616068E33A6A4F49" /> + <ComponentRef Id="cmp2ABB10C0A5AC0F1084EDF94E0FDFFD09" /> + <ComponentRef Id="cmp32E7F4F5C0F44D00B53E3946E7E1FCF9" /> + <ComponentRef Id="cmp989B890D94671F634D04D8F945090F21" /> + <ComponentRef Id="cmp109BF0667C5A7B7036CCAAD9B29D9449" /> + <ComponentRef Id="cmp82ABD3094B751094F3A49CD338A3713D" /> + <ComponentRef Id="cmpE6A18205CB9F847CD7C4375AED2196D5" /> + <ComponentRef Id="cmpAA4D61C5E17E2A8513EC120AC9B1DB8A" /> + <ComponentRef Id="cmp39251BC13DA4AD6508E18D90D86DF06D" /> + <ComponentRef Id="cmpBABB0BD95FD763E9C72D2F51C325CF15" /> + <ComponentRef Id="cmp2FE3B3719DCC4362AFF8BF7B4CADFF80" /> + <ComponentRef Id="cmp2FC8BD312D06FEC4E244604E27117B62" /> + <ComponentRef Id="cmpAE99FB30CC29DF92E71A31EC39E61EF5" /> + <ComponentRef Id="cmp535B1A9BACA231F518973D620DC23779" /> + <ComponentRef Id="cmpD2ED5F6D8C0A4CA0D26F9F1BB34AB8BA" /> + <ComponentRef Id="cmp5F7E0D8587039E1BA0F236F228C163BD" /> + <ComponentRef Id="cmpF4DA2D3DABC768C2040A67A993C53E9E" /> + <ComponentRef Id="cmpC0AD9100DE0F43E8149F8D3271B02D17" /> + <ComponentRef Id="cmp32646E8087D106AE2B62E5DCF2419EDD" /> + <ComponentRef Id="cmpB3C777FAF214F7D304EE7CF907D7FF57" /> + <ComponentRef Id="cmp338115DF524F0B412A21AB64F59240DD" /> + <ComponentRef Id="cmp2F24E0C7B7175D60257F6D01231C8373" /> + <ComponentRef Id="cmpAE9D52ADD94D3A2711AA79FA0C91CA00" /> + <ComponentRef Id="cmp0A6270FD26128E8D1CC83E392E91A772" /> + <ComponentRef Id="cmpEDB0E152195A7EB91BBB28631B689E0B" /> + <ComponentRef Id="cmpFD76EB6B5546D1C38CC33FABA95FAA15" /> + <ComponentRef Id="cmpDC4FD19F507A5152351B9F71C8691486" /> + <ComponentRef Id="cmp9E45BE754042F9DD742A0B7B9F27E786" /> + <ComponentRef Id="cmpB6AC414023A6BDBF855F4A807DAE138C" /> + <ComponentRef Id="cmp053692809BD5B3F5682AFCC539A767A3" /> + <ComponentRef Id="cmp9049A791E9E1AB7FF01BD7F08D1CB069" /> + <ComponentRef Id="cmp4E6F9484484A40645D519F688ED9C21E" /> + <ComponentRef Id="cmp3CF724F2A2347A2A30C85CB76490F687" /> + <ComponentRef Id="cmp3858A4BB7577362DE87F4485575DFC99" /> + <ComponentRef Id="cmp90AB4CF273108F47223E3432838CDE37" /> + <ComponentRef Id="cmpB9A0461BF7CF75538111B088C986A62F" /> + <ComponentRef Id="cmpD8C7B52BC03709FAB2642B93BFE4FFE8" /> + <ComponentRef Id="cmpFD6EB163EA6B74C4F59FF04D2B3796CC" /> + <ComponentRef Id="cmp612D2E75E857D164665BE8CA37570D04" /> + <ComponentRef Id="cmpF65BF759DA7F65BAD6D74A83FEF9D205" /> + <ComponentRef Id="cmpA6A249B42C89657DE664B9D88D04DB3F" /> + <ComponentRef Id="cmpEE8A03DA56EF1B35979430E8711A6960" /> + <ComponentRef Id="cmp628E75C5DD0F38348B6F8694D5D5149C" /> + <ComponentRef Id="cmp40BDD4F3CA20DEE006E087930EF3847C" /> + <ComponentRef Id="cmp7AEEABAF151FCE92735664A55F7B8FFA" /> + <ComponentRef Id="cmp9380DDE2560B4D8EE9CC363AF4BC7B5F" /> + <ComponentRef Id="cmp84A94F04CD486338F57C03B316145945" /> + <ComponentRef Id="cmpDF544847A4B1F86B3BA3468336CD73FE" /> + <ComponentRef Id="cmp9A6A861B59A23E534C7407EF95500AA5" /> + <ComponentRef Id="cmp09C34B1CBDE9F2F4E897340B1C67728E" /> + <ComponentRef Id="cmpD3183A7373751A19B4B7C9B041F9035D" /> + <ComponentRef Id="cmp3DED9073AB120DC026C48E9CDF9283EB" /> + <ComponentRef Id="cmp0FF3027C2662D967ACB4B01BA7BC85F9" /> + <ComponentRef Id="cmp3FC9C0126A2074CAABCF73197358F824" /> + <ComponentRef Id="cmp1830E220882FBA276350032258B478AA" /> + <ComponentRef Id="cmpE5D6E9DF3EE1301C6D5A4F44362BCE96" /> + <ComponentRef Id="cmpB7B429D414CF1DD05A4B70CE94E343F7" /> + <ComponentRef Id="cmp00845B9781D5633702C834BCB4EB93D1" /> + <ComponentRef Id="cmp47F92D029E335F7865F8ACB30763FED2" /> + <ComponentRef Id="cmpF3B90B0C1F316854E9142B22783ACF19" /> + <ComponentRef Id="cmp2EC17F48BC15C5405D2DB40FC6E01745" /> + <ComponentRef Id="cmpE00F8980768E14DF59474B5CB3D84041" /> + <ComponentRef Id="cmpD17B73F5892E45458E960025558B3452" /> + <ComponentRef Id="cmpF45A8248FAFA80A8DF62989C477E7C0F" /> + <ComponentRef Id="cmpD066CBBD66E8CABB4AD4B928F823A5D2" /> + <ComponentRef Id="cmpACFE3B967BB844C3FD0FE21C9E87EE5B" /> + <ComponentRef Id="cmpFAA171DECE81EA4EA99B5570C9FF7D0E" /> + <ComponentRef Id="cmp7C1E782A2C12520E4CACF0D8FD4EAA4E" /> + <ComponentRef Id="cmpE9009D51D7CF4AA8BBA735E91F1D6044" /> + <ComponentRef Id="cmp5D46BFDD0D54DD715695756148C22028" /> + <ComponentRef Id="cmpE34BBB4D255F23D71B0143270915E6D7" /> + <ComponentRef Id="cmpEB665F1BFDB30B20C90142CCD1DA7664" /> + <ComponentRef Id="cmpFDCC994071E7ADACE3EB2CBACC60E34A" /> + <ComponentRef Id="cmp21A3A9B1C7FAA004EF937114F0F41C61" /> + <ComponentRef Id="cmpFD4A149B4654FEF0542A5ECE211A86B8" /> + <ComponentRef Id="cmpE7CDDDCDA7CD20F1150F2879E0293D1D" /> + <ComponentRef Id="cmp9CDBE7ACC2D5393535D2981C3DD73682" /> + <ComponentRef Id="cmpF09EAA16502FCF137AAD38D70D50B200" /> + <ComponentRef Id="cmp62D4B7B5DACB58D3EEA9E6D3385769A7" /> + <ComponentRef Id="cmpBF36D06FA293DFD3AFA1543C43A54E17" /> + <ComponentRef Id="cmp7345D3EE0CFEA227E8AA9ADADF95E623" /> + <ComponentRef Id="cmpE92C5D4B774B7214B49931528F7EDCF6" /> + <ComponentRef Id="cmpB6A3927A1BE4D2836C1007D3CC989C4B" /> + <ComponentRef Id="cmp28666EA10A3DCEC7D2583ADD52785FDC" /> + <ComponentRef Id="cmp08768A6308C114126260614CCDF6F72E" /> + <ComponentRef Id="cmpF00E284DEEE43B341D12987E20DB76C5" /> + <ComponentRef Id="cmpB75BD74E0F63097DC1777FF4BF440479" /> + <ComponentRef Id="cmp1745256A6ECE8FB1779B0DA82CEECAB9" /> + <ComponentRef Id="cmp3F248F4BDDB12D98D3CF173FEA01CE24" /> + <ComponentRef Id="cmp1209E63998A1D1504B062C4ECC45EE07" /> + <ComponentRef Id="cmp035C544DF9B46B9DD7871AD7898B7D36" /> + <ComponentRef Id="cmpA891AF32EF72B7AC80533FC31773B604" /> + <ComponentRef Id="cmp1FC684D1C3742A927228DE9A669A2895" /> + <ComponentRef Id="cmp265116FC4778248E01BADFB30A2C32A7" /> + <ComponentRef Id="cmpB2A3FFEE7A15E23A2835A843438E3669" /> + <ComponentRef Id="cmpFC8FB415783E0AA424FBD685EFACF54E" /> + <ComponentRef Id="cmp2BCEA21755E1C812ACCF15A09210FCCD" /> + <ComponentRef Id="cmp9EC1750F7CD9717D3A761FC2930C509D" /> + <ComponentRef Id="cmp4298A84BD6956E2A2742B5678BCFF173" /> + <ComponentRef Id="cmp2D9F7D88EF1F843BDEA5A39D13330B8A" /> + <ComponentRef Id="cmp58EAECCB29CB9ABDDDB72F9378E4EE77" /> + <ComponentRef Id="cmp61C660976A230AD4AD8B42A90D4BCC7C" /> + <ComponentRef Id="cmp29A0605ED3FB7D4E2EAC833D56411563" /> + <ComponentRef Id="cmp4A0EF1CFD1E1DE8B4E7BF698E05680E9" /> + <ComponentRef Id="cmp1E4F8137AD337BEA1B902E6B003AB953" /> + <ComponentRef Id="cmp8D35F7D61B2B7DF0EDEAE2E56031E7CB" /> + <ComponentRef Id="cmpDE2C66707086A509EABD0F9F6E8BDB1A" /> + <ComponentRef Id="cmpA80443C3767E3E51F3DE88BFD0D7A33B" /> + <ComponentRef Id="cmp214446AAABEBAC0C3827B8977083FAE2" /> + <ComponentRef Id="cmp4AF022868FE6883520C700676C43B15D" /> + <ComponentRef Id="cmpC27AA2C4496C9EFA95DCD663B031B5D0" /> + <ComponentRef Id="cmp9CBBC8311BBFC54C8DC1162BB17E5AED" /> + <ComponentRef Id="cmp033461B0777614621A2ED7B4E2B08D55" /> + <ComponentRef Id="cmp0E43CDBBAE343957423AE2907AC16883" /> + <ComponentRef Id="cmp8A8526D2061A14810E1B7A8A6E527DCD" /> + <ComponentRef Id="cmpAE2DADEF126C59D8CCD3A18D8CDC49C8" /> + <ComponentRef Id="cmp2F972A5C99F7EE708B7C232EE8647672" /> + <ComponentRef Id="cmpB21F7D781FE7B006ABCA7974A21F29E2" /> + <ComponentRef Id="cmpF345174585735CD7A31AE138DDE8B439" /> + <ComponentRef Id="cmp06772C03A0ECA40F11F1D5C5ACD607D8" /> + <ComponentRef Id="cmp79E890B8891FA87AA5B10A67E15E7E8E" /> + <ComponentRef Id="cmp89C46AE8EC4175E62A9CFE3DF9DF924A" /> + <ComponentRef Id="cmpC8F860B10D41961424874F69C6D84ED3" /> + <ComponentRef Id="cmp285021B8CBC8E92B1CBCE4C88731083C" /> + <ComponentRef Id="cmpABE9B0A93A9B14C0732EBD8CD17A11AE" /> + <ComponentRef Id="cmpD9B960879A3227B971E33222CE13BC18" /> + <ComponentRef Id="cmp3B3BB414D13FDBF2B0C7A9CEBD7D98F5" /> + <ComponentRef Id="cmpB39B1096387C2617720F515D24953B37" /> + <ComponentRef Id="cmp493A37205039E2A3A476A1A4F5360EBF" /> + <ComponentRef Id="cmpF36A771DF9B1C4CD8E82C08A6D3D0786" /> + <ComponentRef Id="cmp63F6A68C5538B45661168554BC3B93D1" /> + <ComponentRef Id="cmp0158A6D8BED6391AC7150B6C6AE2A9F9" /> + <ComponentRef Id="cmpDE45667E9E3CD9F800EAC1E02B57AAB7" /> + <ComponentRef Id="cmp632453049391BAACDD117A40EC442743" /> + <ComponentRef Id="cmpCE16E453CAD75A461B4FEBF451A51B7B" /> + <ComponentRef Id="cmpC741D187A28A87BD33866C9AC09A1298" /> + <ComponentRef Id="cmpB313B00E647A121B2CBE47F3048A18A7" /> + <ComponentRef Id="cmp400428F6494DE58618E3B92539548C39" /> + <ComponentRef Id="cmpFB2313AB16EF2467366ED136C0E61CE6" /> + <ComponentRef Id="cmp960F36632D3FB602421D1195E4EB6FE1" /> + <ComponentRef Id="cmpB4C7B1A7A3EC0CB2DE805AC5CC5FC0D7" /> + <ComponentRef Id="cmp00540BF93A805E0B9996945B61E1BC2F" /> + <ComponentRef Id="cmp4C46C6668AD830D543AFE593D51676B3" /> + <ComponentRef Id="cmp6EE914124966E3A0F695359116413DD4" /> + <ComponentRef Id="cmp28E29B4CA17AB51913B756CD9397EEFE" /> + <ComponentRef Id="cmp5DF24509F284FABC600232197F803DE5" /> + <ComponentRef Id="cmp09E31B885345FBEA1F473AF7A10FD88D" /> + <ComponentRef Id="cmpAE05C79A35A43ECCAC995A711DC4D60B" /> + <ComponentRef Id="cmpB6D91209A93313D08150643F1738DED8" /> + <ComponentRef Id="cmpDB66E821EC13977824FB1069DF5DAA69" /> + <ComponentRef Id="cmp159AB26E32632FC87229090B3AA89BF8" /> + <ComponentRef Id="cmp5BE3E12343551B853E1B143371CBEBE6" /> + <ComponentRef Id="cmp0E081D9499DA225BB788494A1D86893D" /> + <ComponentRef Id="cmpBC7134AF21BAE309E9FD1A52ADF92527" /> + <ComponentRef Id="cmpB586F01E9F9657C498F2AB64E1F51BD7" /> + <ComponentRef Id="cmp6EB049078039C276CADA69E7B79FDFA8" /> + <ComponentRef Id="cmp3135BB68A1F44DDD9FE19B7D5FB4ED7B" /> + <ComponentRef Id="cmp98ECAD990DF7B535B05EF6E840B7B2DF" /> + <ComponentRef Id="cmpFE417CCCB859A1C3E4FB90A9C4E132F0" /> + <ComponentRef Id="cmpD91C00B1B2AACF38761B45D0574884D7" /> + <ComponentRef Id="cmp590EDE3CE6E09D0D43B35287E849B75A" /> + <ComponentRef Id="cmp9D6F95F912C3B9C95E92E39BA1CE6BC9" /> + <ComponentRef Id="cmpAD429D8A050A0D31B661626BDCA9C952" /> + <ComponentRef Id="cmp3BDE199844AB81673ABB0E5E61E9B7B5" /> + <ComponentRef Id="cmp0A4AB9AEF0D351FA5E63BCD67DC00607" /> + <ComponentRef Id="cmpCC25F1CB6A1C9D8B47C407B818F73B59" /> + <ComponentRef Id="cmpE0F5E8A2D6FEF181686370F0E1EAC632" /> + <ComponentRef Id="cmp46B2E8BCD50BD668153E793EB737BC39" /> + <ComponentRef Id="cmp0305CC2824E44F697B402E56A0CD1754" /> + <ComponentRef Id="cmp0E00CBDCB82A904FD6AD82E458CA6AA7" /> + <ComponentRef Id="cmp594B5E68E63675F4986F6717BC1F5950" /> + <ComponentRef Id="cmp62748E79EC04EBE33DC46770AD65CDCE" /> + <ComponentRef Id="cmpE1265CF3CC5E0B487E99D9D5936BB3F4" /> + <ComponentRef Id="cmp1C162513D52824629D7C9FAF96054182" /> + <ComponentRef Id="cmpB5FA2A488D2C7E59E0B52D18820CE00A" /> + <ComponentRef Id="cmpBB1A4A1EB3FBBE5B2BF2752C302CDC2D" /> + <ComponentRef Id="cmp9D908DF026E6297D51B6C4A6700092F1" /> + + </Feature> + + <Feature Id="Install_Registry" + Absent="disallow" + Level="1"> + + <!-- Registry Keys and Values --> + <ComponentRef Id="VeraCryptVolume_Main_64" /> + <ComponentRef Id="VeraCryptVolume_DefaultIcon_64" /> + <ComponentRef Id="VeraCryptVolume_Open_64" /> + <ComponentRef Id="VeraCryptVolume_Extension_64" /> + <ComponentRef Id="VeraCrypt_ProductGUID" /> + + </Feature> + + <Feature Id="Install_Shortcuts" + Absent="disallow" + Level="1"> + + <!-- Shortcuts : Desktop and StartMenu --> + <ComponentRef Id="VCShortcutDesktop" /> + <ComponentRef Id="VCShortcutStartMenu" /> + <ComponentRef Id="VCExpanderShortcutStartMenu" /> + <ComponentRef Id="VCWebsiteShortcutStartMenu" /> + + </Feature> + + <!-- Tell Wix that WixUILicenseRtf was overrided by our definition of var.licenseRtf --> + <WixVariable Id="WixUILicenseRtf" Overridable="yes" Value="$(var.licenseRtf)"/> + + <!-- UI specifications --> + <UI> + + <!-- In order to have a list of Features, we need to reference WixUI_FeatureTree, which we do not do here --> + + <!-- Set the default installation directory to [APPLICATIONROOTFOLDER] --> + <Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONROOTFOLDER" /> + + <!-- Reference our custom UI which contains checkboxes for creating shortcuts --> + <UIRef Id="Custom_InstallDir" /> + + <!-- Reference 'WixUI_ErrorProgressText' to include translated errors and progress text --> + <UIRef Id="WixUI_ErrorProgressText" /> + + </UI> + + <!-- Import our Custom Action DLL into the installer's executable --> + <Binary Id="VeraCryptCustomActions" + SourceFile="$(sys.CURRENTDIR)\VeraCryptSetup.dll" /> + + <!-- The UILEVEL MSI property is simply not available when running a deferred Custom Action. + Therefore, we work around this limitation by explicitly passing it on Custom Action Data using WiX --> + + <!-- Custom actions that run after InstallFinalize or before InstallInitialize will not run elevated --> + + <!-- Create a Custom Action which checks whether the license was accepted and throws an error if not --> + <CustomAction Id="CheckLicense" + Error="!(loc.AcceptVCLicenseDesc)" /> + + <!-- Create a Custom Action which executes only in UI sequence (not in silent mode) + right after the user checks License Agreeemnt Dialog checkbox and clicks on next. + It sets 'ACCEPTLICENSE' to 'YES' as a consequence so that 'CheckLicense' CA does not + fail in UI install. + See 'Custom_InstallDir.wxs' for details. --> + <CustomAction Id="SetAcceptLicense" + Property="ACCEPTLICENSE" + Value="YES"/> + + <!-- Create a Custom Action which sets the CustomActionData property + for DoPreInstall Deferred Custom Action. + Its Property must be set to the Id of the Deferred Custom Action + DoPreInstall which is goind to catch it as a CustomActionData property. --> + <CustomAction Id="PreInst_SetData" + Property="DoPreInstall" + Value="UILEVEL=[UILevel]?INSTALLDIR=[APPLICATIONROOTFOLDER]?REINSTALL=[REINSTALL]" /> + + <!-- Create a Custom Action which sets the CustomActionData property + for DoPreUninstall Deferred Custom Action. + Its Property must be set to the Id of the Deferred Custom Action + DoPreInstall which is goind to catch it as a CustomActionData property. --> + <CustomAction Id="PreUninst_SetData" + Property="DoPreUninstall" + Value="UILEVEL=[UILevel]?INSTALLDIR=[APPLICATIONROOTFOLDER]?REINSTALL=[REINSTALL]" /> + + <!-- Create a Custom Action which sets the CustomActionData property + for DoPostInstall Deferred Custom Action. + Its Property must be set to the Id of the Deferred Custom Action + DoPostInstall which is goind to catch it as a CustomActionData property. --> + <CustomAction Id="PostInst_SetData" + Property="DoPostInstall" + Value="INSTALLDIR=[APPLICATIONROOTFOLDER]" /> + + <!-- Create a Custom Action which sets the CustomActionData property + for DoPostUninstall Deferred Custom Action. + Its Property must be set to the Id of the Deferred Custom Action + DoPostInstall which is goind to catch it as a CustomActionData property. --> + <CustomAction Id="PostUninst_SetData" + Property="DoPostUninstall" + Value="INSTALLDIR=[APPLICATIONROOTFOLDER]" /> + + <!-- Create our Pre-Install Custom Action. + We need to run it as deferred so that it runs + with admin privileges. + When it finishes, this CA creates RegKeys which + tell, for example, whether a reboot is required or not. --> + <CustomAction Id="DoPreInstall" + Execute="deferred" + Impersonate="no" + Return="check" + BinaryKey="VeraCryptCustomActions" + DllEntry="VC_CustomAction_PreInstall" /> + + <!-- Create our Post-Install Custom Action. + We need to run it as deferred so that it runs + with admin privileges. --> + <CustomAction Id="DoPostInstall" + Execute="deferred" + Impersonate="no" + Return="check" + BinaryKey="VeraCryptCustomActions" + DllEntry="VC_CustomAction_PostInstall" /> + + <!-- Create our Pre-Uninstall Custom Action. + We need to run it as deferred so that it runs + with admin privileges. + When it finishes, this CA creates RegKeys which + tell, for example, whether a reboot is required or not. --> + <CustomAction Id="DoPreUninstall" + Execute="deferred" + Impersonate="no" + Return="check" + BinaryKey="VeraCryptCustomActions" + DllEntry="VC_CustomAction_PreUninstall" /> + + <!-- Create our Post-Uninstall Custom Action. + We need to run it as deferred so that it runs + with admin privileges. + When it finishes, this CA creates RegKeys which + tell, for example, whether a reboot is required or not. --> + <CustomAction Id="DoPostUninstall" + Execute="deferred" + Impersonate="no" + Return="check" + BinaryKey="VeraCryptCustomActions" + DllEntry="VC_CustomAction_PostUninstall" /> + + <!-- Create our Custom Action which does all kinds of checks + (including reboot check). + Note that we MUST NOT create ISREBOOTREQUIRED as a Property + in Wix, we only set it with MsiSetProperty in CA. + Note that using properties (with all uppercase names, + otherwise Windows Installer will not treat them as public properties) + is the only way to pass arguments to and from the custom action. --> + <CustomAction Id="DoChecks" + Return="check" + BinaryKey="VeraCryptCustomActions" + DllEntry="VC_CustomAction_DoChecks" /> + + <!-- SetARPINSTALLLOCATION sets the property (Programs and Features) which specifies the install location in the registry entries of the Add & Remove Panel --> + <CustomAction Id="SetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[APPLICATIONROOTFOLDER]" /> + + <!-- Cancel install if one of VC's apps is running --> + <util:CloseApplication Id="CheckVCFormatRunning" + Target="VeraCrypt Format.exe" + Property="VCISRUNNING" + RebootPrompt="no" /> + <util:CloseApplication Id="CheckVCRunning" + Target="VeraCrypt.exe" + Property="VCISRUNNING" + RebootPrompt="no" /> + <util:CloseApplication Id="CheckVCExpanderRunning" + Target="VeraCryptExpander.exe" + Property="VCISRUNNING" + RebootPrompt="no" /> + <util:CloseApplication Id="CheckVCFormat86Running" + Target="VeraCrypt Format-x86.exe" + Property="VCISRUNNING" + RebootPrompt="no" /> + <util:CloseApplication Id="CheckVC86Running" + Target="VeraCrypt-x86.exe" + Property="VCISRUNNING" + RebootPrompt="no" /> + <util:CloseApplication Id="CheckVCExpander86Running" + Target="VeraCryptExpander-x86.exe" + Property="VCISRUNNING" + RebootPrompt="no" /> + <util:CloseApplication Id="CheckVCFormat64Running" + Target="VeraCrypt Format-x64.exe" + Property="VCISRUNNING" + RebootPrompt="no" /> + <util:CloseApplication Id="CheckVC64Running" + Target="VeraCrypt-x64.exe" + Property="VCISRUNNING" + RebootPrompt="no" /> + <util:CloseApplication Id="CheckVCExpander64Running" + Target="VeraCryptExpander-x64.exe" + Property="VCISRUNNING" + RebootPrompt="no" /> + <util:CloseApplication Id="CheckVCSetupRunning" + Target="VeraCrypt Setup.exe" + Property="VCISRUNNING" + RebootPrompt="no" /> + <util:CloseApplication Id="CheckVCCOMRegRunning" + Target="VeraCrypt COMReg.exe" + Property="VCISRUNNING" + RebootPrompt="no" /> + + <InstallUISequence> + + <!-- Try to close all VC apps before launching installer, fail in case VC running, only at repair / upgrade / uninstall --> + <Custom Action="WixCloseApplications" Before="LaunchConditions">REINSTALL OR UPGRADINGPRODUCTCODE OR REMOVE~="ALL"</Custom> + + </InstallUISequence> + + <InstallExecuteSequence> + + <!-- Execute CheckLicense (show license error) before LaunchConditions only if license not accepted at first install --> + <Custom Action="CheckLicense" Before="LaunchConditions"><![CDATA[ ACCEPTLICENSE ~<> "YES" AND NOT Installed ]]></Custom> + + <!-- Try to close all VC apps before launching installer, fail in case VC running, only at repair / upgrade / uninstall --> + <Custom Action="WixCloseApplications" Before="LaunchConditions">REINSTALL OR UPGRADINGPRODUCTCODE OR REMOVE~="ALL"</Custom> + + <!-- INSTALLATION / REPAIR / UPGRADE ONLY CAs --> + + <!-- Execute PreInst_SetData before InstallFiles action of first installation ONLY OR repair ONLY + and before DoPreInstall to set the DoPreInstall's Custom Action Data. + Since we schedule RemoveExistingProducts after InstallExecute, if we execute this CA at UPGRADINGPRODUCTCODE, + it will execute it twice : once when it installs new files (NOT Installed), and then when it removes unnecessary files (actual upgrade: UPGRADINGPRODUCTCODE). + Therefore, we do not need to execute it at UPGRADINGPRODUCTCODE. --> + <Custom Action="PreInst_SetData" Before="DoPreInstall">(NOT Installed AND NOT REMOVE) OR REINSTALL</Custom> + + <!-- Execute DoPreInstall before InstallFiles action of first installation ONLY OR repair ONLY. + Since we schedule RemoveExistingProducts after InstallExecute, if we execute this CA at UPGRADINGPRODUCTCODE, + it will execute it twice : once when it installs new files (NOT Installed), and then when it removes unnecessary files (actual upgrade: UPGRADINGPRODUCTCODE). + Therefore, we do not need to execute it at UPGRADINGPRODUCTCODE. --> + <Custom Action="DoPreInstall" Before="InstallFiles">(NOT Installed AND NOT REMOVE) OR REINSTALL</Custom> + + <!-- Execute PostInst_SetData after InstallFiles action of first installation ONLY OR repair ONLY + and before DoPostInstall to set the DoPostInstall's Custom Action Data. + Since we schedule RemoveExistingProducts after InstallExecute, if we execute this CA at UPGRADINGPRODUCTCODE, + it will execute it twice : once when it installs new files (NOT Installed), and then when it removes unnecessary files (actual upgrade: UPGRADINGPRODUCTCODE). + Therefore, we do not need to execute it at UPGRADINGPRODUCTCODE. --> + <Custom Action="PostInst_SetData" Before="DoPostInstall">(NOT Installed AND NOT REMOVE) OR REINSTALL</Custom> + + <!-- Execute DoPostInstall after InstallFiles action of first installation ONLY OR repair ONLY. + Since we schedule RemoveExistingProducts after InstallExecute, if we execute this CA at UPGRADINGPRODUCTCODE, + it will execute it twice : once when it installs new files (NOT Installed), and then when it removes unnecessary files (actual upgrade: UPGRADINGPRODUCTCODE). + Therefore, we do not need to execute it at UPGRADINGPRODUCTCODE. --> + <Custom Action="DoPostInstall" After="InstallFiles">(NOT Installed AND NOT REMOVE) OR REINSTALL</Custom> + + <!-- UNINSTALLATION ONLY CAs --> + + <!-- Execute PreUninst_SetData before RemoveFiles action when uninstalling ONLY + and before DoPreUninstall to set the DoPreUninstall's Custom Action Data --> + <Custom Action="PreUninst_SetData" Before="DoPreUninstall">REMOVE~="ALL" AND NOT UPGRADINGPRODUCTCODE</Custom> + + <!-- Execute DoPreUninstall before RemoveFiles when uninstalling ONLY --> + <Custom Action="DoPreUninstall" Before="RemoveFiles">REMOVE~="ALL" AND NOT UPGRADINGPRODUCTCODE</Custom> + + <!-- Execute PostUninst_SetData after RemoveFiles action when uninstalling ONLY + and before DoPostUninstall to set the DoPostUninstall's Custom Action Data --> + <Custom Action="PostUninst_SetData" Before="DoPostUninstall">REMOVE~="ALL" AND NOT UPGRADINGPRODUCTCODE</Custom> + + <!-- Execute DoPostUninstall after RemoveFiles action when uninstalling ONLY --> + <Custom Action="DoPostUninstall" After="RemoveFiles">REMOVE~="ALL" AND NOT UPGRADINGPRODUCTCODE</Custom> + + <!-- Execute DoChecks after InstallFinalize action of first installation or repair or uninstall. + Since we schedule RemoveExistingProducts after InstallExecute, if we execute this CA at UPGRADINGPRODUCTCODE, + it will execute it twice : once when it installs new files (NOT Installed), and then when it removes unnecessary files (actual upgrade: UPGRADINGPRODUCTCODE). + Since the first time it executes, it will delete the RegKeys, the second time it executes will fail, and with + it the whole upgrade. + Therefore, we do not need to execute it at UPGRADINGPRODUCTCODE. --> + <Custom Action="DoChecks" After="InstallFinalize">(NOT Installed AND NOT REMOVE) OR REINSTALL OR (REMOVE~="ALL" AND NOT UPGRADINGPRODUCTCODE)</Custom> + + <!-- Set the ARP --> + <Custom Action="SetARPINSTALLLOCATION" After="InstallValidate"></Custom> + + <!-- ScheduleReboot only after DoChecks, which sets ISREBOOTREQUIRED --> + <ScheduleReboot After="DoChecks">ISREBOOTREQUIRED = "1"</ScheduleReboot> + + </InstallExecuteSequence> + + </Product> + +</Wix>
\ No newline at end of file diff --git a/src/Release/Setup Files/Strings-en.wxl b/src/Release/Setup Files/Strings-en.wxl new file mode 100644 index 00000000..48946057 --- /dev/null +++ b/src/Release/Setup Files/Strings-en.wxl @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<WixLocalization Culture="en-us" Codepage="1252" xmlns="http://schemas.microsoft.com/wix/2006/localization"> + <String Id="Lang" Overridable="yes">1033</String> + <String Id="NoDowngrade" Overridable="yes">A newer version is already installed</String> + <String Id="MinOs" Overridable="yes">This 32-bit installer can only run on at least Windows Vista</String> + <String Id="OSBitness" Overridable="yes">This is a 32-bit installer that cannot be run under 64-bit Windows</String> + <String Id="OS64Bitness" Overridable="yes">This is a 64-bit installer that cannot be run under 32-bit Windows</String> + + <String Id="CustomInstallDirDlgDescription" Overridable="yes">Choose which options to enable then click Next to proceed.</String> + + <String Id="InstallForAllUsersDesc" Overridable="yes">Install for all users</String> + <String Id="CreateDesktopShortcutDesc" Overridable="yes">Add VeraCrypt icon to desktop</String> + <String Id="CreateStartMenuShortcutDesc" Overridable="yes">Add VeraCrypt to Start Menu</String> + <String Id="AssociateVCFileExtensionDesc" Overridable="yes">Associate the .hc file extension with VeraCrypt</String> + + <String Id="CloseVCFirstDesc" Overridable="yes">Please close all open VeraCrypt windows first.</String> + + <String Id="AcceptVCLicenseDesc" Overridable="yes">Please accept the license agreement by passing ACCEPTLICENSE=YES during installation.</String> + + <String Id="VeraCryptDesc" Overridable="yes">VeraCrypt</String> + <String Id="VeraCryptExpanderDesc" Overridable="yes">VeraCrypt Expander</String> + <String Id="VeraCryptWebsiteDesc" Overridable="yes">VeraCrypt Website</String> + +</WixLocalization>
\ No newline at end of file diff --git a/src/Release/Setup Files/build_msi_x64.bat b/src/Release/Setup Files/build_msi_x64.bat new file mode 100644 index 00000000..476625b0 --- /dev/null +++ b/src/Release/Setup Files/build_msi_x64.bat @@ -0,0 +1,178 @@ +::------------------------------------ +::Define search paths here for Wix ToolSet and SDK (and SignTool optionnally) +::------------------------------------ + +@set SEARCH_WIX_PATH=C:\Program Files (x86)\WiX Toolset v3.11\bin + +@set SEARCH_VC_DIR_PLATFORMSDK_1=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86 +@set SEARCH_VC_DIR_PLATFORMSDK_2=C:\Program Files (x86)\Windows Kits\10\bin\x86 +@set SEARCH_VC_DIR_PLATFORMSDK_3=C:\Program Files\Microsoft Platform SDK\bin +@set SEARCH_VC_DIR_PLATFORMSDK_4=C:\Program Files (x86)\Windows Kits\8.1\bin\x86 +@set SEARCH_VC_DIR_PLATFORMSDK_5=C:\Program Files (x86)\Windows Kits\8.0\bin\x86 +@set SEARCH_VC_DIR_PLATFORMSDK_6=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\bin + +::end of search paths + +set MSI_BUILDPATH=%~dp0 +cd %MSI_BUILDPATH% + +::------------------------------------ +:: Look for msitran.exe and msidb.exe +::------------------------------------ + +@echo [INFO] Define default value for VC_DIR_PLATFORMSDK if not defined yet +@echo [INFO] Input VC_DIR_PLATFORMSDK=%VC_DIR_PLATFORMSDK% +@set FILE_TO_FIND="msitran.exe" "msidb.exe" +@echo [INFO] Looking for files: %FILE_TO_FIND% + +@set FILE_NOT_FOUND= +@for %%i in (%FILE_TO_FIND%) do @if not exist "%VC_DIR_PLATFORMSDK%\%%~i" set FILE_NOT_FOUND=%%~i +@if "%FILE_NOT_FOUND%"=="" goto found_mssdk +@echo Not found in "%VC_DIR_PLATFORMSDK%" + +@set VC_DIR_PLATFORMSDK=%SEARCH_VC_DIR_PLATFORMSDK_1% +@set FILE_NOT_FOUND= +@for %%i in (%FILE_TO_FIND%) do @if not exist "%VC_DIR_PLATFORMSDK%\%%~i" set FILE_NOT_FOUND=%%~i +@if "%FILE_NOT_FOUND%"=="" goto found_mssdk +@echo Not found in "%VC_DIR_PLATFORMSDK%" + +@set VC_DIR_PLATFORMSDK=%SEARCH_VC_DIR_PLATFORMSDK_2% +@set FILE_NOT_FOUND= +@for %%i in (%FILE_TO_FIND%) do @if not exist "%VC_DIR_PLATFORMSDK%\%%~i" set FILE_NOT_FOUND=%%~i +@if "%FILE_NOT_FOUND%"=="" goto found_mssdk +@echo Not found in "%VC_DIR_PLATFORMSDK%" + +@set VC_DIR_PLATFORMSDK=%SEARCH_VC_DIR_PLATFORMSDK_3% +@set FILE_NOT_FOUND= +@for %%i in (%FILE_TO_FIND%) do @if not exist "%VC_DIR_PLATFORMSDK%\%%~i" set FILE_NOT_FOUND=%%~i +@if "%FILE_NOT_FOUND%"=="" goto found_mssdk +@echo Not found in "%VC_DIR_PLATFORMSDK%" + +@rem paths for Windows 8 SDK are slightly different +@set FILE_TO_FIND="msitran.exe" "msidb.exe" + +@set VC_DIR_PLATFORMSDK=%SEARCH_VC_DIR_PLATFORMSDK_4% +@set FILE_NOT_FOUND= +@for %%i in (%FILE_TO_FIND%) do @if not exist "%VC_DIR_PLATFORMSDK%\%%~i" set FILE_NOT_FOUND=%%~i +@if "%FILE_NOT_FOUND%"=="" goto found_mssdk +@echo Not found in "%VC_DIR_PLATFORMSDK%" + +@set VC_DIR_PLATFORMSDK=%SEARCH_VC_DIR_PLATFORMSDK_5% +@set FILE_NOT_FOUND= +@for %%i in (%FILE_TO_FIND%) do @if not exist "%VC_DIR_PLATFORMSDK%\%%~i" set FILE_NOT_FOUND=%%~i +@if "%FILE_NOT_FOUND%"=="" goto found_mssdk +@echo Not found in "%VC_DIR_PLATFORMSDK%" + +@set VC_DIR_PLATFORMSDK=%SEARCH_VC_DIR_PLATFORMSDK_6% +@set FILE_NOT_FOUND= +@for %%i in (%FILE_TO_FIND%) do @if not exist "%VC_DIR_PLATFORMSDK%\%%~i" set FILE_NOT_FOUND=%%~i +@if "%FILE_NOT_FOUND%"=="" goto found_mssdk +@echo Not found in "%VC_DIR_PLATFORMSDK%" + +@echo [ERROR] MS Platform SDK 2008, Windows SDK v7.1, or Windows SDK 8.0/8.1/10 could not be found +@echo If the path is not any of the above, +@echo please define VC_DIR_PLATFORMSDK environment variable. +@exit /B 1 + +:found_mssdk +@echo Found in "%VC_DIR_PLATFORMSDK%" + +::------------------------------------ +:: Look for candle.exe (and light.exe obviously) +::------------------------------------ + +@echo [INFO] Check if WiX is installed +@echo [INFO] Default value for VC_DIR_WIX is set to %WIX% +@set VC_DIR_WIX=%WIX% +@set FILE_TO_FIND="candle.exe" +@echo [INFO] Looking for files: %FILE_TO_FIND% + +@set FILE_NOT_FOUND= +@for %%i in (%FILE_TO_FIND%) do @if not exist "%VC_DIR_WIX%\%%~i" set FILE_NOT_FOUND=%%~i +@if "%FILE_NOT_FOUND%"=="" goto found_wix +@echo Not found in "%VC_DIR_WIX%" + +@set VC_DIR_WIX=%SEARCH_WIX_PATH% +@set FILE_NOT_FOUND= +@for %%i in (%FILE_TO_FIND%) do @if not exist "%VC_DIR_WIX%\%%~i" set FILE_NOT_FOUND=%%~i +@if "%FILE_NOT_FOUND%"=="" goto found_wix +@echo Not found in "%VC_DIR_WIX%" + +@echo [ERROR] WiX could not be found +@echo Please install Wix3 +@exit /B 1 + +:found_wix +@echo Found in "%VC_DIR_WIX%" + +::------------------------------------ +:: Create a MSI installer for each language +:: We make use of -sice:ICE09 to silence ICE09 warnings generated because we install non-permanent elements to 'SystemFolder' +::------------------------------------ +@echo [INFO] Creating msi 64-bit installers + +@echo [INFO] Making the en-us version in %cd%\out\64\en-us\ +"%VC_DIR_WIX%\candle.exe" -dLang=en -arch x64 -ext WixUIExtension -ext WiXUtilExtension Product64.wxs -out out\64\en-us\Product.wixobj +@if NOT "%ERRORLEVEL%" == "0" goto msi_failed +"%VC_DIR_WIX%\candle.exe" -dLang=en -arch x64 -ext WixUIExtension -ext WiXUtilExtension Custom_InstallDir.wxs -out out\64\en-us\Custom_InstallDir.wixobj +@if NOT "%ERRORLEVEL%" == "0" goto msi_failed +"%VC_DIR_WIX%\candle.exe" -dLang=en -arch x64 -ext WixUIExtension -ext WiXUtilExtension Custom_InstallDirDlg.wxs -out out\64\en-us\Custom_InstallDirDlg.wixobj +@if NOT "%ERRORLEVEL%" == "0" goto msi_failed +"%VC_DIR_WIX%\Light.exe" -ext WixUIExtension -ext WiXUtilExtension -cultures:en-us -loc Strings-en.wxl out\64\en-us\Product.wixobj out\64\en-us\Custom_InstallDirDlg.wixobj out\64\en-us\Custom_InstallDir.wixobj -out out\64\en-us\VeraCrypt_%1_Setup_en-us.msi -pdbout out\64\en-us\VeraCrypt_%1_Setup_en-us.wixpdb -sice:ICE09 +@if NOT "%ERRORLEVEL%" == "0" goto msi_failed + +::------------------------------------ +:: Join the language specific MSIs together +::------------------------------------ +@echo [INFO] Joining msi 64-bit installers into 1 64-bit installer + +@set OUT_PATH=%cd%\out\64\ +@echo [INFO] OUT_PATH=%OUT_PATH% + +@set MSI_FILE_IN=VeraCrypt_%1_Setup +@set MSI_FILE_OUT=VeraCrypt_%1_Setup_x64 + +:: Check if all the MSI files were built +@set LANG=en-us +@IF NOT EXIST "%OUT_PATH%\%LANG%\%MSI_FILE_IN%_%LANG%.msi" goto NOT_%LANG% + +:: Take all the MSI files and process +@set LANG=en-us +@copy /Y "%OUT_PATH%\%LANG%\%MSI_FILE_IN%_%LANG%.msi" "%OUT_PATH%\%MSI_FILE_OUT%.msi" + +::------------------------------------ +:: Add all available LCIDs +::------------------------------------ +"%VC_DIR_PLATFORMSDK%\MsiInfo.Exe" "%OUT_PATH%\%MSI_FILE_OUT%.msi" /p x64;1033 +@if NOT "%ERRORLEVEL%" == "0" goto comb_msi_failed + +::------------------------------------ +:: Copy to bin and remove out +::------------------------------------ +mkdir bin +@copy /Y "%OUT_PATH%\%MSI_FILE_OUT%.msi" "%cd%\bin\%MSI_FILE_OUT%.msi" +@set LANG=en-us +@copy /Y "%OUT_PATH%\%LANG%\%MSI_FILE_IN%_%LANG%.msi" "%cd%\bin\%MSI_FILE_IN%_x64_%LANG%.msi" +@rmdir /S /Q "%cd%\out" + +goto END + +:msi_failed +@echo [ERR ] failed to create the MSI +@exit /B 1 + +:comb_msi_failed +@echo [ERR ] failed to combine the language specific MSI's +@exit /B 1 + +:NOT_en-us +@echo [ERR ] Missing file '%OUT_PATH%\%LANG%\%MSI_FILE_IN%_%LANG%.msi' +@exit /B 1 + +:NOT_lv-lv +@echo [ERR ] Missing file '%OUT_PATH%\%LANG%\%MSI_FILE_IN%_%LANG%.msi' +@exit /B 1 + +@echo [INFO] Done creating multi-lang msi installers +:END +@echo end
\ No newline at end of file diff --git a/src/Setup/Setup.vcxproj b/src/Setup/Setup.vcxproj index 922d3018..30c7e167 100644 --- a/src/Setup/Setup.vcxproj +++ b/src/Setup/Setup.vcxproj @@ -104,6 +104,7 @@ <PostBuildEvent> <Command>md "..\Debug\Setup Files" 2>NUL: copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL: +copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt COMReg.exe" >NUL: </Command> </PostBuildEvent> </ItemDefinitionGroup> @@ -142,7 +143,7 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL <AdditionalManifestFiles>Setup.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PostBuildEvent> - <Command>copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt Setup.exe"</Command> + <Command>copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt Setup.exe" && copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt COMReg.exe"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'"> diff --git a/src/SetupDLL/ComSetup.cpp b/src/SetupDLL/ComSetup.cpp new file mode 100644 index 00000000..07c3360a --- /dev/null +++ b/src/SetupDLL/ComSetup.cpp @@ -0,0 +1,114 @@ +/* + Derived from source code of TrueCrypt 7.1a, which is + Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed + by the TrueCrypt License 3.0. + + Modifications and additions to the original source code (contained in this file) + and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and are governed by the Apache License 2.0 the full text of which is + contained in the file License.txt included in VeraCrypt binary and source + code distribution packages. +*/ + +#define TC_MAIN_COM_VERSION_MAJOR 2 +#define TC_MAIN_COM_VERSION_MINOR 11 + +#define TC_FORMAT_COM_VERSION_MAJOR 2 +#define TC_FORMAT_COM_VERSION_MINOR 9 + +#include <atlbase.h> +#include <comdef.h> +#include <statreg.h> +#include <windows.h> +#include "ComSetup.h" +#include "Dlgcode.h" +#include "Resource.h" +#include "../Mount/MainCom_i.c" +#include "../Format/FormatCom_i.c" + +/* + * Same as RegisterComServers() in Setup project, but + * instead of using GetModuleFileNameW() to get this + * DLL's path as setupModule which will not work because + * the DLL is embedded in the binary of the MSI, + * we ship the empty version of 'VeraCrypt Setup.exe' + * as 'VeraCrypt COMReg.exe' and use it. + */ +extern "C" BOOL RegisterComServers (wchar_t *modulePath) +{ + BOOL ret = TRUE; + wchar_t mainModule[1024], formatModule[1024], setupModule[1024]; + CComPtr<ITypeLib> tl, tl2; + + wsprintfW (mainModule, L"%sVeraCrypt.exe", modulePath); + wsprintfW (formatModule, L"%sVeraCrypt Format.exe", modulePath); + wsprintfW (setupModule, L"%sVeraCrypt COMReg.exe", modulePath); + + UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR, 0, SYS_WIN32); + UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR, 0, SYS_WIN32); + // unregister older versions that may still exist + for (WORD i = 7; i >= 1; i--) + UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-i, 0, SYS_WIN32); + for (WORD i = 5; i >= 1; i--) + UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR-i, 0, SYS_WIN32); + + CRegObject ro; + HRESULT r; + + if (!SUCCEEDED (r = ro.FinalConstruct ()) + || !SUCCEEDED (r = ro.AddReplacement (L"MAIN_MODULE", mainModule)) + || !SUCCEEDED (r = ro.AddReplacement (L"FORMAT_MODULE", formatModule)) + || !SUCCEEDED (r = ro.ResourceRegister (setupModule, IDR_COMREG, L"REGISTRY")) + || !SUCCEEDED (r = LoadTypeLib (mainModule, &tl)) + || !SUCCEEDED (r = RegisterTypeLib (tl, mainModule, 0)) + || !SUCCEEDED (r = LoadTypeLib (formatModule, &tl2)) + || !SUCCEEDED (r = RegisterTypeLib (tl2, formatModule, 0))) + { + MessageBox (MainDlg, _com_error (r).ErrorMessage(), _T(TC_APP_NAME), MB_ICONERROR); + ret = FALSE; + } + + ro.FinalRelease (); + return ret; +} + +/* + * Same as UnregisterComServers() in Setup project, but + * instead of using GetModuleFileNameW() to get this + * DLL's path as setupModule which will not work because + * the DLL is embedded in the binary of the MSI, + * we ship the empty version of 'VeraCrypt Setup.exe' + * as 'VeraCrypt COMReg.exe' and use it. + */ +extern "C" BOOL UnregisterComServers (wchar_t *modulePath) +{ + BOOL ret; + + if (UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR, 0, SYS_WIN32) != S_OK) + return FALSE; + if (UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR, 0, SYS_WIN32) != S_OK) + return FALSE; + + // unregister older versions that may still exist + for (WORD i = 7; i >= 1; i--) + UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-i, 0, SYS_WIN32); + for (WORD i = 5; i >= 1; i--) + UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR-i, 0, SYS_WIN32); + + wchar_t module[1024]; + HRESULT r; + CRegObject ro; + ro.FinalConstruct (); + + wsprintfW (module, L"%sVeraCrypt.exe", modulePath); + ro.AddReplacement (L"MAIN_MODULE", module); + + wsprintfW (module, L"%sVeraCrypt Format.exe", modulePath); + ro.AddReplacement (L"FORMAT_MODULE", module); + + wsprintfW (module, L"%sVeraCrypt COMReg.exe", modulePath); + ret = SUCCEEDED(r = ro.ResourceUnregister (module, IDR_COMREG, L"REGISTRY")); + + ro.FinalRelease (); + return ret; +} diff --git a/src/SetupDLL/ComSetup.h b/src/SetupDLL/ComSetup.h new file mode 100644 index 00000000..85d0f249 --- /dev/null +++ b/src/SetupDLL/ComSetup.h @@ -0,0 +1,22 @@ +/* + Derived from source code of TrueCrypt 7.1a, which is + Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed + by the TrueCrypt License 3.0. + + Modifications and additions to the original source code (contained in this file) + and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and are governed by the Apache License 2.0 the full text of which is + contained in the file License.txt included in VeraCrypt binary and source + code distribution packages. +*/ + +#ifdef __cplusplus +extern "C" { +#endif + +BOOL RegisterComServers (wchar_t *modulePath); +BOOL UnregisterComServers (wchar_t *modulePath); + +#ifdef __cplusplus +} +#endif diff --git a/src/SetupDLL/ComSetup.rgs b/src/SetupDLL/ComSetup.rgs new file mode 100644 index 00000000..b8201c10 --- /dev/null +++ b/src/SetupDLL/ComSetup.rgs @@ -0,0 +1,92 @@ +HKCR +{ + ForceRemove VeraCrypt.1 = s 'VeraCrypt class' + { + CLSID = s '{FE8B3B95-C80C-41f7-830F-FBA271C26F7E}' + } + + ForceRemove VeraCrypt = s 'VeraCrypt class' + { + CLSID = s '{FE8B3B95-C80C-41f7-830F-FBA271C26F7E}' + CurVer = s 'VeraCrypt.1' + } + + NoRemove CLSID + { + ForceRemove {FE8B3B95-C80C-41f7-830F-FBA271C26F7E} = s 'VeraCrypt class' + { + ProgID = s 'VeraCrypt.1' + VersionIndependentProgID = s 'VeraCrypt' + LocalServer32 = s '"%MAIN_MODULE%"' + + TypeLib = s '{9ACF6176-5FC4-4690-A025-B3306A50EB6A}' + + Elevation + { + val Enabled = d 1 + val IconReference = s '@%MAIN_MODULE%,-501' + } + + val AppId = s '{FE8B3B95-C80C-41f7-830F-FBA271C26F7E}' + val LocalizedString = s '@%MAIN_MODULE%,-110' + } + } + + NoRemove AppId + { + ForceRemove {FE8B3B95-C80C-41f7-830F-FBA271C26F7E} = s 'VeraCrypt class' + { + val AccessPermission = b 010004803000000040000000000000001400000002001c000100000000001400070000000101000000000005040000000102000000000005200000002002000001020000000000052000000020020000 + } + + ForceRemove VeraCrypt.exe + { + val AppId = s '{FE8B3B95-C80C-41f7-830F-FBA271C26F7E}' + } + } + + ForceRemove VeraCryptFormat.1 = s 'VeraCryptFormat class' + { + CLSID = s '{A96D3797-9F31-49f4-A0CE-9657392CF789}' + } + + ForceRemove VeraCryptFormat = s 'VeraCryptFormat class' + { + CLSID = s '{A96D3797-9F31-49f4-A0CE-9657392CF789}' + CurVer = s 'VeraCryptFormat.1' + } + + NoRemove CLSID + { + ForceRemove {A96D3797-9F31-49f4-A0CE-9657392CF789} = s 'VeraCryptFormat class' + { + ProgID = s 'VeraCryptFormat.1' + VersionIndependentProgID = s 'VeraCryptFormat' + LocalServer32 = s '"%FORMAT_MODULE%"' + + TypeLib = s '{56327DDA-F1A7-4e13-B128-520D129BDEF6}' + + Elevation + { + val Enabled = d 1 + val IconReference = s '@%FORMAT_MODULE%,-501' + } + + val AppId = s '{A96D3797-9F31-49f4-A0CE-9657392CF789}' + val LocalizedString = s '@%FORMAT_MODULE%,-112' + } + } + + NoRemove AppId + { + ForceRemove {A96D3797-9F31-49f4-A0CE-9657392CF789} = s 'VeraCryptFormat class' + { + val AccessPermission = b 010004803000000040000000000000001400000002001c000100000000001400070000000101000000000005040000000102000000000005200000002002000001020000000000052000000020020000 + } + + ForceRemove 'VeraCrypt Format.exe' + { + val AppId = s '{A96D3797-9F31-49f4-A0CE-9657392CF789}' + } + } +}
\ No newline at end of file diff --git a/src/SetupDLL/Dir.c b/src/SetupDLL/Dir.c new file mode 100644 index 00000000..2d4feecd --- /dev/null +++ b/src/SetupDLL/Dir.c @@ -0,0 +1,110 @@ +/* + Legal Notice: Some portions of the source code contained in this file were + derived from the source code of TrueCrypt 7.1a, which is + Copyright (c) 2003-2012 TrueCrypt Developers Association and which is + governed by the TrueCrypt License 3.0, also from the source code of + Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux + and which is governed by the 'License Agreement for Encryption for the Masses' + Modifications and additions to the original source code (contained in this file) + and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and are governed by the Apache License 2.0 the full text of which is + contained in the file License.txt included in VeraCrypt binary and source + code distribution packages. */ + +#include "Tcdefs.h" + +#include <sys/types.h> +#include <sys/stat.h> +#include <direct.h> +#include <string.h> +#include <stdlib.h> +#include <errno.h> +#include <Strsafe.h> + +#include "Dir.h" + +/* create full directory tree. returns 0 for success, -1 if failure */ +int +mkfulldir (wchar_t *oriPath, BOOL bCheckonly) +{ + struct _stat st; + wchar_t *uniq_file; + wchar_t path [TC_MAX_PATH]; + + StringCbCopyW (path, TC_MAX_PATH, oriPath); + + if (wcslen (path) == 3 && path[1] == L':') + goto is_root; /* keep final slash in root if present */ + + /* strip final forward or backslash if we have one! */ + uniq_file = wcsrchr (path, L'\\'); + if (uniq_file && uniq_file[1] == L'\0') + uniq_file[0] = L'\0'; + else + { + uniq_file = wcsrchr (path, L'/'); + if (uniq_file && uniq_file[1] == L'\0') + uniq_file[0] = L'\0'; + } + + is_root: + if (bCheckonly) + return _wstat (path, &st); + + if (_wstat (path, &st)) + return mkfulldir_internal (path); + else + return 0; +} + + +int +mkfulldir_internal (wchar_t *path) +{ + wchar_t *token; + struct _stat st; + static wchar_t tokpath[_MAX_PATH]; + static wchar_t trail[_MAX_PATH]; + + StringCbCopyW (tokpath, _MAX_PATH, path); + trail[0] = L'\0'; + + token = wcstok (tokpath, L"\\/"); + + if (tokpath[0] == L'\\' && tokpath[1] == L'\\') + { /* unc */ + trail[0] = tokpath[0]; + trail[1] = tokpath[1]; + trail[2] = L'\0'; + if (token) + { + StringCbCatW (trail, _MAX_PATH, token); + StringCbCatW (trail, _MAX_PATH, L"\\"); + token = wcstok (NULL, L"\\/"); + if (token) + { /* get share name */ + StringCbCatW (trail, _MAX_PATH, token); + StringCbCatW (trail, _MAX_PATH, L"\\"); + } + token = wcstok (NULL, L"\\/"); + } + } + + if (tokpath[1] == L':') + { /* drive letter */ + StringCbCatW (trail, _MAX_PATH, tokpath); + StringCbCatW (trail, _MAX_PATH, L"\\"); + token = wcstok (NULL, L"\\/"); + } + + while (token != NULL) + { + int x; + StringCbCatW (trail, _MAX_PATH, token); + x = _wmkdir (trail); + StringCbCatW (trail, _MAX_PATH, L"\\"); + token = wcstok (NULL, L"\\/"); + } + + return _wstat (path, &st); +} diff --git a/src/SetupDLL/Dir.h b/src/SetupDLL/Dir.h new file mode 100644 index 00000000..fb9dfc6b --- /dev/null +++ b/src/SetupDLL/Dir.h @@ -0,0 +1,23 @@ +/* + Legal Notice: Some portions of the source code contained in this file were + derived from the source code of TrueCrypt 7.1a, which is + Copyright (c) 2003-2012 TrueCrypt Developers Association and which is + governed by the TrueCrypt License 3.0, also from the source code of + Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux + and which is governed by the 'License Agreement for Encryption for the Masses' + Modifications and additions to the original source code (contained in this file) + and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and are governed by the Apache License 2.0 the full text of which is + contained in the file License.txt included in VeraCrypt binary and source + code distribution packages. */ + +#ifdef __cplusplus +extern "C" { +#endif + +int mkfulldir ( wchar_t *path , BOOL bCheckonly ); +int mkfulldir_internal ( wchar_t *path ); + +#ifdef __cplusplus +} +#endif diff --git a/src/SetupDLL/Portable.manifest b/src/SetupDLL/Portable.manifest new file mode 100644 index 00000000..5d4cb896 --- /dev/null +++ b/src/SetupDLL/Portable.manifest @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> + <security> + <requestedPrivileges> + <requestedExecutionLevel level="asInvoker" uiAccess="false"/> + </requestedPrivileges> + </security> + </trustInfo> + <asmv3:application> + <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> + <dpiAware>true</dpiAware> + </asmv3:windowsSettings> + </asmv3:application> + <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> + <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> + </application> + </compatibility> + <dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="*" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> + </dependency> +</assembly>
\ No newline at end of file diff --git a/src/SetupDLL/Portable.rc b/src/SetupDLL/Portable.rc new file mode 100644 index 00000000..6ffc03c7 --- /dev/null +++ b/src/SetupDLL/Portable.rc @@ -0,0 +1,291 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" +#include "..\\common\\resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,24,25,0 + PRODUCTVERSION 1,24,25,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "IDRIX" + VALUE "FileDescription", "VeraCrypt Portable" + VALUE "FileVersion", "1.24-Update9" + VALUE "LegalTrademarks", "VeraCrypt" + VALUE "OriginalFilename", "VeraCrypt Portable.exe" + VALUE "ProductName", "VeraCrypt" + VALUE "ProductVersion", "1.24-Update9" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// HEADER +// + +IDR_SETUP_RSRC_HEADER HEADER "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// +///////////////////////////////////////////////////////////////////////////// +// +// LANGUAGES +// + +IDR_LANG_AR LANGUAGES "..\\..\\Translations\\Language.ar.xml" +IDR_LANG_CS LANGUAGES "..\\..\\Translations\\Language.cs.xml" +IDR_LANG_DE LANGUAGES "..\\..\\Translations\\Language.de.xml" +IDR_LANG_ES LANGUAGES "..\\..\\Translations\\Language.es.xml" +IDR_LANG_FR LANGUAGES "..\\..\\Translations\\Language.fr.xml" +IDR_LANG_IT LANGUAGES "..\\..\\Translations\\Language.it.xml" +IDR_LANG_JA LANGUAGES "..\\..\\Translations\\Language.ja.xml" +IDR_LANG_NL LANGUAGES "..\\..\\Translations\\Language.nl.xml" +IDR_LANG_PL LANGUAGES "..\\..\\Translations\\Language.pl.xml" +IDR_LANG_RO LANGUAGES "..\\..\\Translations\\Language.ro.xml" +IDR_LANG_RU LANGUAGES "..\\..\\Translations\\Language.ru.xml" +IDR_LANG_VI LANGUAGES "..\\..\\Translations\\Language.vi.xml" +IDR_LANG_ZHCN LANGUAGES "..\\..\\Translations\\Language.zh-cn.xml" +IDR_LANG_ZHHK LANGUAGES "..\\..\\Translations\\Language.zh-hk.xml" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_INFO_PAGE_DLG DIALOGEX 0, 0, 217, 156 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "",IDC_BOX_HELP,0,10,217,146 +END + +IDD_INTRO_PAGE_DLG DIALOGEX 0, 0, 346, 152 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL "",IDC_LICENSE_TEXT,"RichEdit20W",WS_BORDER | WS_VSCROLL | WS_TABSTOP | 0x2804,0,23,345,108 + CONTROL "",IDC_AGREE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,2,137,126,10 + LTEXT "",IDC_BOX_HELP,0,0,346,22 +END + +IDD_INSTL_DLG DIALOGEX 0, 0, 374, 231 +STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "VeraCrypt Portable Wizard" +CLASS "VeraCryptCustomDlg" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + PUSHBUTTON "&Help",IDHELP,150,211,50,14 + PUSHBUTTON "",IDC_PREV,209,211,50,14 + DEFPUSHBUTTON "",IDC_NEXT,259,211,50,14 + PUSHBUTTON "Cancel",IDCANCEL,317,211,50,14 + LTEXT "",IDC_BOX_TITLE,11,5,324,12,0,WS_EX_TRANSPARENT + CONTROL 107,IDC_BITMAP_SETUP_WIZARD,"Static",SS_BITMAP | SS_NOTIFY,139,3,228,30 + CONTROL 109,IDC_SETUP_WIZARD_BKG,"Static",SS_BITMAP,0,0,11,10 + CONTROL "",IDC_SETUP_WIZARD_GFX_AREA,"Static",SS_GRAYRECT | NOT WS_VISIBLE,0,0,378,36,WS_EX_TRANSPARENT | WS_EX_STATICEDGE + CONTROL "",IDC_HR_BOTTOM,"Static",SS_ETCHEDHORZ,67,204,306,1,WS_EX_STATICEDGE + CONTROL "",IDC_HR,"Static",SS_ETCHEDHORZ,0,35,399,1,WS_EX_STATICEDGE + LTEXT "VeraCrypt Portable",IDC_STATIC,4,200,62,8,WS_DISABLED + LTEXT "",IDC_BOX_INFO,18,18,317,13,0,WS_EX_TRANSPARENT + LTEXT "",IDC_MAIN_CONTENT_CANVAS,0,36,374,164 + LTEXT "",IDC_POS_BOX,14,42,346,155,0,WS_EX_TRANSPARENT +END + +IDD_EXTRACTION_OPTIONS_PAGE_DLG DIALOGEX 0, 0, 346, 152 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + PUSHBUTTON "Bro&wse...",IDC_BROWSE,277,32,62,14 + EDITTEXT IDC_DESTINATION,6,33,264,12,ES_AUTOHSCROLL + LTEXT "Please select or type the location where you want to place the extracted files:",IDT_EXTRACT_DESTINATION,6,15,333,17 + CONTROL "&Open the destination location when finished",IDC_OPEN_CONTAINING_FOLDER, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,91,318,16 + LTEXT "",IDC_BOX_HELP,6,56,333,32 +END + +IDD_PROGRESS_PAGE_DLG DIALOGEX 0, 0, 346, 152 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LISTBOX IDC_LOG_WINDOW,0,1,345,131,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL + CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,0,139,345,12 +END + +IDD_DONATIONS_PAGE_DLG DIALOGEX 0, 0, 346, 152 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +EXSTYLE WS_EX_TRANSPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + PUSHBUTTON "Donate now...",IDC_DONATE,124,94,96,14 +END + +IDD_INSTALL_LANGUAGE DIALOGEX 0, 0, 213, 87 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "VeraCrypt Setup Wizard" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,102,66,50,14 + PUSHBUTTON "Cancel",IDCANCEL,156,66,50,14 + ICON 501,IDC_STATIC,10,10,32,32 + LTEXT "Select the language to use during the installation:",IDC_SELECT_LANGUAGE_LABEL,42,13,157,26 + COMBOBOX IDC_LANGUAGES_LIST,42,44,164,155,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP +END + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_SETUP ICON "Setup.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "#include ""..\\\\common\\\\resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""..\\\\common\\\\common.rc""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_INFO_PAGE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 210 + TOPMARGIN, 7 + BOTTOMMARGIN, 149 + END + + IDD_INTRO_PAGE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 339 + TOPMARGIN, 7 + BOTTOMMARGIN, 145 + END + + IDD_INSTL_DLG, DIALOG + BEGIN + END + + IDD_EXTRACTION_OPTIONS_PAGE_DLG, DIALOG + BEGIN + RIGHTMARGIN, 343 + BOTTOMMARGIN, 147 + END + + IDD_PROGRESS_PAGE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 339 + TOPMARGIN, 7 + BOTTOMMARGIN, 145 + END + + IDD_DONATIONS_PAGE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 339 + TOPMARGIN, 7 + BOTTOMMARGIN, 147 + END + + IDD_INSTALL_LANGUAGE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 206 + TOPMARGIN, 7 + BOTTOMMARGIN, 80 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_SETUP_WIZARD BITMAP "VeraCrypt_setup.bmp" +IDB_SETUP_WIZARD_BKG BITMAP "VeraCrypt_setup_background.bmp" +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "..\\common\\common.rc" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/src/SetupDLL/Portable.vcxproj b/src/SetupDLL/Portable.vcxproj new file mode 100644 index 00000000..e864515b --- /dev/null +++ b/src/SetupDLL/Portable.vcxproj @@ -0,0 +1,281 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="ReleaseCustomEFI|Win32"> + <Configuration>ReleaseCustomEFI</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{60698D56-DB83-4D19-9C87-9DFB6A6F8C87}</ProjectGuid> + <RootNamespace>Portable</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">PortableDebug\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">PortableDebug\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">PortableRelease\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">PortableRelease\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">PortableRelease\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">PortableRelease\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptPortable</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptPortable</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptPortable</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>SETUP;PORTABLE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalOptions>/NODEFAULTLIB:LIBCMTD %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>libcmtd.lib;atlsd.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile> + <UACExecutionLevel>AsInvoker</UACExecutionLevel> + <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)Portable.pdb</ProgramDatabaseFile> + <SubSystem>Windows</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention>true</DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <Manifest> + <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>md "..\Debug\Setup Files" 2>NUL: +copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portable.exe" >NUL: +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>SETUP;PORTABLE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <PrecompiledHeader> + </PrecompiledHeader> + <AssemblerOutput>All</AssemblerOutput> + <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile> + <UACExecutionLevel>AsInvoker</UACExecutionLevel> + <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <GenerateMapFile>true</GenerateMapFile> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>true</RandomizedBaseAddress> + <DataExecutionPrevention>true</DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <Manifest> + <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy PortableRelease\VeraCryptPortable.exe "..\Release\Setup Files\VeraCrypt Portable.exe"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'"> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>SETUP;PORTABLE;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <PrecompiledHeader> + </PrecompiledHeader> + <AssemblerOutput>All</AssemblerOutput> + <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile> + <UACExecutionLevel>AsInvoker</UACExecutionLevel> + <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <GenerateMapFile>true</GenerateMapFile> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>true</RandomizedBaseAddress> + <DataExecutionPrevention>true</DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <Manifest> + <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy PortableRelease\VeraCryptPortable.exe "..\Release\Setup Files\VeraCrypt Portable.exe"</Command> + </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="Dir.c" /> + <ClCompile Include="SelfExtract.c" /> + <ClCompile Include="Setup.c"> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + </ClCompile> + <ClCompile Include="Wizard.c"> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + </ClCompile> + <ClCompile Include="..\Common\Xml.c" /> + <ClCompile Include="..\Common\BootEncryption.cpp" /> + <ClCompile Include="..\Common\Crc.c" /> + <ClCompile Include="..\Common\Dictionary.c"> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + </ClCompile> + <ClCompile Include="..\Common\Dlgcode.c"> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + </ClCompile> + <ClCompile Include="..\Common\Endian.c" /> + <ClCompile Include="..\Common\Language.c" /> + <ClCompile Include="..\Common\Registry.c" /> + </ItemGroup> + <ItemGroup> + <None Include="Setup.ico" /> + <None Include="..\Common\VeraCrypt.ico" /> + <None Include="VeraCrypt_setup.bmp" /> + <None Include="VeraCrypt_setup_background.bmp" /> + <None Include="..\Common\VeraCrypt_Volume.ico" /> + <None Include="..\Common\Language.xml" /> + <None Include="..\Resources\Texts\License.rtf" /> + <None Include="..\Common\Textual_logo_288dpi.bmp" /> + <None Include="..\Common\Textual_logo_96dpi.bmp" /> + <None Include="..\Common\Textual_logo_background.bmp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\Common\Apidrvr.h" /> + <ClInclude Include="..\Common\Combo.h" /> + <ClInclude Include="ComSetup.h" /> + <ClInclude Include="..\Common\Crc.h" /> + <ClInclude Include="Dir.h" /> + <ClInclude Include="..\Common\Dlgcode.h" /> + <ClInclude Include="..\Common\Exception.h" /> + <ClInclude Include="..\Common\Inflate.h" /> + <ClInclude Include="..\Common\Language.h" /> + <ClInclude Include="..\Common\Registry.h" /> + <ClInclude Include="..\Common\Resource.h" /> + <ClInclude Include="Resource.h" /> + <ClInclude Include="SelfExtract.h" /> + <ClInclude Include="Setup.h" /> + <ClInclude Include="..\Common\Tcdefs.h" /> + <ClInclude Include="Wizard.h" /> + </ItemGroup> + <ItemGroup> + <Manifest Include="Portable.manifest" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="..\Common\Common.rc"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> + </ResourceCompile> + <ResourceCompile Include="Portable.rc" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Boot\Windows\Boot.vcxproj"> + <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\ExpandVolume\ExpandVolume.vcxproj"> + <Project>{9715ff1d-599b-4bbc-ad96-bef6e08ff827}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\Format\Format.vcxproj"> + <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\Mount\Mount.vcxproj"> + <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/SetupDLL/Portable.vcxproj.filters b/src/SetupDLL/Portable.vcxproj.filters new file mode 100644 index 00000000..855ecc00 --- /dev/null +++ b/src/SetupDLL/Portable.vcxproj.filters @@ -0,0 +1,154 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Source Files\Common"> + <UniqueIdentifier>{876C2050-1694-4F32-AF5D-491C6A43A799}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions> + </Filter> + <Filter Include="Resource Files\Common"> + <UniqueIdentifier>{17370B4B-2D76-41A9-9828-015FB30054F6}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="Dir.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="SelfExtract.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Setup.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Wizard.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Common\Xml.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Common\BootEncryption.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Crc.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Dictionary.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Dlgcode.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Language.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Registry.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Endian.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <None Include="Setup.ico"> + <Filter>Resource Files</Filter> + </None> + <None Include="..\Common\VeraCrypt.ico"> + <Filter>Resource Files</Filter> + </None> + <None Include="VeraCrypt_setup.bmp"> + <Filter>Resource Files</Filter> + </None> + <None Include="VeraCrypt_setup_background.bmp"> + <Filter>Resource Files</Filter> + </None> + <None Include="..\Common\VeraCrypt_Volume.ico"> + <Filter>Resource Files</Filter> + </None> + <None Include="..\Common\Language.xml"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Resources\Texts\License.rtf"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Common\Textual_logo_288dpi.bmp"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Common\Textual_logo_96dpi.bmp"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Common\Textual_logo_background.bmp"> + <Filter>Resource Files\Common</Filter> + </None> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\Common\Apidrvr.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Combo.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ComSetup.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Crc.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Dir.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Dlgcode.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Exception.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Inflate.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Language.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Registry.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="SelfExtract.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Setup.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Tcdefs.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Wizard.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <Manifest Include="Portable.manifest" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="..\Common\Common.rc"> + <Filter>Resource Files\Common</Filter> + </ResourceCompile> + <ResourceCompile Include="Portable.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/SetupDLL/Portable.vcxproj.user b/src/SetupDLL/Portable.vcxproj.user new file mode 100644 index 00000000..ace9a86a --- /dev/null +++ b/src/SetupDLL/Portable.vcxproj.user @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +</Project>
\ No newline at end of file diff --git a/src/SetupDLL/Resource.h b/src/SetupDLL/Resource.h new file mode 100644 index 00000000..8882d67b --- /dev/null +++ b/src/SetupDLL/Resource.h @@ -0,0 +1,81 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Setup.rc +// +#define IDR_COMREG 10 +#define IDR_LANG_AR 20 +#define IDR_LANG_CS 21 +#define IDR_LANG_DE 22 +#define IDR_LANG_ES 23 +#define IDR_LANG_FR 24 +#define IDR_LANG_IT 25 +#define IDR_LANG_JA 26 +#define IDR_LANG_NL 27 +#define IDR_LANG_PL 28 +#define IDR_LANG_RO 29 +#define IDR_LANG_RU 30 +#define IDR_LANG_VI 31 +#define IDR_LANG_ZHCN 32 +#define IDR_LANG_ZHHK 33 +#define IDD_INSTALL 101 +#define IDD_INSTALL_OPTIONS_PAGE_DLG 102 +#define IDD_UNINSTALL 103 +#define IDI_SETUP 104 +#define IDR_SETUP_RSRC_HEADER 105 +#define IDD_EXTRACTION_OPTIONS_PAGE_DLG 106 +#define IDB_SETUP_WIZARD 107 +#define IDD_INTRO_PAGE_DLG 108 +#define IDB_SETUP_WIZARD_BKG 109 +#define IDD_INFO_PAGE_DLG 110 +#define IDD_INSTL_DLG 111 +#define IDD_WIZARD_MODE_PAGE_DLG 112 +#define IDD_PROGRESS_PAGE_DLG 113 +#define IDD_DONATIONS_PAGE_DLG 114 +#define IDD_INSTALL_LANGUAGE 115 +#define IDC_DESTINATION 1000 +#define IDC_BOX_TITLE 1001 +#define IDC_BROWSE 1002 +#define IDC_BOX_INFO 1003 +#define IDC_LICENSE 1004 +#define IDC_BOX_HELP 1005 +#define IDC_LICENSE_TEXT 1006 +#define IDC_BOX_HELP2 1007 +#define IDC_FILE_TYPE 1008 +#define IDT_UNINSTALL_DIR 1009 +#define IDC_PROG_GROUP 1010 +#define IDC_SYSTEM_RESTORE 1011 +#define IDC_DESKTOP_ICON 1012 +#define IDC_ALL_USERS 1013 +#define IDT_INSTALL_DESTINATION 1014 +#define IDC_UNINSTALL 1015 +#define IDC_PROGRESS_BAR 1016 +#define IDC_LOG_WINDOW 1017 +#define IDC_SETUP_WIZARD_BKG 1018 +#define IDC_SETUP_WIZARD_GFX_AREA 1019 +#define IDC_HR 1020 +#define IDC_OPEN_CONTAINING_FOLDER 1021 +#define IDC_AGREE 1022 +#define IDC_HR_BOTTOM 1023 +#define IDC_WIZARD_MODE_INSTALL 1024 +#define IDC_WIZARD_MODE_EXTRACT_ONLY 1025 +#define IDC_NEXT 1026 +#define IDC_PREV 1027 +#define IDT_EXTRACT_DESTINATION 1028 +#define IDC_POS_BOX 1029 +#define IDC_BITMAP_SETUP_WIZARD 1030 +#define IDC_MAIN_CONTENT_CANVAS 1031 +#define IDC_DONATE 1032 +#define IDC_LANGUAGES_LIST 1033 +#define IDC_SELECT_LANGUAGE_LABEL 1034 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NO_MFC 1 +#define _APS_NEXT_RESOURCE_VALUE 116 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1035 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/src/SetupDLL/Setup.c b/src/SetupDLL/Setup.c new file mode 100644 index 00000000..14bdefd4 --- /dev/null +++ b/src/SetupDLL/Setup.c @@ -0,0 +1,3620 @@ +/* + Legal Notice: Some portions of the source code contained in this file were + derived from the source code of TrueCrypt 7.1a, which is + Copyright (c) 2003-2012 TrueCrypt Developers Association and which is + governed by the TrueCrypt License 3.0, also from the source code of + Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux + and which is governed by the 'License Agreement for Encryption for the Masses' + Modifications and additions to the original source code (contained in this file) + and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and are governed by the Apache License 2.0 the full text of which is + contained in the file License.txt included in VeraCrypt binary and source + code distribution packages. */ + +#include "Tcdefs.h" +#include <SrRestorePtApi.h> +#include <io.h> +#include <propkey.h> +#include <propvarutil.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <tchar.h> +#include <Setupapi.h> + +#include "Apidrvr.h" +#include "BootEncryption.h" +#include "Boot/Windows/BootCommon.h" +#include "Combo.h" +#include "ComSetup.h" +#include "Dlgcode.h" +#include "Language.h" +#include "Registry.h" +#include "Resource.h" + +#include "Dir.h" +#include "Setup.h" + +#include "../Common/Resource.h" + +#pragma comment(lib, "Shlwapi.lib") + +using namespace VeraCrypt; + +#pragma warning( disable : 4201 ) +#pragma warning( disable : 4115 ) + +#include <shlobj.h> + +#pragma warning( default : 4201 ) +#pragma warning( default : 4115 ) + +#include <Strsafe.h> + +#include <Msi.h> +#include <MsiQuery.h> +#include <wtsapi32.h> + +#include <cstdarg> +#if !defined(va_copy) +#define va_copy(d, s) ((d) = (s)) +#endif + +typedef enum +{ + MSI_INFO_LEVEL = 0, + MSI_WARNING_LEVEL, + MSI_ERROR_LEVEL +} eMSILogLevel; + +#define WAIT_PERIOD 3 + +extern HMODULE hRichEditDll; +extern HMODULE hComctl32Dll; +extern HMODULE hSetupDll; +extern HMODULE hShlwapiDll; +extern HMODULE hProfApiDll; +extern HMODULE hUsp10Dll; +extern HMODULE hCryptSpDll; +extern HMODULE hUXThemeDll; +extern HMODULE hUserenvDll; +extern HMODULE hRsaenhDll; +extern HMODULE himm32dll; +extern HMODULE hMSCTFdll; +extern HMODULE hfltlibdll; +extern HMODULE hframedyndll; +extern HMODULE hpsapidll; +extern HMODULE hsecur32dll; +extern HMODULE hnetapi32dll; +extern HMODULE hauthzdll; +extern HMODULE hxmllitedll; +extern HMODULE hmprdll; +extern HMODULE hsppdll; +extern HMODULE vssapidll; +extern HMODULE hvsstracedll; +extern HMODULE hcfgmgr32dll; +extern HMODULE hdevobjdll; +extern HMODULE hpowrprofdll; +extern HMODULE hsspiclidll; +extern HMODULE hcryptbasedll; +extern HMODULE hdwmapidll; +extern HMODULE hmsasn1dll; +extern HMODULE hcrypt32dll; +extern HMODULE hbcryptdll; +extern HMODULE hbcryptprimitivesdll; +extern HMODULE hMsls31; +extern HMODULE hntmartadll; +extern HMODULE hwinscarddll; +extern HMODULE hmsvcrtdll; +extern HMODULE hWinTrustLib; +extern HMODULE hAdvapi32Dll; + +#define FREE_DLL(h) if (h) { FreeLibrary (h); h = NULL;} + +#ifndef BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE +#define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE 0x00000001 +#endif + +#ifndef BASE_SEARCH_PATH_PERMANENT +#define BASE_SEARCH_PATH_PERMANENT 0x00008000 +#endif + +#ifndef LOAD_LIBRARY_SEARCH_SYSTEM32 +#define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800 +#endif + +typedef BOOL (WINAPI *SetDllDirectoryPtr)(LPCWSTR lpPathName); +typedef BOOL (WINAPI *SetSearchPathModePtr)(DWORD Flags); +typedef BOOL (WINAPI *SetDefaultDllDirectoriesPtr)(DWORD DirectoryFlags); + +typedef void (WINAPI *InitCommonControlsPtr)(void); +typedef HIMAGELIST (WINAPI *ImageList_CreatePtr)(int cx, int cy, UINT flags, int cInitial, int cGrow); +typedef int (WINAPI *ImageList_AddPtr)(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask); + +typedef VOID (WINAPI *SetupCloseInfFilePtr)(HINF InfHandle); +typedef HKEY (WINAPI *SetupDiOpenClassRegKeyPtr)(CONST GUID *ClassGuid,REGSAM samDesired); +typedef BOOL (WINAPI *SetupInstallFromInfSectionWPtr)(HWND,HINF,PCWSTR,UINT,HKEY,PCWSTR,UINT,PSP_FILE_CALLBACK_W,PVOID,HDEVINFO,PSP_DEVINFO_DATA); +typedef HINF (WINAPI *SetupOpenInfFileWPtr)(PCWSTR FileName,PCWSTR InfClass,DWORD InfStyle,PUINT ErrorLine); + +typedef LSTATUS (STDAPICALLTYPE *SHDeleteKeyWPtr)(HKEY hkey, LPCWSTR pszSubKey); + +typedef HRESULT (STDAPICALLTYPE *SHStrDupWPtr)(LPCWSTR psz, LPWSTR *ppwsz); + +// ChangeWindowMessageFilter +typedef BOOL (WINAPI *ChangeWindowMessageFilterPtr) (UINT, DWORD); + +typedef BOOL (WINAPI *CreateProcessWithTokenWFn)( + __in HANDLE hToken, + __in DWORD dwLogonFlags, + __in_opt LPCWSTR lpApplicationName, + __inout_opt LPWSTR lpCommandLine, + __in DWORD dwCreationFlags, + __in_opt LPVOID lpEnvironment, + __in_opt LPCWSTR lpCurrentDirectory, + __in LPSTARTUPINFOW lpStartupInfo, + __out LPPROCESS_INFORMATION lpProcessInformation + ); + +extern SetDllDirectoryPtr SetDllDirectoryFn; +extern SetSearchPathModePtr SetSearchPathModeFn; +extern SetDefaultDllDirectoriesPtr SetDefaultDllDirectoriesFn; + +extern ImageList_CreatePtr ImageList_CreateFn; +extern ImageList_AddPtr ImageList_AddFn; + +extern SetupCloseInfFilePtr SetupCloseInfFileFn; +extern SetupDiOpenClassRegKeyPtr SetupDiOpenClassRegKeyFn; +extern SetupInstallFromInfSectionWPtr SetupInstallFromInfSectionWFn; +extern SetupOpenInfFileWPtr SetupOpenInfFileWFn; +extern SHDeleteKeyWPtr SHDeleteKeyWFn; +extern SHStrDupWPtr SHStrDupWFn; +extern ChangeWindowMessageFilterPtr ChangeWindowMessageFilterFn; +extern CreateProcessWithTokenWFn CreateProcessWithTokenWPtr; + +wchar_t InstallationPath[TC_MAX_PATH]; + +BOOL bUninstall = FALSE; +BOOL bDowngrade = FALSE; +BOOL bUninstallInProgress = FALSE; +BOOL PortableMode = FALSE; +BOOL UnloadDriver = TRUE; + +BOOL Rollback = FALSE; +BOOL bReinstallMode = FALSE; +BOOL bUpgrade = FALSE; +BOOL bPossiblyFirstTimeInstall = FALSE; +BOOL bDevm = FALSE; +BOOL SystemEncryptionUpdate = FALSE; +BOOL bRestartRequired = FALSE; +BOOL bDisableSwapFiles = FALSE; +BOOL bSystemRestore = TRUE; +HMODULE volatile SystemRestoreDll = 0; + +BOOL bPromptFastStartup = FALSE; +BOOL bPromptReleaseNotes = FALSE; +BOOL bPromptTutorial = FALSE; +BOOL bUpdateRescueDisk = FALSE; +BOOL bRepairMode = FALSE; +BOOL bUserSetLanguage = FALSE; + +/* +BOOL bMakePackage = FALSE; +BOOL bDone = FALSE; + +BOOL bForAllUsers = TRUE; +BOOL bRegisterFileExt = TRUE; +BOOL bAddToStartMenu = TRUE; +BOOL bDesktopIcon = TRUE; +BOOL bDesktopIconStatusDetermined = FALSE; + +*/ + +/* **************************************************************************** */ + +/* Defined in this file, but a little bit late */ +BOOL IsSystemRestoreEnabled (); + +/* + * Same as in Setup.c + */ +BOOL ForceCopyFile (LPCWSTR szSrcFile, LPCWSTR szDestFile) +{ + BOOL bRet = CopyFileW (szSrcFile, szDestFile, FALSE); + if (!bRet) + { + wstring renamedPath = szDestFile; + renamedPath += VC_FILENAME_RENAMED_SUFFIX; + + /* rename the locked file in order to be able to create a new one */ + if (MoveFileExW (szDestFile, renamedPath.c_str(), MOVEFILE_REPLACE_EXISTING)) + { + bRet = CopyFileW (szSrcFile, szDestFile, FALSE); + if (bRet) + { + /* delete the renamed file when the machine reboots */ + MoveFileEx (renamedPath.c_str(), NULL, MOVEFILE_DELAY_UNTIL_REBOOT); + } + else + { + /* restore the original file name */ + MoveFileEx (renamedPath.c_str(), szDestFile, MOVEFILE_REPLACE_EXISTING); + } + } + } + + return bRet; +} + +/* + * Same as in Setup.c + */ +BOOL ForceDeleteFile (LPCWSTR szFileName) +{ + if (!DeleteFile (szFileName)) + { + /* delete the renamed file when the machine reboots */ + return MoveFileEx (szFileName, NULL, MOVEFILE_DELAY_UNTIL_REBOOT); + } + else + return TRUE; +} + +/* + * Same as in Setup.c + */ +BOOL StatDeleteFile (wchar_t *lpszFile, BOOL bCheckForOldFile) +{ + struct __stat64 st; + + if (bCheckForOldFile) + { + wchar_t szOldPath[MAX_PATH + 1]; + StringCbCopyW (szOldPath, sizeof(szOldPath), lpszFile); + StringCbCatW (szOldPath, sizeof(szOldPath), VC_FILENAME_RENAMED_SUFFIX); + + if (_wstat64 (szOldPath, &st) == 0) + { + ForceDeleteFile (szOldPath); + } + } + + if (_wstat64 (lpszFile, &st) == 0) + return ForceDeleteFile (lpszFile); + else + return TRUE; +} + +/* + * Same as in Setup.c + */ +BOOL StatRemoveDirectory (wchar_t *lpszDir) +{ + struct __stat64 st; + + if (_wstat64 (lpszDir, &st) == 0) + { + return DeleteDirectory (lpszDir); + } + else + return TRUE; +} + +/* + * Same as in Setup.c + */ +void StatusMessage (HWND hwndDlg, char *stringId) +{ + if (Rollback) + return; + + SendMessageW (GetDlgItem (hwndDlg, IDC_LOG_WINDOW), LB_ADDSTRING, 0, (LPARAM) GetString (stringId)); + + SendDlgItemMessage (hwndDlg, IDC_LOG_WINDOW, LB_SETTOPINDEX, + SendDlgItemMessage (hwndDlg, IDC_LOG_WINDOW, LB_GETCOUNT, 0, 0) - 1, 0); +} + +/* + * Same as in Setup.c + */ +void DetermineUpgradeDowngradeStatus (BOOL bCloseDriverHandle, LONG *driverVersionPtr) +{ + LONG driverVersion = VERSION_NUM; + int status = 0; + + if (hDriver == INVALID_HANDLE_VALUE) + status = DriverAttach(); + + if ((status == 0) && (hDriver != INVALID_HANDLE_VALUE)) + { + DWORD dwResult; + BOOL bResult = DeviceIoControl (hDriver, TC_IOCTL_GET_DRIVER_VERSION, NULL, 0, &driverVersion, sizeof (driverVersion), &dwResult, NULL); + + if (!bResult) + bResult = DeviceIoControl (hDriver, TC_IOCTL_LEGACY_GET_DRIVER_VERSION, NULL, 0, &driverVersion, sizeof (driverVersion), &dwResult, NULL); + + + bUpgrade = (bResult && driverVersion <= VERSION_NUM); + bDowngrade = (bResult && driverVersion > VERSION_NUM); + bReinstallMode = (bResult && driverVersion == VERSION_NUM); + + PortableMode = DeviceIoControl (hDriver, TC_IOCTL_GET_PORTABLE_MODE_STATUS, NULL, 0, NULL, 0, &dwResult, NULL); + + if (bCloseDriverHandle) + { + CloseHandle (hDriver); + hDriver = INVALID_HANDLE_VALUE; + } + } + + *driverVersionPtr = driverVersion; +} + +/* + * Same as in Setup.c + */ +BOOL IsSystemRestoreEnabled () +{ + BOOL bEnabled = FALSE; + HKEY hKey; + DWORD dwValue = 0, cbValue = sizeof (DWORD); + wchar_t szRegPath[MAX_PATH]; + GetRestorePointRegKeyName (szRegPath, sizeof (szRegPath)); + if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, szRegPath, 0, KEY_READ | KEY_WOW64_64KEY, &hKey) == ERROR_SUCCESS) + { + if (IsOSAtLeast (WIN_VISTA)) + { + if ( (ERROR_SUCCESS == RegQueryValueEx (hKey, L"RPSessionInterval", NULL, NULL, (LPBYTE) &dwValue, &cbValue)) + && (dwValue == 1) + ) + { + bEnabled = TRUE; + } + } + else + { + if ( (ERROR_SUCCESS == RegQueryValueEx (hKey, L"DisableSR", NULL, NULL, (LPBYTE) &dwValue, &cbValue)) + && (dwValue == 0) + ) + { + bEnabled = TRUE; + } + } + + + RegCloseKey (hKey); + } + + return bEnabled; +} + +/* + * Same as in Setup.c + */ +static void RecursiveSetOwner (HKEY hKey, PSECURITY_DESCRIPTOR pSD) +{ + LSTATUS status = 0; + DWORD dwIndex = 0, dwMaxNameLen = 0, dwNameLen = 0, numberSubKeys = 0; + HKEY hSubKey; + + if ( (ERROR_SUCCESS == status) && (ERROR_SUCCESS == RegQueryInfoKey(hKey, NULL, NULL, NULL, &numberSubKeys, &dwMaxNameLen, NULL, NULL, NULL, NULL, NULL, NULL)) + && (numberSubKeys >= 1) + ) + { + dwMaxNameLen++; + wchar_t* szNameValue = new wchar_t[dwMaxNameLen]; + while (true) + { + dwNameLen = dwMaxNameLen; + status = RegEnumKeyExW (hKey, dwIndex++, szNameValue, &dwNameLen, NULL, NULL, NULL, NULL); + if (status == ERROR_SUCCESS) + { + status = RegOpenKeyExW (hKey, szNameValue, 0, WRITE_OWNER | KEY_READ , &hSubKey); + if (ERROR_SUCCESS == status) + { + RecursiveSetOwner (hSubKey, pSD); + RegCloseKey(hSubKey); + } + } + else + break; + } + delete [] szNameValue; + } + + RegSetKeySecurity (hKey, OWNER_SECURITY_INFORMATION, pSD); +} + +/* + * Same as in Setup.c + */ +static void RecursiveSetDACL (HKEY hKey, const wchar_t* SubKeyName, PSECURITY_DESCRIPTOR pSD) +{ + HKEY hSubKey; + DWORD dwIndex = 0, dwMaxNameLen = 0, dwNameLen = 0, numberSubKeys = 0; + LSTATUS status = RegOpenKeyExW(hKey, SubKeyName, 0, WRITE_DAC | KEY_READ /*| ACCESS_SYSTEM_SECURITY*/, &hSubKey); + if (status == ERROR_SUCCESS) + { + status = RegSetKeySecurity (hSubKey, DACL_SECURITY_INFORMATION, pSD); + if (status == ERROR_SUCCESS) + { + RegCloseKey(hSubKey); + status = RegOpenKeyExW(hKey, SubKeyName, 0, WRITE_DAC | KEY_READ , &hSubKey); + } + + if ( (ERROR_SUCCESS == status) + && (ERROR_SUCCESS == RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, &numberSubKeys, &dwMaxNameLen, NULL, NULL, NULL, NULL, NULL, NULL)) + && (numberSubKeys >= 1) + ) + { + dwMaxNameLen++; + wchar_t* szNameValue = new wchar_t[dwMaxNameLen]; + while (true) + { + dwNameLen = dwMaxNameLen; + status = RegEnumKeyExW (hSubKey, dwIndex++, szNameValue, &dwNameLen, NULL, NULL, NULL, NULL); + if (status == ERROR_SUCCESS) + { + RecursiveSetDACL (hSubKey, szNameValue, pSD); + } + else + break; + } + delete [] szNameValue; + } + } +} + +/* + * Same as in Setup.c + */ +static void AllowKeyAccess(HKEY Key,const wchar_t* SubKeyName) +{ + LSTATUS RegResult; + HKEY SvcKey = NULL; + DWORD dwLength = 0; + HANDLE Token = NULL; + PTOKEN_USER pTokenUser = NULL; + std::string sNewSD; + + RegResult = RegOpenKeyExW(Key, SubKeyName, 0, WRITE_OWNER | KEY_READ, &SvcKey); + if (RegResult==ERROR_SUCCESS) + { + if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token)) + { + if (!GetTokenInformation(Token, TokenUser, pTokenUser, 0, &dwLength)) + { + if (GetLastError() ==ERROR_INSUFFICIENT_BUFFER) + { + pTokenUser = (PTOKEN_USER) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwLength); + if (pTokenUser) + { + if (GetTokenInformation(Token, TokenUser, pTokenUser, dwLength, &dwLength)) + { + SECURITY_DESCRIPTOR SecDesc; + if ( InitializeSecurityDescriptor(&SecDesc, SECURITY_DESCRIPTOR_REVISION) + && SetSecurityDescriptorDacl(&SecDesc, TRUE, NULL, FALSE) // NULL DACL: full access to everyone + && SetSecurityDescriptorOwner(&SecDesc, pTokenUser->User.Sid, FALSE) + ) + { + RecursiveSetOwner(SvcKey, &SecDesc); + } + } + + } + } + } + } + RegCloseKey(SvcKey); + } + + if (pTokenUser) + { + PSID pSid = pTokenUser->User.Sid; + DWORD dwAclSize = sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE) + ::GetLengthSid(pSid) - sizeof(DWORD); + PACL pDacl = (PACL) new BYTE[dwAclSize]; + if (pDacl) + { + if (TRUE == ::InitializeAcl(pDacl, dwAclSize, ACL_REVISION)) + { + if (TRUE == AddAccessAllowedAceEx(pDacl, ACL_REVISION, CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, WRITE_DAC | KEY_ALL_ACCESS, pSid)) + { + SECURITY_DESCRIPTOR SecDesc; + if (TRUE == ::InitializeSecurityDescriptor(&SecDesc, SECURITY_DESCRIPTOR_REVISION)) + { + if (TRUE == ::SetSecurityDescriptorDacl(&SecDesc, TRUE, pDacl, FALSE)) + { + RecursiveSetDACL (Key, SubKeyName, &SecDesc); + } + } + } + } + delete [] pDacl; + } + } + + if (pTokenUser) + HeapFree(GetProcessHeap(), 0, pTokenUser); + if (Token) + CloseHandle(Token); +} + +/* + * Same as in Setup.c + */ +void SearchAndDeleteRegistrySubString (HKEY hKey, const wchar_t *subKey, const wchar_t *str, BOOL bEnumSubKeys, const wchar_t* enumMatchSubStr) +{ + HKEY hSubKey = 0; + LSTATUS status = 0; + DWORD dwIndex = 0, dwType, dwValueNameLen, dwDataLen; + std::list<std::wstring> subKeysList; + size_t subStringLength = str? wcslen(str) : 0; + + if (bEnumSubKeys) + { + DWORD dwMaxNameLen = 0; + if (ERROR_SUCCESS == RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, &dwMaxNameLen, NULL, NULL, NULL, NULL, NULL, NULL)) + { + dwMaxNameLen++; + wchar_t* szNameValue = new wchar_t[dwMaxNameLen]; + dwIndex = 0; + while (true) + { + dwValueNameLen = dwMaxNameLen; + status = RegEnumKeyExW (hKey, dwIndex++, szNameValue, &dwValueNameLen, NULL, NULL, NULL, NULL); + if (status == ERROR_SUCCESS) + { + if (enumMatchSubStr && !wcsstr(szNameValue, enumMatchSubStr)) + continue; + std::wstring entryName = szNameValue; + entryName += L"\\"; + entryName += subKey; + entryName += L"\\"; + subKeysList.push_back(entryName); + } + else + break; + } + delete [] szNameValue; + } + } + else + { + subKeysList.push_back(subKey); + } + + for (std::list<std::wstring>::iterator ItSubKey = subKeysList.begin(); ItSubKey != subKeysList.end(); ItSubKey++) + { + // if the string to search for is empty, delete the sub key, otherwise, look for matching value and delete them + if (subStringLength == 0) + { + if (ERROR_ACCESS_DENIED == DeleteRegistryKey (hKey, ItSubKey->c_str())) + { + // grant permission to delete + AllowKeyAccess (hKey, ItSubKey->c_str()); + + // try again + DeleteRegistryKey (hKey, ItSubKey->c_str()); + } + } + else + { + if (RegOpenKeyExW (hKey, ItSubKey->c_str(), 0, KEY_ALL_ACCESS, &hSubKey) == ERROR_SUCCESS) + { + DWORD dwMaxNameLen = 0, dwMaxDataLen = 0; + if (ERROR_SUCCESS == RegQueryInfoKey(hSubKey, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &dwMaxNameLen, &dwMaxDataLen, NULL, NULL)) + { + dwMaxNameLen++; + wchar_t* szNameValue = new wchar_t[dwMaxNameLen]; + LPBYTE pbData = new BYTE[dwMaxDataLen]; + + std::list<std::wstring> foundEntries; + dwIndex = 0; + do + { + dwValueNameLen = dwMaxNameLen; + dwDataLen = dwMaxDataLen; + status = RegEnumValueW(hSubKey, dwIndex++, szNameValue, &dwValueNameLen, NULL, &dwType, pbData, &dwDataLen); + if (status == ERROR_SUCCESS) + { + if ( (wcslen(szNameValue) >= subStringLength && wcsstr(szNameValue, str)) + || (dwType == REG_SZ && wcslen((wchar_t*) pbData) >= subStringLength && wcsstr((wchar_t*) pbData, str)) + ) + { + foundEntries.push_back(szNameValue); + } + } + } while ((status == ERROR_SUCCESS) || (status == ERROR_MORE_DATA)); // we ignore ERROR_MORE_DATA errors since + // we are sure to use the correct sizes + + // delete the entries + if (!foundEntries.empty()) + { + for (std::list<std::wstring>::iterator It = foundEntries.begin(); + It != foundEntries.end(); It++) + { + RegDeleteValueW (hSubKey, It->c_str()); + } + } + + delete [] szNameValue; + delete [] pbData; + } + + + RegCloseKey (hSubKey); + } + } + } +} + +/* **************************************************************************** */ + +// Adds a line to the log file of the installer. +void MSILog(MSIHANDLE hInstall, eMSILogLevel level, const wchar_t* zcFormat, ...) +{ + std::wstring wszMessage; + + // initialize use of the variable argument array + va_list vaArgs; + va_start(vaArgs, zcFormat); + + // reliably acquire the size + // from a copy of the variable argument array + // and a functionally reliable call to mock the formatting + va_list vaArgsCopy; + va_copy(vaArgsCopy, vaArgs); + const int iLen = vswprintf(NULL, 0, zcFormat, vaArgsCopy); + va_end(vaArgsCopy); + + // return a formatted string without risking memory mismanagement + // and without assuming any compiler or platform specific behavior + std::vector<wchar_t> zc(iLen + 1); + vswprintf(zc.data(), zc.size(), zcFormat, vaArgs); + va_end(vaArgs); + + wszMessage.assign(zc.data(), iLen); + +#ifdef TEST_HARNESS + if (!hInstall) + { + MessageBox(NULL, pszMessage, wszMessage.c_str(), 0); + return; + } +#endif + + PMSIHANDLE hRecord = MsiCreateRecord(1); + // field 0 is the template + MsiRecordSetString(hRecord, 0, (level == MSI_INFO_LEVEL) ? L"VeraCryptCustomAction_INFO: [1]" : ((level == MSI_WARNING_LEVEL) ? L"VeraCryptCustomAction_WARNING: [1]" : L"VeraCryptCustomAction_ERROR: [1]")); + // field 1, to be placed in [1] placeholder + MsiRecordSetString(hRecord, 1, wszMessage.c_str()); + // send message to running installer + MsiProcessMessage(hInstall, INSTALLMESSAGE_INFO, hRecord); +} + +// Adds a line to the log file of the installer and shows a popup. +// Since MsiProcessMessage() takes the UILEVEL into account, +// this won't cause a deadlock in case of a silent install. +void MSILogAndShow(MSIHANDLE hInstall, eMSILogLevel level, const wchar_t* zcFormat, ...) +{ + std::wstring wszMessage; + + // initialize use of the variable argument array + va_list vaArgs; + va_start(vaArgs, zcFormat); + + // reliably acquire the size + // from a copy of the variable argument array + // and a functionally reliable call to mock the formatting + va_list vaArgsCopy; + va_copy(vaArgsCopy, vaArgs); + const int iLen = vswprintf(NULL, 0, zcFormat, vaArgsCopy); + va_end(vaArgsCopy); + + // return a formatted string without risking memory mismanagement + // and without assuming any compiler or platform specific behavior + std::vector<wchar_t> zc(iLen + 1); + vswprintf(zc.data(), zc.size(), zcFormat, vaArgs); + va_end(vaArgs); + + wszMessage.assign(zc.data(), iLen); + +#ifdef TEST_HARNESS + if (!hInstall) + { + MessageBox(NULL, pszMessage, wszMessage.c_str(), 0); + return; + } +#endif + + PMSIHANDLE hRecord0 = MsiCreateRecord(1); + // field 0 is the template + MsiRecordSetString(hRecord0, 0, (level == MSI_INFO_LEVEL) ? L"VeraCryptCustomAction_INFO: [1]" : ((level == MSI_WARNING_LEVEL) ? L"VeraCryptCustomAction_WARNING: [1]" : L"VeraCryptCustomAction_ERROR: [1]")); + // field 1, to be placed in [1] placeholder + MsiRecordSetString(hRecord0, 1, wszMessage.c_str()); + // send message to running installer + MsiProcessMessage(hInstall, INSTALLMESSAGE_INFO, hRecord0); + + PMSIHANDLE hRecord1 = MsiCreateRecord(0); + MsiRecordSetString(hRecord1, 0, wszMessage.c_str()); + if (level == MSI_INFO_LEVEL) + MsiProcessMessage(hInstall, INSTALLMESSAGE(INSTALLMESSAGE_INFO + MB_OK), hRecord1); + else if (level == MSI_WARNING_LEVEL) + MsiProcessMessage(hInstall, INSTALLMESSAGE(INSTALLMESSAGE_WARNING + MB_OK), hRecord1); + else + MsiProcessMessage(hInstall, INSTALLMESSAGE(INSTALLMESSAGE_ERROR + MB_OK), hRecord1); +} + +/* **************************************************************************** */ + +/* + * Defined in Dlgcode.c. + */ +extern void ExceptionHandlerThread (void *threadArg); +extern LONG __stdcall ExceptionHandler (EXCEPTION_POINTERS *ep); +extern void InvalidParameterHandler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t reserved); +extern BOOL SystemFileSelectorCallPending; +extern DWORD SystemFileSelectorCallerThreadId; + +/* **************************************************************************** */ + +/* + * Same as in Dlgcode.c, Applink() , but + * removed unnecessary code. + */ +void Applink_Dll (MSIHANDLE hInstaller, const char *dest) +{ + wchar_t url [MAX_URL_LENGTH] = {0}; + wchar_t page[TC_MAX_PATH] = {0}; + wchar_t installDir[TC_MAX_PATH] = {0}; + BOOL buildUrl = TRUE; + int r; + + StringCbCopyW (installDir, sizeof (installDir), InstallationPath); + + if (strcmp(dest, "donate") == 0) + { + StringCbCopyW (page, sizeof (page),L"Donation.html"); + } + else if (strcmp(dest, "main") == 0) + { + StringCbCopyW (url, sizeof (url), TC_HOMEPAGE); + buildUrl = FALSE; + } + else if (strcmp(dest,"localizations") == 0) + { + StringCbCopyW (page, sizeof (page),L"Language%20Packs.html"); + } + else if (strcmp(dest, "beginnerstutorial") == 0 || strcmp(dest,"tutorial") == 0) + { + StringCbCopyW (page, sizeof (page),L"Beginner%27s%20Tutorial.html"); + } + else if (strcmp(dest, "releasenotes") == 0 || strcmp(dest, "history") == 0) + { + StringCbCopyW (page, sizeof (page),L"Release%20Notes.html"); + } + else if (strcmp(dest, "hwacceleration") == 0) + { + StringCbCopyW (page, sizeof (page),L"Hardware%20Acceleration.html"); + } + else if (strcmp(dest, "parallelization") == 0) + { + StringCbCopyW (page, sizeof (page),L"Parallelization.html"); + } + else if (strcmp(dest, "help") == 0) + { + StringCbCopyW (page, sizeof (page),L"Documentation.html"); + } + else if (strcmp(dest, "onlinehelp") == 0) + { + StringCbCopyW (url, sizeof (url),L"https://www.veracrypt.fr/en/Documentation.html"); + buildUrl = FALSE; + } + else if (strcmp(dest, "keyfiles") == 0) + { + StringCbCopyW (page, sizeof (page),L"Keyfiles.html"); + } + else if (strcmp(dest, "introcontainer") == 0) + { + StringCbCopyW (page, sizeof (page),L"Creating%20New%20Volumes.html"); + } + else if (strcmp(dest, "introsysenc") == 0) + { + StringCbCopyW (page, sizeof (page),L"System%20Encryption.html"); + } + else if (strcmp(dest, "hiddensysenc") == 0) + { + StringCbCopyW (page, sizeof (page),L"VeraCrypt%20Hidden%20Operating%20System.html"); + } + else if (strcmp(dest, "sysencprogressinfo") == 0) + { + StringCbCopyW (page, sizeof (page),L"System%20Encryption.html"); + } + else if (strcmp(dest, "hiddenvolume") == 0) + { + StringCbCopyW (page, sizeof (page),L"Hidden%20Volume.html"); + } + else if (strcmp(dest, "aes") == 0) + { + StringCbCopyW (page, sizeof (page),L"AES.html"); + } + else if (strcmp(dest, "serpent") == 0) + { + StringCbCopyW (page, sizeof (page),L"Serpent.html"); + } + else if (strcmp(dest, "twofish") == 0) + { + StringCbCopyW (page, sizeof (page),L"Twofish.html"); + } + else if (strcmp(dest, "kuznyechik") == 0) + { + StringCbCopyW (page, sizeof (page),L"Kuznyechik.html"); + } + else if (strcmp(dest, "camellia") == 0) + { + StringCbCopyW (page, sizeof (page),L"Camellia.html"); + } + else if (strcmp(dest, "cascades") == 0) + { + StringCbCopyW (page, sizeof (page),L"Cascades.html"); + } + else if (strcmp(dest, "hashalgorithms") == 0) + { + StringCbCopyW (page, sizeof (page),L"Hash%20Algorithms.html"); + } + else if (strcmp(dest, "isoburning") == 0) + { + StringCbCopyW (url, sizeof (url),L"https://cdburnerxp.se/en/home"); + buildUrl = FALSE; + } + else if (strcmp(dest, "sysfavorites") == 0) + { + StringCbCopyW (page, sizeof (page),L"System%20Favorite%20Volumes.html"); + } + else if (strcmp(dest, "favorites") == 0) + { + StringCbCopyW (page, sizeof (page),L"Favorite%20Volumes.html"); + } + else if (strcmp(dest, "hiddenvolprotection") == 0) + { + StringCbCopyW (page, sizeof (page),L"Protection%20of%20Hidden%20Volumes.html"); + } + else if (strcmp(dest, "faq") == 0) + { + StringCbCopyW (page, sizeof (page),L"FAQ.html"); + } + else if (strcmp(dest, "downloads") == 0) + { + StringCbCopyW (page, sizeof (page),L"Downloads.html"); + } + else if (strcmp(dest, "news") == 0) + { + StringCbCopyW (page, sizeof (page),L"News.html"); + } + else if (strcmp(dest, "contact") == 0) + { + StringCbCopyW (page, sizeof (page),L"Contact.html"); + } + else if (strcmp(dest, "pim") == 0) + { + StringCbCopyW (page, sizeof (page),L"Personal%20Iterations%20Multiplier%20%28PIM%29.html"); + } + else + { + StringCbCopyW (url, sizeof (url),TC_APPLINK); + buildUrl = FALSE; + } + + if (buildUrl) + { + StringCbPrintfW (url, sizeof (url), L"file:///%sdocs/html/en/%s", installDir, page); + CorrectURL (url); + } + + MSILog(hInstaller, MSI_INFO_LEVEL, L"Applink_Dll: url(%s)", url); + + if (IsAdmin ()) + { + // TODO: FileExists always returns FALSE + // This is due to the fact that waccess does not like url encoded as 'file:///%sdocs/html/en/%s'. + // It fails with '0x0000007B: The filename, directory name, or volume label syntax is incorrect.'. + if (buildUrl && !FileExists (url)) + { + // fallbacl to online resources + StringCbPrintfW (url, sizeof (url), L"https://www.veracrypt.fr/en/%s", page); + SafeOpenURL (url); + } + else + { + SafeOpenURL (url); + } + } + else + { + r = (int) ShellExecuteW (NULL, L"open", url, NULL, NULL, SW_SHOWNORMAL); + + if (((r == ERROR_FILE_NOT_FOUND) || (r == ERROR_PATH_NOT_FOUND)) && buildUrl) + { + // fallbacl to online resources + StringCbPrintfW (url, sizeof (url), L"https://www.veracrypt.fr/en/%s", page); + ShellExecuteW (NULL, L"open", url, NULL, NULL, SW_SHOWNORMAL); + } + } +} + +/* + * Same as in Dlgcode.c, CheckCapsLock(), but + * replaced MessageBoxW() with MSILogAndShow(). + */ +BOOL CheckCapsLock_Dll (MSIHANDLE hInstaller, BOOL quiet) +{ + if ((GetKeyState(VK_CAPITAL) & 1) != 0) + { + MSILogAndShow(hInstaller, MSI_WARNING_LEVEL, GetString ("CAPSLOCK_ON")); + return TRUE; + } + return FALSE; +} + +/* + * Same as in Dlgcode.c, GetWrongPasswordErrorMessage(), but + * replaced CheckCapsLock() with CheckCapsLock_Dll(). + */ +std::wstring GetWrongPasswordErrorMessage_Dll (MSIHANDLE hInstaller) +{ + WCHAR szTmp[8192]; + + StringCbPrintfW (szTmp, sizeof(szTmp), GetString (KeyFilesEnable ? "PASSWORD_OR_KEYFILE_WRONG" : "PASSWORD_WRONG")); + if (CheckCapsLock_Dll (hInstaller, TRUE)) + StringCbCatW (szTmp, sizeof(szTmp), GetString ("PASSWORD_WRONG_CAPSLOCK_ON")); + + wstring msg = szTmp; + return msg; +} + +/* + * Same as in Dlgcode.c, HandleDriveNotReadyError(), but + * replaced Warning() with MSILogAndShow(). + */ +void HandleDriveNotReadyError_Dll (MSIHANDLE hInstaller) +{ + HKEY hkey = 0; + DWORD value = 0, size = sizeof (DWORD); + + if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services\\MountMgr", + 0, KEY_READ, &hkey) != ERROR_SUCCESS) + return; + + if (RegQueryValueEx (hkey, L"NoAutoMount", 0, 0, (LPBYTE) &value, &size) == ERROR_SUCCESS + && value != 0) + { + MSILogAndShow (hInstaller, MSI_WARNING_LEVEL, GetString("SYS_AUTOMOUNT_DISABLED")); + } + else if (nCurrentOS == WIN_VISTA && CurrentOSServicePack < 1) + MSILogAndShow (hInstaller, MSI_WARNING_LEVEL, GetString("SYS_ASSIGN_DRIVE_LETTER")); + else + MSILogAndShow (hInstaller, MSI_WARNING_LEVEL, GetString("DEVICE_NOT_READY_ERROR")); + + RegCloseKey (hkey); +} + +/* + * Same as in Dlgcode.c, handleWin32Error(), but + * replaced ErrorDirect(), Error() and MessageBoxW with MSILogAndShow(), + * replaced HandleDriveNotReadyError() with HandleDriveNotReadyError_Dll(). + */ +DWORD handleWin32Error_Dll (MSIHANDLE hInstaller, const char* srcPos) +{ + PWSTR lpMsgBuf; + DWORD dwError = GetLastError (); + wchar_t szErrorValue[32]; + wchar_t* pszDesc; + + if (dwError == 0 || dwError == ERROR_INVALID_WINDOW_HANDLE) + return dwError; + + // Access denied + if (dwError == ERROR_ACCESS_DENIED && !IsAdmin ()) + { + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("ERR_ACCESS_DENIED"), srcPos).c_str ()); + SetLastError (dwError); // Preserve the original error code + return dwError; + } + + FormatMessageW ( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + dwError, + MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */ + (PWSTR) &lpMsgBuf, + 0, + NULL + ); + + if (lpMsgBuf) + pszDesc = (wchar_t*) lpMsgBuf; + else + { + StringCchPrintfW (szErrorValue, ARRAYSIZE (szErrorValue), L"Error 0x%.8X", dwError); + pszDesc = szErrorValue; + } + + MSILogAndShow (hInstaller, MSI_INFO_LEVEL, AppendSrcPos (pszDesc, srcPos).c_str ()); + if (lpMsgBuf) LocalFree (lpMsgBuf); + + // User-friendly hardware error explanation + if (IsDiskError (dwError)) + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString("ERR_HARDWARE_ERROR")); + + // Device not ready + if (dwError == ERROR_NOT_READY) + HandleDriveNotReadyError_Dll(hInstaller); + + SetLastError (dwError); // Preserve the original error code + + return dwError; +} + +/* + * Same as in Dlgcode.c, handleError(), but + * replaced ErrorDirect(), Error() and MessageBoxW with MSILogAndShow(), + * replaced handleWin32Error() with handleWin32Error_Dll(). + */ +void handleError_Dll (MSIHANDLE hInstaller, int code, const char* srcPos) +{ + WCHAR szTmp[4096]; + + switch (code & 0x0000FFFF) + { + case ERR_OS_ERROR: + handleWin32Error_Dll (hInstaller, srcPos); + break; + case ERR_OUTOFMEMORY: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("OUTOFMEMORY"), srcPos).c_str()); + break; + + case ERR_PASSWORD_WRONG: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetWrongPasswordErrorMessage_Dll (hInstaller).c_str(), srcPos).c_str()); + break; + + case ERR_DRIVE_NOT_FOUND: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("NOT_FOUND"), srcPos).c_str()); + break; + case ERR_FILES_OPEN: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("OPENFILES_DRIVER"), srcPos).c_str()); + break; + case ERR_FILES_OPEN_LOCK: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("OPENFILES_LOCK"), srcPos).c_str()); + break; + case ERR_VOL_SIZE_WRONG: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("VOL_SIZE_WRONG"), srcPos).c_str()); + break; + case ERR_COMPRESSION_NOT_SUPPORTED: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("COMPRESSION_NOT_SUPPORTED"), srcPos).c_str()); + break; + case ERR_PASSWORD_CHANGE_VOL_TYPE: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("WRONG_VOL_TYPE"), srcPos).c_str()); + break; + case ERR_VOL_SEEKING: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("VOL_SEEKING"), srcPos).c_str()); + break; + case ERR_CIPHER_INIT_FAILURE: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("ERR_CIPHER_INIT_FAILURE"), srcPos).c_str()); + break; + case ERR_CIPHER_INIT_WEAK_KEY: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("ERR_CIPHER_INIT_WEAK_KEY"), srcPos).c_str()); + break; + case ERR_VOL_ALREADY_MOUNTED: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("VOL_ALREADY_MOUNTED"), srcPos).c_str()); + break; + case ERR_FILE_OPEN_FAILED: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("FILE_OPEN_FAILED"), srcPos).c_str()); + break; + case ERR_VOL_MOUNT_FAILED: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("VOL_MOUNT_FAILED"), srcPos).c_str()); + break; + case ERR_NO_FREE_DRIVES: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("NO_FREE_DRIVES"), srcPos).c_str()); + break; + case ERR_ACCESS_DENIED: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("ACCESS_DENIED"), srcPos).c_str()); + break; + + case ERR_DRIVER_VERSION: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString("DRIVER_VERSION")); + break; + + case ERR_NEW_VERSION_REQUIRED: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (GetString ("NEW_VERSION_REQUIRED"), srcPos).c_str()); + break; + + case ERR_SELF_TESTS_FAILED: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString("ERR_SELF_TESTS_FAILED")); + break; + + case ERR_VOL_FORMAT_BAD: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString ("ERR_VOL_FORMAT_BAD")); + break; + + case ERR_ENCRYPTION_NOT_COMPLETED: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString ("ERR_ENCRYPTION_NOT_COMPLETED")); + break; + + case ERR_NONSYS_INPLACE_ENC_INCOMPLETE: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString ("ERR_NONSYS_INPLACE_ENC_INCOMPLETE")); + break; + + case ERR_SYS_HIDVOL_HEAD_REENC_MODE_WRONG: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString ("ERR_SYS_HIDVOL_HEAD_REENC_MODE_WRONG")); + break; + + case ERR_PARAMETER_INCORRECT: + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString ("ERR_PARAMETER_INCORRECT")); + break; + + case ERR_USER_ABORT: + case ERR_DONT_REPORT: + // A non-error + break; + + case ERR_UNSUPPORTED_TRUECRYPT_FORMAT: + StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("UNSUPPORTED_TRUECRYPT_FORMAT"), (code >> 24), (code >> 16) & 0x000000FF); + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (szTmp, srcPos).c_str()); + break; + + default: + StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("ERR_UNKNOWN"), code); + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, AppendSrcPos (szTmp, srcPos).c_str()); + } +} + +/* + * Same as in Dlgcode.c, LoadSystemDll() , but + * replaced AbortProcess() with MSILogAndShow() + return, + */ +static void LoadSystemDll_Dll (MSIHANDLE hInstaller, LPCTSTR szModuleName, HMODULE *pHandle, BOOL bIgnoreError, const char* srcPos) +{ + wchar_t dllPath[MAX_PATH]; + + /* Load dll explictely from System32 to avoid Dll hijacking attacks*/ + if (!GetSystemDirectory(dllPath, MAX_PATH)) + StringCbCopyW(dllPath, sizeof(dllPath), L"C:\\Windows\\System32"); + + StringCbCatW(dllPath, sizeof(dllPath), L"\\"); + StringCbCatW(dllPath, sizeof(dllPath), szModuleName); + + if (((*pHandle = LoadLibrary(dllPath)) == NULL) && !bIgnoreError) + { + // This error is fatal + handleWin32Error_Dll (hInstaller, srcPos); + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString ("INIT_DLL")); + } +} + +/* + * Same as in Dlgcode.c, handleWin32Error(), but + * replaced AbortProcess() with MSILogAndShow() + return, + */ +BOOL IsPagingFileActive_Dll (MSIHANDLE hInstaller, BOOL checkNonWindowsPartitionsOnly) +{ + // GlobalMemoryStatusEx() cannot be used to determine if a paging file is active + + wchar_t data[65536]; + DWORD size = sizeof (data); + + if (IsPagingFileWildcardActive()) + return TRUE; + + if (ReadLocalMachineRegistryMultiString (L"System\\CurrentControlSet\\Control\\Session Manager\\Memory Management", L"PagingFiles", data, &size) + && size > 24 && !checkNonWindowsPartitionsOnly) + return TRUE; + + if (!IsAdmin()) + { + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString("UAC_INIT_ERROR")); + return FALSE; + } + + for (wchar_t drive = L'C'; drive <= L'Z'; ++drive) + { + // Query geometry of the drive first to prevent "no medium" pop-ups + wstring drivePath = L"\\\\.\\X:"; + drivePath[4] = drive; + + if (checkNonWindowsPartitionsOnly) + { + wchar_t sysDir[MAX_PATH]; + if (GetSystemDirectory (sysDir, ARRAYSIZE (sysDir)) != 0 && towupper (sysDir[0]) == drive) + continue; + } + + HANDLE handle = CreateFile (drivePath.c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); + + if (handle == INVALID_HANDLE_VALUE) + continue; + + BYTE dgBuffer[256]; + DWORD dwResult; + + if (!DeviceIoControl (handle, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, NULL, 0, dgBuffer, sizeof (dgBuffer), &dwResult, NULL) + && !DeviceIoControl (handle, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, dgBuffer, sizeof (dgBuffer), &dwResult, NULL)) + { + CloseHandle (handle); + continue; + } + + CloseHandle (handle); + + // Test if a paging file exists and is locked by another process + wstring path = L"X:\\pagefile.sys"; + path[0] = drive; + + handle = CreateFile (path.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); + + if (handle != INVALID_HANDLE_VALUE) + CloseHandle (handle); + else if (GetLastError() == ERROR_SHARING_VIOLATION) + return TRUE; + } + + return FALSE; +} + +/* + * Same as in Dlgcode.c, DoDriverInstall(), but + * replaced StatusMessage() with MSILog(). + */ +BOOL DoDriverInstall_Dll (MSIHANDLE hInstaller) +{ + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin DoDriverInstall_Dll"); + + SC_HANDLE hManager, hService = NULL; + BOOL bOK = FALSE, bRet; + +#ifdef SETUP + if (SystemEncryptionUpdate) + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"SystemEncryptionUpdate == TRUE"); + bOK = TRUE; + goto end; + } +#endif + + hManager = OpenSCManager (NULL, NULL, SC_MANAGER_ALL_ACCESS); + if (hManager == NULL) + goto error; + +#ifdef SETUP + MSILog (hInstaller, MSI_INFO_LEVEL, GetString("INSTALLING_DRIVER")); +#endif + + hService = CreateService (hManager, L"veracrypt", L"veracrypt", + SERVICE_ALL_ACCESS, SERVICE_KERNEL_DRIVER, SERVICE_SYSTEM_START, SERVICE_ERROR_NORMAL, + L"System32\\drivers\\veracrypt.sys", + NULL, NULL, NULL, NULL, NULL); + + if (hService == NULL) + goto error; + else + CloseServiceHandle (hService); + + hService = OpenService (hManager, L"veracrypt", SERVICE_ALL_ACCESS); + if (hService == NULL) + goto error; + +#ifdef SETUP + MSILog (hInstaller, MSI_INFO_LEVEL, GetString("STARTING_DRIVER")); +#endif + + bRet = StartService (hService, 0, NULL); + if (bRet == FALSE) + goto error; + + bOK = TRUE; + +error: + if (bOK == FALSE && GetLastError () != ERROR_SERVICE_ALREADY_RUNNING) + { + handleWin32Error_Dll (hInstaller, SRC_POS); + MSILogAndShow(hInstaller, MSI_ERROR_LEVEL, GetString("DRIVER_INSTALL_FAILED")); + } + else + bOK = TRUE; + + if (hService != NULL) + CloseServiceHandle (hService); + + if (hManager != NULL) + CloseServiceHandle (hManager); + +end: + MSILog(hInstaller, MSI_INFO_LEVEL, L"End DoDriverInstall_Dll"); + return bOK; +} + +/* **************************************************************************** */ + +/* + * Same as in Setup.c, StartStopService(), but + * replaced StatusMessage() with MSILog(). + */ +BOOL StartStopService_Dll (MSIHANDLE hInstaller, wchar_t *lpszService, BOOL bStart, DWORD argc, LPCWSTR* argv) +{ + SC_HANDLE hManager, hService = NULL; + BOOL bOK = FALSE, bRet; + SERVICE_STATUS status = {0}; + int x; + DWORD dwExpectedState = bStart? SERVICE_RUNNING : SERVICE_STOPPED; + + hManager = OpenSCManager (NULL, NULL, SC_MANAGER_ALL_ACCESS); + if (hManager == NULL) + goto error; + + hService = OpenService (hManager, lpszService, SERVICE_ALL_ACCESS); + if (hService == NULL) + goto error; + + if (bStart) + MSILog(hInstaller, MSI_INFO_LEVEL, L"STARTING %s", lpszService); + else + MSILog(hInstaller, MSI_INFO_LEVEL, L"STOPPING %s", lpszService); + + if (bStart) + { + if (!StartService (hService, argc, argv) && (GetLastError () != ERROR_SERVICE_ALREADY_RUNNING)) + goto error; + } + else + ControlService (hService, SERVICE_CONTROL_STOP, &status); + + for (x = 0; x < WAIT_PERIOD; x++) + { + bRet = QueryServiceStatus (hService, &status); + if (bRet != TRUE) + goto error; + + if (status.dwCurrentState == dwExpectedState) + break; + + Sleep (1000); + } + + bRet = QueryServiceStatus (hService, &status); + if (bRet != TRUE) + goto error; + + if (status.dwCurrentState != dwExpectedState) + goto error; + + bOK = TRUE; + +error: + + if (bOK == FALSE && GetLastError () == ERROR_SERVICE_DOES_NOT_EXIST) + { + bOK = TRUE; + } + + if (hService != NULL) + CloseServiceHandle (hService); + + if (hManager != NULL) + CloseServiceHandle (hManager); + + return bOK; +} + +/* + * Same as in Setup.c, SetSystemRestorePoint(), but + * replaced StatusMessage() with MSILog(). + */ +static void SetSystemRestorePoint_Dll (MSIHANDLE hInstaller, BOOL finalize) +{ + static RESTOREPOINTINFO RestPtInfo; + static STATEMGRSTATUS SMgrStatus; + static BOOL failed = FALSE; + static BOOL (__stdcall *_SRSetRestorePoint)(PRESTOREPOINTINFO, PSTATEMGRSTATUS); + + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin SetSystemRestorePoint_Dll"); + + if (!SystemRestoreDll) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"SystemRestoreDll NULL"); + goto end; + } + + _SRSetRestorePoint = (BOOL (__stdcall *)(PRESTOREPOINTINFO, PSTATEMGRSTATUS))GetProcAddress (SystemRestoreDll,"SRSetRestorePointW"); + if (_SRSetRestorePoint == 0) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"_SRSetRestorePoint NULL"); + FreeLibrary (SystemRestoreDll); + SystemRestoreDll = 0; + goto end; + } + + if (!finalize) + { + MSILog (hInstaller, MSI_INFO_LEVEL, GetString("CREATING_SYS_RESTORE")); + + RestPtInfo.dwEventType = BEGIN_SYSTEM_CHANGE; + RestPtInfo.dwRestorePtType = bUninstall ? APPLICATION_UNINSTALL : APPLICATION_INSTALL | DEVICE_DRIVER_INSTALL; + RestPtInfo.llSequenceNumber = 0; + StringCbCopyW (RestPtInfo.szDescription, sizeof(RestPtInfo.szDescription), bUninstall ? L"VeraCrypt uninstallation" : L"VeraCrypt installation"); + + if(!_SRSetRestorePoint (&RestPtInfo, &SMgrStatus)) + { + MSILog (hInstaller, MSI_ERROR_LEVEL, GetString("FAILED_SYS_RESTORE")); + failed = TRUE; + } + } + else if (!failed) + { + RestPtInfo.dwEventType = END_SYSTEM_CHANGE; + RestPtInfo.llSequenceNumber = SMgrStatus.llSequenceNumber; + + if(!_SRSetRestorePoint(&RestPtInfo, &SMgrStatus)) + { + MSILog (hInstaller, MSI_ERROR_LEVEL, GetString("FAILED_SYS_RESTORE")); + } + } + +end: + MSILog(hInstaller, MSI_INFO_LEVEL, L"End SetSystemRestorePoint_Dll"); +} + +/* + * Same as in Setup.c, DoDriverUnload(), but + * replaced AbortProcess() and AbortProcessSilent() with MSILogAndShow() + return, + * replaced Error(), MessageBoxW() with MSILogAndShow(), + * replaced StatusMessage() with MSILog(), + * replaced handleWin32Error() with handleWin32Error_Dll(). + */ +BOOL DoDriverUnload_Dll (MSIHANDLE hInstaller, HWND hwnd) +{ + BOOL bOK = TRUE; + int status = 0; + + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin DoDriverUnload_Dll"); + + status = DriverAttach (); + if (status != 0) + { + if (status == ERR_OS_ERROR && GetLastError () != ERROR_FILE_NOT_FOUND) + { + handleWin32Error_Dll (hInstaller, SRC_POS); + MSILogAndShow(hInstaller, MSI_ERROR_LEVEL, GetString("NODRIVER")); + bOK = FALSE; + goto end; + } + + if (status != ERR_OS_ERROR) + { + handleError_Dll (hInstaller, status, SRC_POS); + MSILogAndShow(hInstaller, MSI_ERROR_LEVEL, GetString("NODRIVER")); + bOK = FALSE; + goto end; + } + } + + if (hDriver != INVALID_HANDLE_VALUE) + { + MOUNT_LIST_STRUCT driver; + LONG driverVersion = VERSION_NUM; + int refCount; + DWORD dwResult; + BOOL bResult; + + // Try to determine if it's upgrade (and not reinstall, downgrade, or first-time install). + DetermineUpgradeDowngradeStatus (FALSE, &driverVersion); + + // Test for encrypted boot drive + try + { + BootEncryption bootEnc (hwnd); + if (bootEnc.GetDriverServiceStartType() == SERVICE_BOOT_START) + { + try + { + // Check hidden OS update consistency + if (IsHiddenOSRunning()) + { + if (bootEnc.GetInstalledBootLoaderVersion() != VERSION_NUM) + { + if (AskWarnNoYes ("UPDATE_TC_IN_DECOY_OS_FIRST", hwnd) == IDNO) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"User denied request"); + bOK = FALSE; + goto end; + } + } + } + } + catch (...) { } + + if (bUninstallInProgress && !bootEnc.GetStatus().DriveMounted) + { + try { bootEnc.RegisterFilterDriver (false, BootEncryption::DriveFilter); } catch (...) { } + try { bootEnc.RegisterFilterDriver (false, BootEncryption::VolumeFilter); } catch (...) { } + try { bootEnc.RegisterFilterDriver (false, BootEncryption::DumpFilter); } catch (...) { } + bootEnc.SetDriverServiceStartType (SERVICE_SYSTEM_START); + } + else if (bUninstallInProgress || bDowngrade) + { + MSILogAndShow(hInstaller, MSI_ERROR_LEVEL, (bDowngrade ? GetString("SETUP_FAILED_BOOT_DRIVE_ENCRYPTED_DOWNGRADE") : GetString("SETUP_FAILED_BOOT_DRIVE_ENCRYPTED"))); + bOK = FALSE; + goto end; + } + else + { + if (CurrentOSMajor == 6 && CurrentOSMinor == 0 && CurrentOSServicePack < 1) + { + MSILogAndShow(hInstaller, MSI_ERROR_LEVEL, GetString("SYS_ENCRYPTION_UPGRADE_UNSUPPORTED_ON_VISTA_SP0")); + bOK = FALSE; + goto end; + } + + SystemEncryptionUpdate = TRUE; + PortableMode = FALSE; + } + } + } + catch (...) { } + + if (!bUninstall + && (bUpgrade || SystemEncryptionUpdate) + && (!bDevm || SystemEncryptionUpdate)) + { + UnloadDriver = FALSE; + } + + if (PortableMode && !SystemEncryptionUpdate) + UnloadDriver = TRUE; + + if (UnloadDriver) + { + int volumesMounted = 0; + + // Check mounted volumes + bResult = DeviceIoControl (hDriver, TC_IOCTL_IS_ANY_VOLUME_MOUNTED, NULL, 0, &volumesMounted, sizeof (volumesMounted), &dwResult, NULL); + + if (!bResult) + { + bResult = DeviceIoControl (hDriver, TC_IOCTL_LEGACY_GET_MOUNTED_VOLUMES, NULL, 0, &driver, sizeof (driver), &dwResult, NULL); + if (bResult) + volumesMounted = driver.ulMountedDrives; + } + + if (bResult) + { + if (volumesMounted != 0) + { + bOK = FALSE; + MSILogAndShow(hInstaller, MSI_WARNING_LEVEL, GetString ("DISMOUNT_ALL_FIRST")); + } + } + else + { + bOK = FALSE; + handleWin32Error_Dll (hInstaller, SRC_POS); + } + } + + // Try to close all open TC windows + if (bOK) + { + BOOL TCWindowClosed = FALSE; + + EnumWindows (CloseTCWindowsEnum, (LPARAM) &TCWindowClosed); + + if (TCWindowClosed) + Sleep (2000); + } + + // Test for any applications attached to driver + if (!bUpgrade) + { + bResult = DeviceIoControl (hDriver, TC_IOCTL_GET_DEVICE_REFCOUNT, &refCount, sizeof (refCount), &refCount, + sizeof (refCount), &dwResult, NULL); + + if (bOK && bResult && refCount > 1) + { + MSILogAndShow(hInstaller, MSI_WARNING_LEVEL, GetString ("CLOSE_TC_FIRST")); + bOK = FALSE; + } + } + + if (!bOK || UnloadDriver) + { + CloseHandle (hDriver); + hDriver = INVALID_HANDLE_VALUE; + } + } + else + { + // Note that the driver may have already been unloaded during this session (e.g. retry after an error, etc.) so it is not + // guaranteed that the user is installing VeraCrypt for the first time now (we also cannot know if the user has already + // installed and used VeraCrypt on another system before). + bPossiblyFirstTimeInstall = TRUE; + } + +end: + MSILog(hInstaller, MSI_INFO_LEVEL, L"End DoDriverUnload_Dll"); + return bOK; +} + +/* + * Same as in Setup.c, DoServiceUninstall(), but + * replaced AbortProcess() and AbortProcessSilent() with MSILogAndShow() + return, + * replaced Error(), MessageBoxW() with MSILogAndShow(), + * replaced StatusMessage() with MSILog(), + * replaced handleWin32Error() with handleWin32Error_Dll(). + */ +BOOL DoServiceUninstall_Dll (MSIHANDLE hInstaller, HWND hwndDlg, wchar_t *lpszService) +{ + SC_HANDLE hManager, hService = NULL; + BOOL bOK = FALSE, bRet; + SERVICE_STATUS status; + BOOL firstTry = TRUE; + int x; + + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin DoServiceUninstall_Dll"); + + memset (&status, 0, sizeof (status)); /* Keep VC6 quiet */ + +retry: + + hManager = OpenSCManager (NULL, NULL, SC_MANAGER_ALL_ACCESS); + if (hManager == NULL) + goto error; + + hService = OpenService (hManager, lpszService, SERVICE_ALL_ACCESS); + if (hService == NULL) + goto error; + + if (wcscmp (L"veracrypt", lpszService) == 0) + { + try + { + BootEncryption bootEnc (hwndDlg); + if (bootEnc.GetDriverServiceStartType() == SERVICE_BOOT_START) + { + try { bootEnc.RegisterFilterDriver (false, BootEncryption::DriveFilter); } catch (...) { } + try { bootEnc.RegisterFilterDriver (false, BootEncryption::VolumeFilter); } catch (...) { } + try { bootEnc.RegisterFilterDriver (false, BootEncryption::DumpFilter); } catch (...) { } + } + } + catch (...) { } + + MSILog (hInstaller, MSI_INFO_LEVEL, GetString("STOPPING_DRIVER")); + } + else + MSILog (hInstaller, MSI_INFO_LEVEL, L"STOPPING %s", lpszService); + + for (x = 0; x < WAIT_PERIOD; x++) + { + bRet = QueryServiceStatus (hService, &status); + if (bRet != TRUE) + goto error; + + if (status.dwCurrentState != SERVICE_START_PENDING && + status.dwCurrentState != SERVICE_STOP_PENDING && + status.dwCurrentState != SERVICE_CONTINUE_PENDING) + break; + + Sleep (1000); + } + + if (status.dwCurrentState != SERVICE_STOPPED) + { + bRet = ControlService (hService, SERVICE_CONTROL_STOP, &status); + if (bRet == FALSE) + goto try_delete; + + for (x = 0; x < WAIT_PERIOD; x++) + { + bRet = QueryServiceStatus (hService, &status); + if (bRet != TRUE) + goto error; + + if (status.dwCurrentState != SERVICE_START_PENDING && + status.dwCurrentState != SERVICE_STOP_PENDING && + status.dwCurrentState != SERVICE_CONTINUE_PENDING) + break; + + Sleep (1000); + } + + if (status.dwCurrentState != SERVICE_STOPPED && status.dwCurrentState != SERVICE_STOP_PENDING) + goto error; + } + +try_delete: + + if (wcscmp (L"veracrypt", lpszService) == 0) + MSILog (hInstaller, MSI_INFO_LEVEL, GetString("REMOVING_DRIVER")); + else + MSILog (hInstaller, MSI_INFO_LEVEL, L"REMOVING %s", lpszService); + + if (hService != NULL) + { + CloseServiceHandle (hService); + hService = NULL; + } + + if (hManager != NULL) + { + CloseServiceHandle (hManager); + hManager = NULL; + } + + hManager = OpenSCManager (NULL, NULL, SC_MANAGER_ALL_ACCESS); + if (hManager == NULL) + goto error; + + hService = OpenService (hManager, lpszService, SERVICE_ALL_ACCESS); + if (hService == NULL) + goto error; + + bRet = DeleteService (hService); + if (bRet == FALSE) + { + if (firstTry && GetLastError () == ERROR_SERVICE_MARKED_FOR_DELETE) + { + // Second try for an eventual no-install driver instance + CloseServiceHandle (hService); + CloseServiceHandle (hManager); + hService = NULL; + hManager = NULL; + + Sleep(1000); + firstTry = FALSE; + goto retry; + } + + goto error; + } + + bOK = TRUE; + +error: + + if (bOK == FALSE && GetLastError ()!= ERROR_SERVICE_DOES_NOT_EXIST) + { + handleWin32Error_Dll (hInstaller, SRC_POS); + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString("DRIVER_UINSTALL_FAILED")); + } + else + bOK = TRUE; + + if (hService != NULL) + CloseServiceHandle (hService); + + if (hManager != NULL) + CloseServiceHandle (hManager); + + MSILog(hInstaller, MSI_INFO_LEVEL, L"End DoServiceUninstall_Dll"); + return bOK; +} + +/* + * Same as in Setup.c, DoRegUninstall(), but + * replaced StatusMessage() with MSILog(), + * removed unnecessary code that is done by MSI. + */ +BOOL DoRegUninstall_Dll (MSIHANDLE hInstaller, BOOL bRemoveDeprecated) +{ + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin DoRegUninstall_Dll"); + + wchar_t regk [64]; + typedef LSTATUS (WINAPI *RegDeleteKeyExWFn) (HKEY hKey,LPCWSTR lpSubKey,REGSAM samDesired,WORD Reserved); + RegDeleteKeyExWFn RegDeleteKeyExWPtr = NULL; + HMODULE hAdvapiDll = LoadLibrary (L"Advapi32.dll"); + if (hAdvapiDll) + { + RegDeleteKeyExWPtr = (RegDeleteKeyExWFn) GetProcAddress(hAdvapiDll, "RegDeleteKeyExW"); + } + + // Unregister COM servers + if (!bRemoveDeprecated && IsOSAtLeast (WIN_VISTA)) + { + if (!UnregisterComServers (InstallationPath)) + MSILog (hInstaller, MSI_ERROR_LEVEL, GetString("COM_DEREG_FAILED")); + } + + if (!bRemoveDeprecated) + MSILog (hInstaller, MSI_INFO_LEVEL, GetString("REMOVING_REG")); + + /* The following is done by MSI, so we skip it */ + /* + if (RegDeleteKeyExWPtr) + { + RegDeleteKeyExWPtr (HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt", KEY_WOW64_32KEY, 0); + RegDeleteKeyExWPtr (HKEY_CURRENT_USER, L"Software\\VeraCrypt", KEY_WOW64_32KEY, 0); + } + else + { + RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt"); + RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\VeraCrypt"); + } + RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume\\Shell\\open\\command"); + RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume\\Shell\\open"); + RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume\\Shell"); + RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume\\DefaultIcon"); + RegDeleteKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\VeraCryptVolume"); + */ + + if (!bRemoveDeprecated) + { + HKEY hKey; + + GetStartupRegKeyName (regk, sizeof(regk)); + DeleteRegistryValue (regk, L"VeraCrypt"); + + // The following is done by MSI, so we skip it + // DeleteRegistryKey (HKEY_LOCAL_MACHINE, L"Software\\Classes\\.hc"); + + // enable the SE_TAKE_OWNERSHIP_NAME privilege for this operation + SetPrivilege (SE_TAKE_OWNERSHIP_NAME, TRUE); + + // clean MuiCache list from VeraCrypt entries + SearchAndDeleteRegistrySubString (HKEY_CLASSES_ROOT, L"Local Settings\\Software\\Microsoft\\Windows\\Shell\\MuiCache", L"VeraCrypt", FALSE, NULL); + + // clean other VeraCrypt entries from all users + SearchAndDeleteRegistrySubString (HKEY_USERS, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\.hc", NULL, TRUE, NULL); + SearchAndDeleteRegistrySubString (HKEY_USERS, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Compatibility Assistant\\Persisted", L"VeraCrypt", TRUE, NULL); + SearchAndDeleteRegistrySubString (HKEY_USERS, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StartPage\\NewShortcuts", L"VeraCrypt", TRUE, NULL); + + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SYSTEM", 0, KEY_ALL_ACCESS | WRITE_DAC | WRITE_OWNER, &hKey) == ERROR_SUCCESS) + { + SearchAndDeleteRegistrySubString (hKey, L"Enum\\Root\\LEGACY_VERACRYPT", NULL, TRUE, L"ControlSet"); + SearchAndDeleteRegistrySubString (hKey, L"services\\veracrypt", NULL, TRUE, L"ControlSet"); + RegCloseKey(hKey); + } + + // disable the SE_TAKE_OWNERSHIP_NAME privilege for this operation + SetPrivilege (SE_TAKE_OWNERSHIP_NAME, FALSE); + + // The following is done by MSI, so we skip it + //SHChangeNotify (SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); + } + + if (hAdvapiDll) + FreeLibrary (hAdvapiDll); + + MSILog(hInstaller, MSI_INFO_LEVEL, L"End DoRegUninstall_Dll"); + return TRUE; +} + +/* + * Same as in Setup.c, UpgradeBootLoader(), but + * replaced StatusMessage() with MSILog(). + */ +BOOL UpgradeBootLoader_Dll (MSIHANDLE hInstaller, HWND hwndDlg) +{ + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin UpgradeBootLoader_Dll"); + + BOOL bOK = FALSE; + + if (!SystemEncryptionUpdate) + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"SystemEncryptionUpdate == FALSE"); + bOK = TRUE; + goto end; + } + + try + { + BootEncryption bootEnc (hwndDlg); + uint64 bootLoaderVersion = bootEnc.GetInstalledBootLoaderVersion(); + if ((bootLoaderVersion < VERSION_NUM) || (bReinstallMode && (bootLoaderVersion == VERSION_NUM))) + { + MSILog (hInstaller, MSI_INFO_LEVEL, GetString("INSTALLER_UPDATING_BOOT_LOADER")); + + bootEnc.InstallBootLoader (true); + + if (bootEnc.GetInstalledBootLoaderVersion() <= TC_RESCUE_DISK_UPGRADE_NOTICE_MAX_VERSION) + { + bUpdateRescueDisk = TRUE; + MSILog (hInstaller, MSI_INFO_LEVEL, GetString(IsHiddenOSRunning() ? "BOOT_LOADER_UPGRADE_OK_HIDDEN_OS" : "BOOT_LOADER_UPGRADE_OK")); + } + } + bOK = TRUE; + goto end; + } + catch (Exception &e) + { + e.Show (hwndDlg); + } + catch (...) { } + + MSILog (hInstaller, MSI_ERROR_LEVEL, GetString("BOOT_LOADER_UPGRADE_FAILED")); + +end: + MSILog(hInstaller, MSI_INFO_LEVEL, L"End UpgradeBootLoader_Dll"); + return bOK; +} + +/* + * Same as Setup.c, function DoApplicationDataUninstall(), but + * replaced StatusMessage() and RemoveMessage() with MSILog(). + */ +BOOL DoApplicationDataUninstall_Dll (MSIHANDLE hInstaller) +{ + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin DoApplicationDataUninstall"); + + wchar_t path[MAX_PATH]; + wchar_t path2[MAX_PATH]; + BOOL bOK = TRUE; + + MSILog(hInstaller, MSI_INFO_LEVEL, GetString("REMOVING_APPDATA")); + + SHGetFolderPath (NULL, CSIDL_APPDATA, NULL, 0, path); + StringCbCatW (path, sizeof(path), L"\\VeraCrypt\\"); + + // Delete favorite volumes file + StringCbPrintfW (path2, sizeof(path2), L"%s%s", path, TC_APPD_FILENAME_FAVORITE_VOLUMES); + MSILog(hInstaller, MSI_INFO_LEVEL, L"REMOVING %s", path2); + StatDeleteFile (path2, FALSE); + + // Delete keyfile defaults + StringCbPrintfW (path2, sizeof(path2), L"%s%s", path, TC_APPD_FILENAME_DEFAULT_KEYFILES); + MSILog(hInstaller, MSI_INFO_LEVEL, L"REMOVING %s", path2); + StatDeleteFile (path2, FALSE); + + // Delete history file + StringCbPrintfW (path2, sizeof(path2), L"%s%s", path, TC_APPD_FILENAME_HISTORY); + MSILog(hInstaller, MSI_INFO_LEVEL, L"REMOVING %s", path2); + StatDeleteFile (path2, FALSE); + + // Delete configuration file + StringCbPrintfW (path2, sizeof(path2), L"%s%s", path, TC_APPD_FILENAME_CONFIGURATION); + MSILog(hInstaller, MSI_INFO_LEVEL, L"REMOVING %s", path2); + StatDeleteFile (path2, FALSE); + + // Delete system encryption configuration file + StringCbPrintfW (path2, sizeof(path2), L"%s%s", path, TC_APPD_FILENAME_SYSTEM_ENCRYPTION); + MSILog(hInstaller, MSI_INFO_LEVEL, L"REMOVING %s", path2); + StatDeleteFile (path2, FALSE); + + SHGetFolderPath (NULL, CSIDL_APPDATA, NULL, 0, path); + StringCbCatW (path, sizeof(path), L"\\VeraCrypt"); + MSILog(hInstaller, MSI_INFO_LEVEL, L"REMOVING %s", path); + if (!StatRemoveDirectory (path)) + { + handleWin32Error_Dll (hInstaller, SRC_POS); + bOK = FALSE; + } + + // remove VeraCrypt under common appdata + if (SUCCEEDED (SHGetFolderPath (NULL, CSIDL_COMMON_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, path))) + { + StringCbCatW (path, sizeof(path), L"\\VeraCrypt"); + + // Delete original bootloader + StringCbPrintfW (path2, sizeof(path2), L"%s\\%s", path, TC_SYS_BOOT_LOADER_BACKUP_NAME); + MSILog(hInstaller, MSI_INFO_LEVEL, L"REMOVING %s", path2); + StatDeleteFile (path2, FALSE); + + // remove VeraCrypt folder + MSILog(hInstaller, MSI_INFO_LEVEL, L"REMOVING %s", path); + StatRemoveDirectory (path); + } + + MSILog(hInstaller, MSI_INFO_LEVEL, L"End DoApplicationDataUninstall"); + return bOK; +} + +/* + * Same as Setup.c, function DoUninstall(), but + * removed uninstall of files and registry as it will be + * done by MSI. + */ +BOOL DoUninstall_Dll (MSIHANDLE hInstaller, HWND hwndDlg) +{ + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin DoUninstall_Dll"); + + BOOL bOK = TRUE; + BOOL bTempSkipSysRestore = FALSE; + + if (DoDriverUnload_Dll (hInstaller, hwndDlg) == FALSE) + { + bOK = FALSE; + bTempSkipSysRestore = TRUE; // Volumes are possibly mounted; defer System Restore point creation for this uninstall attempt. + } + else + { + if (!Rollback && bSystemRestore && !bTempSkipSysRestore) + SetSystemRestorePoint_Dll (hInstaller, FALSE); + + if (DoServiceUninstall_Dll (hInstaller, hwndDlg, L"veracrypt") == FALSE) + { + bOK = FALSE; + } + else if (DoRegUninstall_Dll (hInstaller, FALSE) == FALSE) + { + bOK = FALSE; + } + /* Following skipped because done by MSI */ + /* + else if (DoFilesInstall ((HWND) hwndDlg, InstallationPath) == FALSE) + { + bOK = FALSE; + } + else if (DoShortcutsUninstall (hwndDlg, InstallationPath) == FALSE) + { + bOK = FALSE; + } + */ + else if (!DoApplicationDataUninstall_Dll (hInstaller)) + { + bOK = FALSE; + } + else + { + // Deprecated service + DoServiceUninstall_Dll (hInstaller, hwndDlg, L"VeraCryptService"); + } + } + + if (Rollback) + goto end; + + if (bSystemRestore && !bTempSkipSysRestore) + SetSystemRestorePoint_Dll (hInstaller, TRUE); + + if (!bOK) + bUninstallInProgress = FALSE; + +end: + + MSILog(hInstaller, MSI_INFO_LEVEL, L"End DoUninstall_Dll"); + return bOK; +} + +/* + * Same as Setup.c, function InitApp(), but + * replaced unnecessary calls, + * forced english as language, + * replaced LoadLanguageFile() with LoadLanguageFromResource() to be able to set bForceSilent. + */ +BOOL InitDll (MSIHANDLE hInstaller) +{ + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin InitDll"); + + BOOL bOK = TRUE; + InitCommonControlsPtr InitCommonControlsFn = NULL; + + /* remove current directory from dll search path */ + SetDllDirectoryFn = (SetDllDirectoryPtr) GetProcAddress (GetModuleHandle(L"kernel32.dll"), "SetDllDirectoryW"); + SetSearchPathModeFn = (SetSearchPathModePtr) GetProcAddress (GetModuleHandle(L"kernel32.dll"), "SetSearchPathMode"); + SetDefaultDllDirectoriesFn = (SetDefaultDllDirectoriesPtr) GetProcAddress (GetModuleHandle(L"kernel32.dll"), "SetDefaultDllDirectories"); + if (SetDllDirectoryFn) + SetDllDirectoryFn (L""); + if (SetSearchPathModeFn) + SetSearchPathModeFn (BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE | BASE_SEARCH_PATH_PERMANENT); + if (SetDefaultDllDirectoriesFn) + SetDefaultDllDirectoriesFn (LOAD_LIBRARY_SEARCH_SYSTEM32); + + InitOSVersionInfo(); + InitGlobalLocks (); + + LoadSystemDll_Dll (hInstaller, L"msvcrt.dll", &hmsvcrtdll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"ntmarta.dll", &hntmartadll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"MPR.DLL", &hmprdll, TRUE, SRC_POS); + if (IsOSAtLeast (WIN_7)) + { + LoadSystemDll_Dll (hInstaller, L"ProfApi.DLL", &hProfApiDll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"cryptbase.dll", &hcryptbasedll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"sspicli.dll", &hsspiclidll, TRUE, SRC_POS); + } + LoadSystemDll_Dll (hInstaller, L"psapi.dll", &hpsapidll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"secur32.dll", &hsecur32dll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"msasn1.dll", &hmsasn1dll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"Usp10.DLL", &hUsp10Dll, TRUE, SRC_POS); + if (IsOSAtLeast (WIN_7)) + LoadSystemDll_Dll (hInstaller, L"dwmapi.dll", &hdwmapidll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"UXTheme.dll", &hUXThemeDll, TRUE, SRC_POS); + + LoadSystemDll_Dll (hInstaller, L"msls31.dll", &hMsls31, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"SETUPAPI.DLL", &hSetupDll, FALSE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"SHLWAPI.DLL", &hShlwapiDll, FALSE, SRC_POS); + + LoadSystemDll_Dll (hInstaller, L"userenv.dll", &hUserenvDll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"rsaenh.dll", &hRsaenhDll, TRUE, SRC_POS); + + if (nCurrentOS < WIN_7) + { + if (nCurrentOS == WIN_XP) + { + LoadSystemDll_Dll (hInstaller, L"imm32.dll", &himm32dll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"MSCTF.dll", &hMSCTFdll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"fltlib.dll", &hfltlibdll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"wbem\\framedyn.dll", &hframedyndll, TRUE, SRC_POS); + } + + if (IsOSAtLeast (WIN_VISTA)) + { + LoadSystemDll_Dll (hInstaller, L"netapi32.dll", &hnetapi32dll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"authz.dll", &hauthzdll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"xmllite.dll", &hxmllitedll, TRUE, SRC_POS); + } + } + + if (IsOSAtLeast (WIN_VISTA)) + { + LoadSystemDll_Dll (hInstaller, L"atl.dll", &hsppdll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"vsstrace.dll", &hvsstracedll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"vssapi.dll", &vssapidll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"spp.dll", &hsppdll, TRUE, SRC_POS); + } + + LoadSystemDll_Dll (hInstaller, L"crypt32.dll", &hcrypt32dll, TRUE, SRC_POS); + + if (IsOSAtLeast (WIN_7)) + { + LoadSystemDll_Dll (hInstaller, L"CryptSP.dll", &hCryptSpDll, TRUE, SRC_POS); + + LoadSystemDll_Dll (hInstaller, L"cfgmgr32.dll", &hcfgmgr32dll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"devobj.dll", &hdevobjdll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"powrprof.dll", &hpowrprofdll, TRUE, SRC_POS); + + LoadSystemDll_Dll (hInstaller, L"bcrypt.dll", &hbcryptdll, TRUE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"bcryptprimitives.dll", &hbcryptprimitivesdll, TRUE, SRC_POS); + } + + LoadSystemDll_Dll (hInstaller, L"COMCTL32.DLL", &hComctl32Dll, FALSE, SRC_POS); + + // call InitCommonControls function + InitCommonControlsFn = (InitCommonControlsPtr) GetProcAddress (hComctl32Dll, "InitCommonControls"); + ImageList_AddFn = (ImageList_AddPtr) GetProcAddress (hComctl32Dll, "ImageList_Add"); + ImageList_CreateFn = (ImageList_CreatePtr) GetProcAddress (hComctl32Dll, "ImageList_Create"); + + if (InitCommonControlsFn && ImageList_AddFn && ImageList_CreateFn) + { + InitCommonControlsFn(); + } + else + { + MSILog(hInstaller, MSI_ERROR_LEVEL, GetString("INIT_DLL")); + bOK = FALSE; + goto end; + } + + LoadSystemDll_Dll (hInstaller, L"Riched20.dll", &hRichEditDll, FALSE, SRC_POS); + LoadSystemDll_Dll (hInstaller, L"Advapi32.dll", &hAdvapi32Dll, FALSE, SRC_POS); + + // Get SetupAPI functions pointers + SetupCloseInfFileFn = (SetupCloseInfFilePtr) GetProcAddress (hSetupDll, "SetupCloseInfFile"); + SetupDiOpenClassRegKeyFn = (SetupDiOpenClassRegKeyPtr) GetProcAddress (hSetupDll, "SetupDiOpenClassRegKey"); + SetupInstallFromInfSectionWFn = (SetupInstallFromInfSectionWPtr) GetProcAddress (hSetupDll, "SetupInstallFromInfSectionW"); + SetupOpenInfFileWFn = (SetupOpenInfFileWPtr) GetProcAddress (hSetupDll, "SetupOpenInfFileW"); + + if (!SetupCloseInfFileFn || !SetupDiOpenClassRegKeyFn || !SetupInstallFromInfSectionWFn || !SetupOpenInfFileWFn) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, GetString("INIT_DLL")); + bOK = FALSE; + goto end; + } + + // Get SHDeleteKeyW function pointer + SHDeleteKeyWFn = (SHDeleteKeyWPtr) GetProcAddress (hShlwapiDll, "SHDeleteKeyW"); + SHStrDupWFn = (SHStrDupWPtr) GetProcAddress (hShlwapiDll, "SHStrDupW"); + if (!SHDeleteKeyWFn || !SHStrDupWFn) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, GetString("INIT_DLL")); + bOK = FALSE; + goto end; + } + + if (IsOSAtLeast (WIN_VISTA)) + { + /* Get ChangeWindowMessageFilter used to enable some messages bypasss UIPI (User Interface Privilege Isolation) */ + ChangeWindowMessageFilterFn = (ChangeWindowMessageFilterPtr) GetProcAddress (GetModuleHandle (L"user32.dll"), "ChangeWindowMessageFilter"); + } + + // Get CreateProcessWithTokenW function pointer + CreateProcessWithTokenWPtr = (CreateProcessWithTokenWFn) GetProcAddress(hAdvapi32Dll, "CreateProcessWithTokenW"); + + SetErrorMode (SetErrorMode (0) | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); + CoInitialize (NULL); + + // Force language to english to read strings from the default Language.xml embedded in the DLL. + SetPreferredLangId ("en"); + bUserSetLanguage = TRUE; + LoadLanguageFromResource (0, FALSE, TRUE); + + SetUnhandledExceptionFilter (ExceptionHandler); + _set_invalid_parameter_handler (InvalidParameterHandler); + RemoteSession = GetSystemMetrics (SM_REMOTESESSION) != 0; + +end: + MSILog(hInstaller, MSI_INFO_LEVEL, L"End InitDll"); + return bOK; +} + +/* **************************************************************************** */ + +/* + * Same as Setup.c, function wWinMain(), but + * replaced unnecessary calls. + * This should be called at the beginning of each operation (install, uninstall...), + * before atexit(VC_CustomAction_Cleanup()) call. + */ +BOOL VC_CustomAction_Init(MSIHANDLE hInstaller, const wchar_t* szInstallDir) +{ + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin VC_CustomAction_Init"); + + BOOL bOK = TRUE; + + if (!InitDll(hInstaller)) + { + bOK = FALSE; + goto end; + } + + // System Restore + if (IsSystemRestoreEnabled ()) + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"System Restore is enabled"); + + wchar_t dllPath[MAX_PATH]; + if (GetSystemDirectory (dllPath, MAX_PATH)) + { + StringCbCatW(dllPath, sizeof(dllPath), L"\\srclient.dll"); + } + else + StringCbCopyW(dllPath, sizeof(dllPath), L"C:\\Windows\\System32\\srclient.dll"); + SystemRestoreDll = LoadLibrary (dllPath); + } + else + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"System Restore is not enabled"); + SystemRestoreDll = 0; + } + + // Set InstallationPath + wcsncpy(InstallationPath, szInstallDir, min(wcslen(szInstallDir), ARRAYSIZE(InstallationPath))); + +end: + MSILog(hInstaller, MSI_INFO_LEVEL, L"End VC_CustomAction_Init"); + return bOK; +} + +/* + * Same as Setup.c, function localcleanup(), but + * replaced unnecessary calls. + * This should be called at the beginning of each operation (install, uninstall...), + * as an argument to atexit() before VC_CustomAction_Init() call. + */ +void VC_CustomAction_Cleanup () +{ + //MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin VC_CustomAction_Cleanup"); + + /* Cleanup the GDI fonts */ + if (hFixedFont != NULL) + DeleteObject (hFixedFont); + if (hFixedDigitFont != NULL) + DeleteObject (hFixedDigitFont); + if (hBoldFont != NULL) + DeleteObject (hBoldFont); + if (hTitleFont != NULL) + DeleteObject (hTitleFont); + if (hUserFont != NULL) + DeleteObject (hUserFont); + if (hUserUnderlineFont != NULL) + DeleteObject (hUserUnderlineFont); + if (hUserBoldFont != NULL) + DeleteObject (hUserBoldFont); + + /* Close the device driver handle */ + if (hDriver != INVALID_HANDLE_VALUE) + { + // Unload driver mode if possible (non-install mode) + if (IsNonInstallMode ()) + { + // If a dismount was forced in the lifetime of the driver, Windows may later prevent it to be loaded again from + // the same path. Therefore, the driver will not be unloaded even though it was loaded in non-install mode. + int driverUnloadDisabled; + DWORD dwResult; + + if (!DeviceIoControl (hDriver, TC_IOCTL_IS_DRIVER_UNLOAD_DISABLED, NULL, 0, &driverUnloadDisabled, sizeof (driverUnloadDisabled), &dwResult, NULL)) + driverUnloadDisabled = 0; + + if (!driverUnloadDisabled) + DriverUnload (); + else + { + CloseHandle (hDriver); + hDriver = INVALID_HANDLE_VALUE; + } + } + else + { + CloseHandle (hDriver); + hDriver = INVALID_HANDLE_VALUE; + } + } + + CoUninitialize (); + + CloseSysEncMutex (); + + FinalizeGlobalLocks (); + + FREE_DLL (hRichEditDll); + FREE_DLL (hComctl32Dll); + FREE_DLL (hSetupDll); + FREE_DLL (hShlwapiDll); + FREE_DLL (hProfApiDll); + FREE_DLL (hUsp10Dll); + FREE_DLL (hCryptSpDll); + FREE_DLL (hUXThemeDll); + FREE_DLL (hUserenvDll); + FREE_DLL (hRsaenhDll); + FREE_DLL (himm32dll); + FREE_DLL (hMSCTFdll); + FREE_DLL (hfltlibdll); + FREE_DLL (hframedyndll); + FREE_DLL (hpsapidll); + FREE_DLL (hsecur32dll); + FREE_DLL (hnetapi32dll); + FREE_DLL (hauthzdll); + FREE_DLL (hxmllitedll); + FREE_DLL (hmprdll); + FREE_DLL (hsppdll); + FREE_DLL (vssapidll); + FREE_DLL (hvsstracedll); + FREE_DLL (hCryptSpDll); + FREE_DLL (hcfgmgr32dll); + FREE_DLL (hdevobjdll); + FREE_DLL (hpowrprofdll); + FREE_DLL (hsspiclidll); + FREE_DLL (hcryptbasedll); + FREE_DLL (hdwmapidll); + FREE_DLL (hmsasn1dll); + FREE_DLL (hcrypt32dll); + FREE_DLL (hbcryptdll); + FREE_DLL (hbcryptprimitivesdll); + FREE_DLL (hMsls31); + FREE_DLL (hntmartadll); + FREE_DLL (hwinscarddll); + FREE_DLL (hmsvcrtdll); + FREE_DLL (hAdvapi32Dll); + + //MSILog(hInstaller, MSI_INFO_LEVEL, L"End VC_CustomAction_Cleanup"); +} + +void Tokenize(const wchar_t* szInput, std::vector<std::wstring>& szTokens) +{ + std::wstringstream check(szInput); + std::wstring intermediate; + while(std::getline(check, intermediate, L'?')) + { + szTokens.push_back(intermediate); + } +} + +/* + * Same as Setup.c, function DoInstall(), but + * without the actual installation, it only prepares the system + * before the installation (before DoFilesInstall). + * It runs as a Deferred CA. + */ +EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PreInstall(MSIHANDLE hInstaller) +{ + HWND hwndDlg = NULL; + std::wstring szValueBuf = L""; + DWORD cchValueBuf = 0; + UINT uiStat = 0; + HKEY hkey = 0; + DWORD dw = 0; + BootEncryption bootEnc(NULL); + std::wstring szInstallDir = L""; + UINT uiRet = ERROR_INSTALL_FAILURE; + BOOL bOK = TRUE; + + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin VC_CustomAction_PreInstall"); + + // Get UILevel to see whether we're being installed silently or not. + // Also get INSTALLDIR to see where we're being installed. + // Since this is a Deferred CA, they are to be setup in its CustomActionData. + uiStat = MsiGetProperty(hInstaller, TEXT("CustomActionData"), (LPWSTR)TEXT(""), &cchValueBuf); + if (ERROR_MORE_DATA == uiStat) + { + ++cchValueBuf; // add 1 for null termination + szValueBuf.resize(cchValueBuf); + uiStat = MsiGetProperty(hInstaller, TEXT("CustomActionData"), &szValueBuf[0], &cchValueBuf); + if ((ERROR_SUCCESS == uiStat)) + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PreInstall: CustomActionData = '%s'", szValueBuf.c_str()); + + std::vector<std::wstring> szTokens; + Tokenize(szValueBuf.c_str(), szTokens); + + for (size_t i = 0; i < szTokens.size(); i++) + { + std::wstring szToken = szTokens[i]; + + if (wcsncmp(szToken.c_str(), L"UILEVEL=", wcslen(L"UILEVEL=")) == 0) + { + size_t index0 = szToken.find_first_of(L"="); + if (index0 != std::wstring::npos) + { + std::wstring uiLevel = szToken.substr(index0 + 1); + Silent = (stoi(uiLevel) <= 3); + + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PreInstall: UILEVEL = '%s', bSilent = '%d'", uiLevel.c_str(), Silent); + } + } + else if (wcsncmp(szToken.c_str(), L"INSTALLDIR=", wcslen(L"INSTALLDIR=")) == 0) + { + size_t index0 = szToken.find_first_of(L"="); + if (index0 != std::wstring::npos) + { + szInstallDir = szToken.substr(index0 + 1); + + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PreInstall: INSTALLDIR = '%s'", szInstallDir.c_str()); + } + } + else if (wcsncmp(szToken.c_str(), L"REINSTALL=", wcslen(L"REINSTALL=")) == 0) + { + size_t index0 = szToken.find_first_of(L"="); + if (index0 != std::wstring::npos) + { + std::wstring szReinstall = szToken.substr(index0 + 1); + bRepairMode = (wcslen(szReinstall.c_str()) != 0); + + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PreInstall: REINSTALL = '%s', bRepairMode = '%s'", szReinstall.c_str(), bRepairMode ? L"TRUE" : L"FALSE"); + } + } + } + } + } + + // Get this MSI Installer HWND. + // There cannot be 2 MSIs or more running at the same time, so we're sure we'll get ours. + // This is only possible in case of non silent install. + hwndDlg = FindWindow(L"MsiDialogCloseClass", NULL); + if (!hwndDlg && !Silent) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PreInstall: MsiDialogCloseClass not found"); + goto end; + } + + /* Start actual work */ + + if (!VC_CustomAction_Init(hInstaller, szInstallDir.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PreInstall: VC_CustomAction_Init() failed"); + goto end; + } + atexit(VC_CustomAction_Cleanup); + + bootEnc.SetParentWindow(hwndDlg); + + if (DoDriverUnload_Dll (hInstaller, hwndDlg) == FALSE) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PreInstall: DoDriverUnload_Dll() failed"); + goto end; + } + + if (bSystemRestore) + { + SetSystemRestorePoint_Dll (hInstaller, FALSE); + } + + if (bDisableSwapFiles && IsPagingFileActive_Dll (hInstaller, FALSE)) + { + if (!DisablePagingFile()) + { + handleWin32Error_Dll (hInstaller, SRC_POS); + MSILogAndShow(hInstaller, MSI_ERROR_LEVEL, GetString("FAILED_TO_DISABLE_PAGING_FILES")); + } + else + { + bRestartRequired = TRUE; + } + } + + // Remove deprecated + DoServiceUninstall_Dll (hInstaller, hwndDlg, L"VeraCryptService"); + + if (!SystemEncryptionUpdate) + DoRegUninstall_Dll (hInstaller, TRUE); + + if (UnloadDriver && DoServiceUninstall_Dll(hInstaller, hwndDlg, L"veracrypt") == FALSE) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PreInstall: DoServiceUninstall_Dll(veracrypt) failed"); + bOK = FALSE; + } + + // uiRet = MsiSetProperty(hInstaller, TEXT("ISREBOOTREQUIRED"), TEXT("1")); + // Cannot do this because this is a Deferred CA (we need Deferred so that it runs with admin privileges). + // MsiGetProperty and MsiSetProperty properties cannot be used for deferred InstallScript custom actions, + // which do not have access to the active .msi database and do not recognize any Windows Installer properties. + // They can access only the information that has been written into the execution script (CustomActionData). + // Therefore, we set the values in RegKeys that are volatile. + if (bOK) + { + if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, L"Software\\.VeraCrypt\\Values", 0, NULL, REG_OPTION_VOLATILE, KEY_WRITE, NULL, &hkey, &dw) == ERROR_SUCCESS) + { + RegSetValueEx (hkey, L"Silent", 0, REG_DWORD, (const BYTE*)(&Silent), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUninstall", 0, REG_DWORD, (const BYTE*)(&bUninstall), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDowngrade", 0, REG_DWORD, (const BYTE*)(&bDowngrade), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUninstallInProgress", 0, REG_DWORD, (const BYTE*)(&bUninstallInProgress), sizeof(BOOL)); + RegSetValueEx (hkey, L"PortableMode", 0, REG_DWORD, (const BYTE*)(&PortableMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"UnloadDriver", 0, REG_DWORD, (const BYTE*)(&UnloadDriver), sizeof(BOOL)); + + RegSetValueEx (hkey, L"Rollback", 0, REG_DWORD, (const BYTE*)(&Rollback), sizeof(BOOL)); + RegSetValueEx (hkey, L"bReinstallMode", 0, REG_DWORD, (const BYTE*)(&bReinstallMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUpgrade", 0, REG_DWORD, (const BYTE*)(&bUpgrade), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPossiblyFirstTimeInstall", 0, REG_DWORD, (const BYTE*)(&bPossiblyFirstTimeInstall), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDevm", 0, REG_DWORD, (const BYTE*)(&bDevm), sizeof(BOOL)); + RegSetValueEx (hkey, L"SystemEncryptionUpdate", 0, REG_DWORD, (const BYTE*)(&SystemEncryptionUpdate), sizeof(BOOL)); + RegSetValueEx (hkey, L"bRestartRequired", 0, REG_DWORD, (const BYTE*)(&bRestartRequired), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDisableSwapFiles", 0, REG_DWORD, (const BYTE*)(&bDisableSwapFiles), sizeof(BOOL)); + RegSetValueEx (hkey, L"bSystemRestore", 0, REG_DWORD, (const BYTE*)(&bSystemRestore), sizeof(BOOL)); + + RegSetValueEx (hkey, L"bPromptFastStartup", 0, REG_DWORD, (const BYTE*)(&bPromptFastStartup), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPromptReleaseNotes", 0, REG_DWORD, (const BYTE*)(&bPromptReleaseNotes), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPromptTutorial", 0, REG_DWORD, (const BYTE*)(&bPromptTutorial), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUpdateRescueDisk", 0, REG_DWORD, (const BYTE*)(&bUpdateRescueDisk), sizeof(BOOL)); + RegSetValueEx (hkey, L"bRepairMode", 0, REG_DWORD, (const BYTE*)(&bRepairMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUserSetLanguage", 0, REG_DWORD, (const BYTE*)(&bUserSetLanguage), sizeof(BOOL)); + + RegCloseKey (hkey); + + uiRet = ERROR_SUCCESS; + } + else + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"End VC_CustomAction_PreInstall: Could not write to registry"); + } + } + +end: + MSILog(hInstaller, MSI_INFO_LEVEL, L"End VC_CustomAction_PreInstall"); + return uiRet; +} + +/* + * Same as Setup.c, function DoInstall(), but + * without the actual installation, it only performs + * post install operations (after DoRegInstall and last parts + * of DoFilesInstall / DoRegInstall). + * It also does the Fast Startup check, shows Release Notes and + * Beginner's Tutorial if needed and sets regkey accordingly. + * It runs as a Deferred CA. + */ +EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostInstall(MSIHANDLE hInstaller) +{ + HWND hwndDlg = NULL; + std::wstring szValueBuf = L""; + DWORD cchValueBuf = 0; + UINT uiStat = 0; + HKEY hkey = 0; + DWORD dw = 0; + BootEncryption bootEnc(NULL); + std::wstring szInstallDir = L""; + UINT uiRet = ERROR_INSTALL_FAILURE; + BOOL bOK = TRUE; + WCHAR szCurrentDir[MAX_PATH]; + + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin VC_CustomAction_PostInstall"); + + // Get INSTALLDIR to see where we're being installed. + uiStat = MsiGetProperty(hInstaller, TEXT("CustomActionData"), (LPWSTR)TEXT(""), &cchValueBuf); + if (ERROR_MORE_DATA == uiStat) + { + ++cchValueBuf; // add 1 for null termination + szValueBuf.resize(cchValueBuf); + uiStat = MsiGetProperty(hInstaller, TEXT("CustomActionData"), &szValueBuf[0], &cchValueBuf); + if ((ERROR_SUCCESS == uiStat)) + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PostInstall: CustomActionData = '%s'", szValueBuf.c_str()); + if (wcsncmp(szValueBuf.c_str(), L"INSTALLDIR=", wcslen(L"INSTALLDIR=")) == 0) + { + size_t index0 = szValueBuf.find_first_of(L"="); + if (index0 != std::wstring::npos) + { + szInstallDir = szValueBuf.substr(index0 + 1); + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PostInstall: INSTALLDIR = '%s'", szInstallDir.c_str()); + } + } + } + } + + // Read RegKeys previously setup by PreInstall + if (RegOpenKeyExW (HKEY_LOCAL_MACHINE, L"Software\\.VeraCrypt\\Values", 0, KEY_READ, &hkey) == ERROR_SUCCESS) + { + DWORD cbValue = sizeof(DWORD); + DWORD dwValue = 0; + + RegQueryValueEx (hkey, L"Silent", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + Silent = (dwValue == 1); + RegQueryValueEx (hkey, L"bUninstall", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUninstall = (dwValue == 1); + RegQueryValueEx (hkey, L"bDowngrade", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bDowngrade = (dwValue == 1); + RegQueryValueEx (hkey, L"bUninstallInProgress", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUninstallInProgress = (dwValue == 1); + RegQueryValueEx (hkey, L"PortableMode", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + PortableMode = (dwValue == 1); + RegQueryValueEx (hkey, L"UnloadDriver", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + UnloadDriver = (dwValue == 1); + + RegQueryValueEx (hkey, L"Rollback", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + Rollback = (dwValue == 1); + RegQueryValueEx (hkey, L"bReinstallMode", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bReinstallMode = (dwValue == 1); + RegQueryValueEx (hkey, L"bUpgrade", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUpgrade = (dwValue == 1); + RegQueryValueEx (hkey, L"bPossiblyFirstTimeInstall", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPossiblyFirstTimeInstall = (dwValue == 1); + RegQueryValueEx (hkey, L"bDevm", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bDevm = (dwValue == 1); + RegQueryValueEx (hkey, L"SystemEncryptionUpdate", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + SystemEncryptionUpdate = (dwValue == 1); + RegQueryValueEx (hkey, L"bRestartRequired", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bRestartRequired = (dwValue == 1); + RegQueryValueEx (hkey, L"bDisableSwapFiles", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bDisableSwapFiles = (dwValue == 1); + RegQueryValueEx (hkey, L"bSystemRestore", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bSystemRestore = (dwValue == 1); + + RegQueryValueEx (hkey, L"bPromptFastStartup", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPromptFastStartup = (dwValue == 1); + RegQueryValueEx (hkey, L"bPromptReleaseNotes", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPromptReleaseNotes = (dwValue == 1); + RegQueryValueEx (hkey, L"bPromptTutorial", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPromptTutorial = (dwValue == 1); + RegQueryValueEx (hkey, L"bUpdateRescueDisk", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUpdateRescueDisk = (dwValue == 1); + RegQueryValueEx (hkey, L"bRepairMode", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bRepairMode = (dwValue == 1); + RegQueryValueEx (hkey, L"bUserSetLanguage", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUserSetLanguage = (dwValue == 1); + + RegCloseKey (hkey); + } + else + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"End VC_CustomAction_PostInstall: Could not read from registry"); + goto end; + } + + // Get this MSI Installer HWND. + // There cannot be 2 MSIs or more running at the same time, so we're sure we'll get ours. + // This is only possible in case of non silent install. + hwndDlg = FindWindow(L"MsiDialogCloseClass", NULL); + if (!hwndDlg && !Silent) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostInstall: MsiDialogCloseClass not found"); + goto end; + } + + /* Start actual work */ + + if (!VC_CustomAction_Init(hInstaller, szInstallDir.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostInstall: VC_CustomAction_Init() failed"); + goto end; + } + atexit(VC_CustomAction_Cleanup); + bootEnc.SetParentWindow(hwndDlg); + + // Last part of DoFilesInstall() + { + BOOL bResult = FALSE; + WIN32_FIND_DATA f; + HANDLE h; + wchar_t szTmp[TC_MAX_PATH]; + + StringCbPrintfW (szTmp, sizeof(szTmp), L"%s%s", szInstallDir.c_str(), L"VeraCrypt.exe"); + + if (Is64BitOs ()) + EnableWow64FsRedirection (FALSE); + + wstring servicePath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", false); + wstring serviceLegacyPath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", true); + wstring favoritesFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, false); + wstring favoritesLegacyFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, true); + + if (Is64BitOs () + && FileExists (favoritesLegacyFile.c_str()) + && !FileExists (favoritesFile.c_str())) + { + // copy the favorites XML file to the native system directory + bResult = CopyFile (favoritesLegacyFile.c_str(), favoritesFile.c_str(), FALSE); + } + else + { + bResult = TRUE; + } + + if (bResult) + { + // Update the path of the service + BootEncryption BootEncObj (hwndDlg); + + try + { + if (BootEncObj.GetDriverServiceStartType() == SERVICE_BOOT_START) + { + uint32 driverFlags = ReadDriverConfigurationFlags (); + uint32 serviceFlags = BootEncObj.ReadServiceConfigurationFlags (); + + BootEncObj.UpdateSystemFavoritesService (); + + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostInstall: INSTALLING %s", servicePath.c_str()); + + // Tell the service not to update loader on stop + BootEncObj.SetServiceConfigurationFlag (VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER, true); + + if (StartStopService_Dll (hInstaller, TC_SYSTEM_FAVORITES_SERVICE_NAME, FALSE, 0, NULL)) + { + // we tell the service not to load system favorites on startup + LPCWSTR szArgs[2] = { TC_SYSTEM_FAVORITES_SERVICE_NAME, VC_SYSTEM_FAVORITES_SERVICE_ARG_SKIP_MOUNT}; + if (!CopyFile (szTmp, servicePath.c_str(), FALSE)) + ForceCopyFile (szTmp, servicePath.c_str()); + + StartStopService_Dll (hInstaller, TC_SYSTEM_FAVORITES_SERVICE_NAME, TRUE, 2, szArgs); + } + else + ForceCopyFile (szTmp, servicePath.c_str()); + + BootEncObj.SetDriverConfigurationFlag (driverFlags, true); + + // remove the service flag if it was set originally + if (!(serviceFlags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER)) + BootEncObj.SetServiceConfigurationFlag (VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER, false); + } + } + catch (...) {} + } + + if (Is64BitOs ()) + { + // delete files from legacy path + if (FileExists (favoritesLegacyFile.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostInstall: REMOVING %s", favoritesLegacyFile.c_str()); + ForceDeleteFile (favoritesLegacyFile.c_str()); + } + + if (FileExists (serviceLegacyPath.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostInstall: REMOVING %s", serviceLegacyPath.c_str()); + ForceDeleteFile (serviceLegacyPath.c_str()); + } + + EnableWow64FsRedirection (TRUE); + } + + if (bResult == FALSE) + { + LPVOID lpMsgBuf; + DWORD dwError = GetLastError (); + wchar_t szTmp2[700]; + wchar_t szErrorValue[16]; + wchar_t* pszDesc; + + FormatMessage ( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + dwError, + MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */ + (wchar_t *) &lpMsgBuf, + 0, + NULL + ); + + if (lpMsgBuf) + pszDesc = (wchar_t*) lpMsgBuf; + else + { + StringCbPrintfW (szErrorValue, sizeof (szErrorValue), L"0x%.8X", dwError); + pszDesc = szErrorValue; + } + + if (bUninstall == FALSE) + StringCbPrintfW (szTmp2, sizeof(szTmp2), GetString ("INSTALL_OF_FAILED"), szTmp, pszDesc); + else + StringCbPrintfW (szTmp2, sizeof(szTmp2), GetString ("UNINSTALL_OF_FAILED"), szTmp, pszDesc); + + if (lpMsgBuf) LocalFree (lpMsgBuf); + + if (!Silent && MessageBoxW (hwndDlg, szTmp2, lpszTitle, MB_YESNO | MB_ICONHAND) != IDYES) + goto end; + } + + if (bUninstall == FALSE) + { + GetCurrentDirectory (MAX_PATH, szCurrentDir); // Save current dir since it will be changed + SetCurrentDirectory (szInstallDir.c_str()); + + // remove PDF from previous version if any + h = FindFirstFile (L"VeraCrypt User Guide*.pdf", &f); + + if (h != INVALID_HANDLE_VALUE) + { + do + { + StatDeleteFile (f.cFileName, TRUE); + } + while (FindNextFile(h, &f) != 0); + + FindClose (h); + } + + // remove language XML files from previous version if any + h = FindFirstFile (L"Language*.xml", &f); + + if (h != INVALID_HANDLE_VALUE) + { + do + { + StatDeleteFile (f.cFileName, TRUE); + } + while (FindNextFile(h, &f) != 0); + + FindClose (h); + } + + // remvove legacy files that are not needed anymore + for (int i = 0; i < sizeof (szLegacyFiles) / sizeof (szLegacyFiles[0]); i++) + { + StatDeleteFile (szLegacyFiles [i], TRUE); + } + + SetCurrentDirectory(szCurrentDir); + } + } + + // Last part of DoRegInstall() + { + // Register COM servers for UAC + if (IsOSAtLeast (WIN_VISTA)) + { + if (!RegisterComServers ((wchar_t*)szInstallDir.c_str())) + { + MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString("COM_REG_FAILED")); + goto end; + } + } + } + + if (UnloadDriver && DoDriverInstall_Dll(hInstaller) == FALSE) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostInstall: DoDriverInstall_Dll() failed"); + bOK = FALSE; + } + else if (SystemEncryptionUpdate && UpgradeBootLoader_Dll(hInstaller, hwndDlg) == FALSE) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostInstall: UpgradeBootLoader_Dll() failed"); + bOK = FALSE; + } + + // Shortcuts are installed by MSI, so we skip that. + + if (!UnloadDriver) + bRestartRequired = TRUE; + + try + { + bootEnc.RenameDeprecatedSystemLoaderBackup(); + } + catch (...) { } + + if (bSystemRestore) + SetSystemRestorePoint_Dll (hInstaller, TRUE); + + if (bOK) + { + MSILog(hInstaller, MSI_INFO_LEVEL, GetString("INSTALL_COMPLETED")); + } + else + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"Post install failed"); + if (!SystemEncryptionUpdate) + { + bUninstall = TRUE; + Rollback = TRUE; + Silent = TRUE; + + DoUninstall_Dll (hInstaller, hwndDlg); + + bUninstall = FALSE; + Rollback = FALSE; + Silent = FALSE; + + MSILog(hInstaller, MSI_INFO_LEVEL, GetString("ROLLBACK")); + } + else + { + MSILog(hInstaller, MSI_WARNING_LEVEL, GetString("SYS_ENC_UPGRADE_FAILED")); + } + } + + if (bOK && !bUninstall && !bDowngrade && !bRepairMode && !bDevm) + { + BOOL bHibernateEnabled = FALSE, bHiberbootEnabled = FALSE; + if (GetHibernateStatus (bHibernateEnabled, bHiberbootEnabled)) + { + if (bHiberbootEnabled) + { + bPromptFastStartup = TRUE; + } + } + + if (!IsHiddenOSRunning()) // A hidden OS user should not see the post-install notes twice (on decoy OS and then on hidden OS). + { + if (bRestartRequired || SystemEncryptionUpdate) + { + // Restart required + + if (bUpgrade) + { + SavePostInstallTasksSettings (TC_POST_INSTALL_CFG_RELEASE_NOTES); + if (bUpdateRescueDisk) + { + SavePostInstallTasksSettings (TC_POST_INSTALL_CFG_RESCUE_DISK); + } + } + else if (bPossiblyFirstTimeInstall) + { + SavePostInstallTasksSettings (TC_POST_INSTALL_CFG_TUTORIAL); + } + } + else + { + // No restart will be required + + if (bUpgrade) + { + bPromptReleaseNotes = TRUE; + } + else if (bPossiblyFirstTimeInstall) + { + bPromptTutorial = TRUE; + } + } + } + } + + if (bOK) + { + // This is part of MainDialogProc, WM_CLOSE, after PostMessage (MainDlg, bOK ? TC_APPMSG_INSTALL_SUCCESS : TC_APPMSG_INSTALL_FAILURE, 0, 0); + + /* if user selected a language, use for GUI in the next run */ + if (bUserSetLanguage) + { + WCHAR langId[6]; + MultiByteToWideChar (CP_ACP, 0, GetPreferredLangId(), -1, langId, ARRAYSIZE (langId)); + WriteRegistryString (L"Software\\VeraCrypt", L"SetupUILanguage", langId); + } + + if (bPromptFastStartup && AskWarnYesNo ("CONFIRM_DISABLE_FAST_STARTUP", hwndDlg) == IDYES) + { + WriteLocalMachineRegistryDword (L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power", L"HiberbootEnabled", 0); + bRestartRequired = TRUE; + } + bPromptFastStartup = FALSE; + + if (bPromptReleaseNotes && AskYesNo ("AFTER_UPGRADE_RELEASE_NOTES", hwndDlg) == IDYES) + { + Applink_Dll (hInstaller, "releasenotes"); + } + bPromptReleaseNotes = FALSE; + + if (bPromptTutorial && AskYesNo ("AFTER_INSTALL_TUTORIAL", hwndDlg) == IDYES) + { + Applink_Dll (hInstaller, "beginnerstutorial"); + } + bPromptTutorial = FALSE; + + if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, L"Software\\.VeraCrypt\\Values", 0, NULL, REG_OPTION_VOLATILE, KEY_WRITE, NULL, &hkey, &dw) == ERROR_SUCCESS) + { + RegSetValueEx (hkey, L"Silent", 0, REG_DWORD, (const BYTE*)(&Silent), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUninstall", 0, REG_DWORD, (const BYTE*)(&bUninstall), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDowngrade", 0, REG_DWORD, (const BYTE*)(&bDowngrade), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUninstallInProgress", 0, REG_DWORD, (const BYTE*)(&bUninstallInProgress), sizeof(BOOL)); + RegSetValueEx (hkey, L"PortableMode", 0, REG_DWORD, (const BYTE*)(&PortableMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"UnloadDriver", 0, REG_DWORD, (const BYTE*)(&UnloadDriver), sizeof(BOOL)); + + RegSetValueEx (hkey, L"Rollback", 0, REG_DWORD, (const BYTE*)(&Rollback), sizeof(BOOL)); + RegSetValueEx (hkey, L"bReinstallMode", 0, REG_DWORD, (const BYTE*)(&bReinstallMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUpgrade", 0, REG_DWORD, (const BYTE*)(&bUpgrade), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPossiblyFirstTimeInstall", 0, REG_DWORD, (const BYTE*)(&bPossiblyFirstTimeInstall), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDevm", 0, REG_DWORD, (const BYTE*)(&bDevm), sizeof(BOOL)); + RegSetValueEx (hkey, L"SystemEncryptionUpdate", 0, REG_DWORD, (const BYTE*)(&SystemEncryptionUpdate), sizeof(BOOL)); + RegSetValueEx (hkey, L"bRestartRequired", 0, REG_DWORD, (const BYTE*)(&bRestartRequired), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDisableSwapFiles", 0, REG_DWORD, (const BYTE*)(&bDisableSwapFiles), sizeof(BOOL)); + RegSetValueEx (hkey, L"bSystemRestore", 0, REG_DWORD, (const BYTE*)(&bSystemRestore), sizeof(BOOL)); + + RegSetValueEx (hkey, L"bPromptFastStartup", 0, REG_DWORD, (const BYTE*)(&bPromptFastStartup), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPromptReleaseNotes", 0, REG_DWORD, (const BYTE*)(&bPromptReleaseNotes), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPromptTutorial", 0, REG_DWORD, (const BYTE*)(&bPromptTutorial), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUpdateRescueDisk", 0, REG_DWORD, (const BYTE*)(&bUpdateRescueDisk), sizeof(BOOL)); + RegSetValueEx (hkey, L"bRepairMode", 0, REG_DWORD, (const BYTE*)(&bRepairMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUserSetLanguage", 0, REG_DWORD, (const BYTE*)(&bUserSetLanguage), sizeof(BOOL)); + + RegCloseKey (hkey); + + uiRet = ERROR_SUCCESS; + } + else + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"End VC_CustomAction_PostInstall: Could not write to registry"); + } + } +end: + + MSILog(hInstaller, MSI_INFO_LEVEL, L"End VC_CustomAction_PostInstall"); + return uiRet; +} + +/* + * Same as Setup.c, function DoUninstall(), but + * without the actual uninstall, it only prepares the system + * before the uninstall (before DoFilesInstall). + * It runs as a Deferred CA. + */ +EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PreUninstall(MSIHANDLE hInstaller) +{ + HWND hwndDlg = NULL; + std::wstring szValueBuf = L""; + DWORD cchValueBuf = 0; + UINT uiStat = 0; + HKEY hkey = 0; + DWORD dw = 0; + BootEncryption bootEnc(NULL); + std::wstring szInstallDir = L""; + UINT uiRet = ERROR_INSTALL_FAILURE; + BOOL bTempSkipSysRestore = FALSE; + BOOL bOK = TRUE; + + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin VC_CustomAction_PreUninstall"); + + // Get UILevel to see whether we're being installed silently or not. + // Also get INSTALLDIR to see where we're being installed. + // Since this is a Deferred CA, they are to be setup in its CustomActionData. + uiStat = MsiGetProperty(hInstaller, TEXT("CustomActionData"), (LPWSTR)TEXT(""), &cchValueBuf); + if (ERROR_MORE_DATA == uiStat) + { + ++cchValueBuf; // add 1 for null termination + szValueBuf.resize(cchValueBuf); + uiStat = MsiGetProperty(hInstaller, TEXT("CustomActionData"), &szValueBuf[0], &cchValueBuf); + if ((ERROR_SUCCESS == uiStat)) + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PreUninstall: CustomActionData = '%s'", szValueBuf.c_str()); + + std::vector<std::wstring> szTokens; + Tokenize(szValueBuf.c_str(), szTokens); + + for (size_t i = 0; i < szTokens.size(); i++) + { + std::wstring szToken = szTokens[i]; + + if (wcsncmp(szToken.c_str(), L"UILEVEL=", wcslen(L"UILEVEL=")) == 0) + { + size_t index0 = szToken.find_first_of(L"="); + if (index0 != std::wstring::npos) + { + std::wstring uiLevel = szToken.substr(index0 + 1); + Silent = (stoi(uiLevel) <= 3); + + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PreInstall: UILEVEL = '%s', bSilent = '%d'", uiLevel.c_str(), Silent); + } + } + else if (wcsncmp(szToken.c_str(), L"INSTALLDIR=", wcslen(L"INSTALLDIR=")) == 0) + { + size_t index0 = szToken.find_first_of(L"="); + if (index0 != std::wstring::npos) + { + szInstallDir = szToken.substr(index0 + 1); + + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PreInstall: INSTALLDIR = '%s'", szInstallDir.c_str()); + } + } + else if (wcsncmp(szToken.c_str(), L"REINSTALL=", wcslen(L"REINSTALL=")) == 0) + { + size_t index0 = szToken.find_first_of(L"="); + if (index0 != std::wstring::npos) + { + std::wstring szReinstall = szToken.substr(index0 + 1); + bRepairMode = (wcslen(szReinstall.c_str()) != 0); + + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PreInstall: REINSTALL = '%s', bRepairMode = '%s'", szReinstall.c_str(), bRepairMode ? L"TRUE" : L"FALSE"); + } + } + } + } + } + + // Get this MSI Installer HWND. + // There cannot be 2 MSIs or more running at the same time, so we're sure we'll get ours. + // This is only possible in case of non silent install. + hwndDlg = FindWindow(L"MsiDialogCloseClass", NULL); + if (!hwndDlg && !Silent) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PreUninstall: MsiDialogCloseClass not found"); + goto end; + } + + /* Start actual work */ + + bUninstall = TRUE; + if (!VC_CustomAction_Init(hInstaller, szInstallDir.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PreUninstall: VC_CustomAction_Init() failed"); + goto end; + } + atexit(VC_CustomAction_Cleanup); + bootEnc.SetParentWindow(hwndDlg); + + if (DoDriverUnload_Dll(hInstaller, hwndDlg) == FALSE) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PreUninstall: DoDriverUnload_Dll() failed"); + bOK = FALSE; + bTempSkipSysRestore = TRUE; // Volumes are possibly mounted; defer System Restore point creation for this uninstall attempt. + } + else + { + if (!Rollback && bSystemRestore && !bTempSkipSysRestore) + SetSystemRestorePoint_Dll (hInstaller, FALSE); + + if (DoServiceUninstall_Dll (hInstaller, hwndDlg, L"veracrypt") == FALSE) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PreUninstall: DoServiceUninstall_Dll(veracrypt) failed"); + bOK = FALSE; + } + // DoRegUninstall_Dll removes regkeys that are not linked to MSI + // We need to do this in PreUninstall instead of in PostUninstall so that UnregisterComServers works, + // because in PostUninstall the "VeraCrypt COMReg.exe" is removed and UnregisterComServers will fail. + else if (DoRegUninstall_Dll (hInstaller, FALSE) == FALSE) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PreUninstall: DoRegUninstall_Dll() failed"); + bOK = FALSE; + } + } + + if (bOK) + { + // uiRet = MsiSetProperty(hInstaller, TEXT("ISREBOOTREQUIRED"), TEXT("1")); + // Cannot do this because this is a Deferred CA (we need Deferred so that it runs with admin privileges). + // MsiGetProperty and MsiSetProperty properties cannot be used for deferred InstallScript custom actions, + // which do not have access to the active .msi database and do not recognize any Windows Installer properties. + // They can access only the information that has been written into the execution script (CustomActionData). + // Therefore, we set the values in RegKeys that are volatile. + if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, L"Software\\.VeraCrypt\\Values", 0, NULL, REG_OPTION_VOLATILE, KEY_WRITE, NULL, &hkey, &dw) == ERROR_SUCCESS) + { + RegSetValueEx (hkey, L"Silent", 0, REG_DWORD, (const BYTE*)(&Silent), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUninstall", 0, REG_DWORD, (const BYTE*)(&bUninstall), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDowngrade", 0, REG_DWORD, (const BYTE*)(&bDowngrade), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUninstallInProgress", 0, REG_DWORD, (const BYTE*)(&bUninstallInProgress), sizeof(BOOL)); + RegSetValueEx (hkey, L"PortableMode", 0, REG_DWORD, (const BYTE*)(&PortableMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"UnloadDriver", 0, REG_DWORD, (const BYTE*)(&UnloadDriver), sizeof(BOOL)); + + RegSetValueEx (hkey, L"Rollback", 0, REG_DWORD, (const BYTE*)(&Rollback), sizeof(BOOL)); + RegSetValueEx (hkey, L"bReinstallMode", 0, REG_DWORD, (const BYTE*)(&bReinstallMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUpgrade", 0, REG_DWORD, (const BYTE*)(&bUpgrade), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPossiblyFirstTimeInstall", 0, REG_DWORD, (const BYTE*)(&bPossiblyFirstTimeInstall), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDevm", 0, REG_DWORD, (const BYTE*)(&bDevm), sizeof(BOOL)); + RegSetValueEx (hkey, L"SystemEncryptionUpdate", 0, REG_DWORD, (const BYTE*)(&SystemEncryptionUpdate), sizeof(BOOL)); + RegSetValueEx (hkey, L"bRestartRequired", 0, REG_DWORD, (const BYTE*)(&bRestartRequired), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDisableSwapFiles", 0, REG_DWORD, (const BYTE*)(&bDisableSwapFiles), sizeof(BOOL)); + RegSetValueEx (hkey, L"bSystemRestore", 0, REG_DWORD, (const BYTE*)(&bSystemRestore), sizeof(BOOL)); + + RegSetValueEx (hkey, L"bPromptFastStartup", 0, REG_DWORD, (const BYTE*)(&bPromptFastStartup), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPromptReleaseNotes", 0, REG_DWORD, (const BYTE*)(&bPromptReleaseNotes), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPromptTutorial", 0, REG_DWORD, (const BYTE*)(&bPromptTutorial), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUpdateRescueDisk", 0, REG_DWORD, (const BYTE*)(&bUpdateRescueDisk), sizeof(BOOL)); + RegSetValueEx (hkey, L"bRepairMode", 0, REG_DWORD, (const BYTE*)(&bRepairMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUserSetLanguage", 0, REG_DWORD, (const BYTE*)(&bUserSetLanguage), sizeof(BOOL)); + + RegCloseKey (hkey); + + uiRet = ERROR_SUCCESS; + } + else + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"End VC_CustomAction_PreUninstall: Could not write to registry"); + } + } + +end: + MSILog(hInstaller, MSI_INFO_LEVEL, L"End VC_CustomAction_PreUninstall"); + return uiRet; +} + +/* + * Same as Setup.c, function DoUninstall(), but + * without the actual installation, it only performs + * post install operations (after DoFilesInstall and last parts + * of DoFilesInstall / DoRegUninstall). + * It also sets regkey accordingly. + * It runs as a Deferred CA. + */ +EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostUninstall(MSIHANDLE hInstaller) +{ + HWND hwndDlg = NULL; + std::wstring szValueBuf = L""; + DWORD cchValueBuf = 0; + UINT uiStat = 0; + HKEY hkey = 0; + DWORD dw = 0; + BootEncryption bootEnc(NULL); + std::wstring szInstallDir = L""; + UINT uiRet = ERROR_INSTALL_FAILURE; + BOOL bTempSkipSysRestore = FALSE; + BOOL bOK = TRUE; + + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin VC_CustomAction_PostUninstall"); + + // Get INSTALLDIR to see where we're being installed. + uiStat = MsiGetProperty(hInstaller, TEXT("CustomActionData"), (LPWSTR)TEXT(""), &cchValueBuf); + if (ERROR_MORE_DATA == uiStat) + { + ++cchValueBuf; // add 1 for null termination + szValueBuf.resize(cchValueBuf); + uiStat = MsiGetProperty(hInstaller, TEXT("CustomActionData"), &szValueBuf[0], &cchValueBuf); + if ((ERROR_SUCCESS == uiStat)) + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PostUninstall: CustomActionData = '%s'", szValueBuf.c_str()); + if (wcsncmp(szValueBuf.c_str(), L"INSTALLDIR=", wcslen(L"INSTALLDIR=")) == 0) + { + size_t index0 = szValueBuf.find_first_of(L"="); + if (index0 != std::wstring::npos) + { + szInstallDir = szValueBuf.substr(index0 + 1); + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_PostUninstall: INSTALLDIR = '%s'", szInstallDir.c_str()); + } + } + } + } + + // Read RegKeys previously setup by PreInstall + if (RegOpenKeyExW (HKEY_LOCAL_MACHINE, L"Software\\.VeraCrypt\\Values", 0, KEY_READ, &hkey) == ERROR_SUCCESS) + { + DWORD cbValue = sizeof(DWORD); + DWORD dwValue = 0; + + RegQueryValueEx (hkey, L"Silent", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + Silent = (dwValue == 1); + RegQueryValueEx (hkey, L"bUninstall", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUninstall = (dwValue == 1); + RegQueryValueEx (hkey, L"bDowngrade", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bDowngrade = (dwValue == 1); + RegQueryValueEx (hkey, L"bUninstallInProgress", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUninstallInProgress = (dwValue == 1); + RegQueryValueEx (hkey, L"PortableMode", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + PortableMode = (dwValue == 1); + RegQueryValueEx (hkey, L"UnloadDriver", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + UnloadDriver = (dwValue == 1); + + RegQueryValueEx (hkey, L"Rollback", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + Rollback = (dwValue == 1); + RegQueryValueEx (hkey, L"bReinstallMode", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bReinstallMode = (dwValue == 1); + RegQueryValueEx (hkey, L"bUpgrade", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUpgrade = (dwValue == 1); + RegQueryValueEx (hkey, L"bPossiblyFirstTimeInstall", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPossiblyFirstTimeInstall = (dwValue == 1); + RegQueryValueEx (hkey, L"bDevm", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bDevm = (dwValue == 1); + RegQueryValueEx (hkey, L"SystemEncryptionUpdate", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + SystemEncryptionUpdate = (dwValue == 1); + RegQueryValueEx (hkey, L"bRestartRequired", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bRestartRequired = (dwValue == 1); + RegQueryValueEx (hkey, L"bDisableSwapFiles", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bDisableSwapFiles = (dwValue == 1); + RegQueryValueEx (hkey, L"bSystemRestore", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bSystemRestore = (dwValue == 1); + + RegQueryValueEx (hkey, L"bPromptFastStartup", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPromptFastStartup = (dwValue == 1); + RegQueryValueEx (hkey, L"bPromptReleaseNotes", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPromptReleaseNotes = (dwValue == 1); + RegQueryValueEx (hkey, L"bPromptTutorial", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPromptTutorial = (dwValue == 1); + RegQueryValueEx (hkey, L"bUpdateRescueDisk", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUpdateRescueDisk = (dwValue == 1); + RegQueryValueEx (hkey, L"bRepairMode", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bRepairMode = (dwValue == 1); + RegQueryValueEx (hkey, L"bUserSetLanguage", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUserSetLanguage = (dwValue == 1); + + RegCloseKey (hkey); + } + else + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"End VC_CustomAction_PostUninstall: Could not read from registry"); + goto end; + } + + // Get this MSI Installer HWND. + // There cannot be 2 MSIs or more running at the same time, so we're sure we'll get ours. + // This is only possible in case of non silent install. + hwndDlg = FindWindow(L"MsiDialogCloseClass", NULL); + if (!hwndDlg && !Silent) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: MsiDialogCloseClass not found"); + goto end; + } + + /* Start actual work */ + + bUninstall = TRUE; + if (!VC_CustomAction_Init(hInstaller, szInstallDir.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: VC_CustomAction_Init() failed"); + goto end; + } + atexit(VC_CustomAction_Cleanup); + bootEnc.SetParentWindow(hwndDlg); + + if (!DoApplicationDataUninstall_Dll (hInstaller)) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: DoApplicationDataUninstall_Dll() failed"); + bOK = FALSE; + } + else + { + // Deprecated service + DoServiceUninstall_Dll (hInstaller, hwndDlg, L"VeraCryptService"); + } + + // Last part of DoFilesInstall() + { + if (Is64BitOs ()) + EnableWow64FsRedirection (FALSE); + + wstring servicePath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", false); + wstring serviceLegacyPath = GetServiceConfigPath (_T(TC_APP_NAME) L".exe", true); + wstring favoritesFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, false); + wstring favoritesLegacyFile = GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES, true); + + // delete all files related to system favorites service + if (FileExists (favoritesFile.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: REMOVING %s", favoritesFile.c_str()); + ForceDeleteFile (favoritesFile.c_str()); + } + + if (FileExists (servicePath.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: REMOVING %s", servicePath.c_str()); + ForceDeleteFile (servicePath.c_str()); + } + + if (Is64BitOs ()) + { + if (FileExists (favoritesLegacyFile.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: REMOVING %s", favoritesLegacyFile.c_str()); + ForceDeleteFile (favoritesLegacyFile.c_str()); + } + + if (FileExists (serviceLegacyPath.c_str())) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_PostUninstall: REMOVING %s", serviceLegacyPath.c_str()); + ForceDeleteFile (serviceLegacyPath.c_str()); + } + + EnableWow64FsRedirection (TRUE); + } + } + + if (bSystemRestore && !bTempSkipSysRestore) + SetSystemRestorePoint_Dll (hInstaller, TRUE); + + if (bOK) + { + // uiRet = MsiSetProperty(hInstaller, TEXT("ISREBOOTREQUIRED"), TEXT("1")); + // Cannot do this because this is a Deferred CA (we need Deferred so that it runs with admin privileges). + // MsiGetProperty and MsiSetProperty properties cannot be used for deferred InstallScript custom actions, + // which do not have access to the active .msi database and do not recognize any Windows Installer properties. + // They can access only the information that has been written into the execution script (CustomActionData). + // Therefore, we set the values in RegKeys that are volatile. + if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, L"Software\\.VeraCrypt\\Values", 0, NULL, REG_OPTION_VOLATILE, KEY_WRITE, NULL, &hkey, &dw) == ERROR_SUCCESS) + { + RegSetValueEx (hkey, L"Silent", 0, REG_DWORD, (const BYTE*)(&Silent), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUninstall", 0, REG_DWORD, (const BYTE*)(&bUninstall), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDowngrade", 0, REG_DWORD, (const BYTE*)(&bDowngrade), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUninstallInProgress", 0, REG_DWORD, (const BYTE*)(&bUninstallInProgress), sizeof(BOOL)); + RegSetValueEx (hkey, L"PortableMode", 0, REG_DWORD, (const BYTE*)(&PortableMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"UnloadDriver", 0, REG_DWORD, (const BYTE*)(&UnloadDriver), sizeof(BOOL)); + + RegSetValueEx (hkey, L"Rollback", 0, REG_DWORD, (const BYTE*)(&Rollback), sizeof(BOOL)); + RegSetValueEx (hkey, L"bReinstallMode", 0, REG_DWORD, (const BYTE*)(&bReinstallMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUpgrade", 0, REG_DWORD, (const BYTE*)(&bUpgrade), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPossiblyFirstTimeInstall", 0, REG_DWORD, (const BYTE*)(&bPossiblyFirstTimeInstall), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDevm", 0, REG_DWORD, (const BYTE*)(&bDevm), sizeof(BOOL)); + RegSetValueEx (hkey, L"SystemEncryptionUpdate", 0, REG_DWORD, (const BYTE*)(&SystemEncryptionUpdate), sizeof(BOOL)); + RegSetValueEx (hkey, L"bRestartRequired", 0, REG_DWORD, (const BYTE*)(&bRestartRequired), sizeof(BOOL)); + RegSetValueEx (hkey, L"bDisableSwapFiles", 0, REG_DWORD, (const BYTE*)(&bDisableSwapFiles), sizeof(BOOL)); + RegSetValueEx (hkey, L"bSystemRestore", 0, REG_DWORD, (const BYTE*)(&bSystemRestore), sizeof(BOOL)); + + RegSetValueEx (hkey, L"bPromptFastStartup", 0, REG_DWORD, (const BYTE*)(&bPromptFastStartup), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPromptReleaseNotes", 0, REG_DWORD, (const BYTE*)(&bPromptReleaseNotes), sizeof(BOOL)); + RegSetValueEx (hkey, L"bPromptTutorial", 0, REG_DWORD, (const BYTE*)(&bPromptTutorial), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUpdateRescueDisk", 0, REG_DWORD, (const BYTE*)(&bUpdateRescueDisk), sizeof(BOOL)); + RegSetValueEx (hkey, L"bRepairMode", 0, REG_DWORD, (const BYTE*)(&bRepairMode), sizeof(BOOL)); + RegSetValueEx (hkey, L"bUserSetLanguage", 0, REG_DWORD, (const BYTE*)(&bUserSetLanguage), sizeof(BOOL)); + + RegCloseKey (hkey); + + uiRet = ERROR_SUCCESS; + } + else + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"End VC_CustomAction_PostUninstall: Could not write to registry"); + } + } + else + bUninstallInProgress = FALSE; + +end: + MSILog(hInstaller, MSI_INFO_LEVEL, L"End VC_CustomAction_PostUninstall"); + return uiRet; +} + +/* Runs as a Commit CA : therefore, we can get / set properties that are defined in WiX. + * It sets ISREBOOTREQUIRED Wix Property accordingly and refreshes extensions list + * if REGISTERVCFILEEXT is set. + */ +EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_DoChecks(MSIHANDLE hInstaller) +{ + HWND hwndDlg = NULL; + std::wstring szValueBuf = L""; + DWORD cchValueBuf = 0; + UINT uiStat = 0; + HKEY hkey = 0; + DWORD dw = 0; + std::wstring szInstallDir = L""; + BOOL bRefreshExts = FALSE; + UINT uiRet = ERROR_INSTALL_FAILURE; + + MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin VC_CustomAction_DoChecks"); + + // Get WIXUI_INSTALLDIR to see where we're being installed + uiStat = MsiGetProperty(hInstaller, TEXT("APPLICATIONROOTFOLDER"), (LPWSTR)TEXT(""), &cchValueBuf); + if (ERROR_MORE_DATA == uiStat) + { + ++cchValueBuf; // add 1 for null termination + szValueBuf.resize(cchValueBuf); + uiStat = MsiGetProperty(hInstaller, TEXT("APPLICATIONROOTFOLDER"), &szValueBuf[0], &cchValueBuf); + if ((ERROR_SUCCESS == uiStat)) + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_DoChecks: APPLICATIONROOTFOLDER = '%s'", szValueBuf.c_str()); + szInstallDir = szValueBuf; + } + } + + // Get REGISTERVCFILEEXT to see whether we should refresh extensions list. + szValueBuf.clear(); + cchValueBuf = 0; + uiStat = MsiGetProperty(hInstaller, TEXT("REGISTERVCFILEEXT"), (LPWSTR)TEXT(""), &cchValueBuf); + if (ERROR_MORE_DATA == uiStat) + { + ++cchValueBuf; // add 1 for null termination + szValueBuf.resize(cchValueBuf); + uiStat = MsiGetProperty(hInstaller, TEXT("REGISTERVCFILEEXT"), &szValueBuf[0], &cchValueBuf); + if ((ERROR_SUCCESS == uiStat)) + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_DoChecks: REGISTERVCFILEEXT = '%s'", szValueBuf.c_str()); + bRefreshExts = (szValueBuf[0] == L'1'); + } + } + + // Read RegKeys previously setup by Pre/Post-Install + if (RegOpenKeyExW (HKEY_LOCAL_MACHINE, L"Software\\.VeraCrypt\\Values", 0, KEY_READ, &hkey) == ERROR_SUCCESS) + { + DWORD cbValue = sizeof(DWORD); + DWORD dwValue = 0; + + RegQueryValueEx (hkey, L"Silent", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + Silent = (dwValue == 1); + RegQueryValueEx (hkey, L"bUninstall", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUninstall = (dwValue == 1); + RegQueryValueEx (hkey, L"bDowngrade", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bDowngrade = (dwValue == 1); + RegQueryValueEx (hkey, L"bUninstallInProgress", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUninstallInProgress = (dwValue == 1); + RegQueryValueEx (hkey, L"PortableMode", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + PortableMode = (dwValue == 1); + RegQueryValueEx (hkey, L"UnloadDriver", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + UnloadDriver = (dwValue == 1); + + RegQueryValueEx (hkey, L"Rollback", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + Rollback = (dwValue == 1); + RegQueryValueEx (hkey, L"bReinstallMode", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bReinstallMode = (dwValue == 1); + RegQueryValueEx (hkey, L"bUpgrade", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUpgrade = (dwValue == 1); + RegQueryValueEx (hkey, L"bPossiblyFirstTimeInstall", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPossiblyFirstTimeInstall = (dwValue == 1); + RegQueryValueEx (hkey, L"bDevm", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bDevm = (dwValue == 1); + RegQueryValueEx (hkey, L"SystemEncryptionUpdate", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + SystemEncryptionUpdate = (dwValue == 1); + RegQueryValueEx (hkey, L"bRestartRequired", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bRestartRequired = (dwValue == 1); + RegQueryValueEx (hkey, L"bDisableSwapFiles", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bDisableSwapFiles = (dwValue == 1); + RegQueryValueEx (hkey, L"bSystemRestore", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bSystemRestore = (dwValue == 1); + + RegQueryValueEx (hkey, L"bPromptFastStartup", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPromptFastStartup = (dwValue == 1); + RegQueryValueEx (hkey, L"bPromptReleaseNotes", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPromptReleaseNotes = (dwValue == 1); + RegQueryValueEx (hkey, L"bPromptTutorial", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bPromptTutorial = (dwValue == 1); + RegQueryValueEx (hkey, L"bUpdateRescueDisk", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUpdateRescueDisk = (dwValue == 1); + RegQueryValueEx (hkey, L"bRepairMode", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bRepairMode = (dwValue == 1); + RegQueryValueEx (hkey, L"bUserSetLanguage", NULL, NULL, (LPBYTE) &dwValue, &cbValue); + bUserSetLanguage = (dwValue == 1); + + RegCloseKey (hkey); + } + else + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"End VC_CustomAction_DoChecks: Could not read from registry"); + goto end; + } + + // Get this MSI Installer HWND. + // There cannot be 2 MSIs or more running at the same time, so we're sure we'll get ours. + // This is only possible in case of non silent install. + hwndDlg = FindWindow(L"MsiDialogCloseClass", NULL); + if (!hwndDlg && !Silent) + { + MSILog(hInstaller, MSI_ERROR_LEVEL, L"VC_CustomAction_DoChecks: MsiDialogCloseClass not found"); + goto end; + } + + /* Start actual work */ + + if (bRefreshExts) + { + MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_DoChecks: Will refresh file extensions"); + SHChangeNotify (SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); + } + + // Check if reboot was required by the pre/post-install and set Wix property ISREBOOTREQUIRED accordingly. + if (bRestartRequired) + { + uiRet = MsiSetProperty(hInstaller, L"ISREBOOTREQUIRED", L"1"); + } + else + { + uiRet = ERROR_SUCCESS; + } + + // Remove volatile regkeys + SHDeleteKey(HKEY_LOCAL_MACHINE, L"Software\\.VeraCrypt"); + +end: + MSILog(hInstaller, MSI_INFO_LEVEL, L"End VC_CustomAction_DoChecks"); + return uiRet; +} + +BOOL +WINAPI +DllMain( + HMODULE hInstDLL, + DWORD dwReason, + LPVOID lpvReserved) +{ + UNREFERENCED_PARAMETER(lpvReserved); + + /* Save the instance handle for later, + * especially for loading embedded Language.xml file + * in Dlgcode.c, MapResource() function. + */ + hInst = hInstDLL; + + return TRUE; +}
\ No newline at end of file diff --git a/src/SetupDLL/Setup.h b/src/SetupDLL/Setup.h new file mode 100644 index 00000000..e38dd75a --- /dev/null +++ b/src/SetupDLL/Setup.h @@ -0,0 +1,137 @@ +/* + Legal Notice: Some portions of the source code contained in this file were + derived from the source code of TrueCrypt 7.1a, which is + Copyright (c) 2003-2012 TrueCrypt Developers Association and which is + governed by the TrueCrypt License 3.0, also from the source code of + Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux + and which is governed by the 'License Agreement for Encryption for the Masses' + Modifications and additions to the original source code (contained in this file) + and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and are governed by the Apache License 2.0 the full text of which is + contained in the file License.txt included in VeraCrypt binary and source + code distribution packages. */ + +#ifndef SETUP_H +#define SETUP_H + +#ifdef __cplusplus +extern "C" { +#endif + +// Specifies what files to install, where (determined by the prefix), and in what order +static wchar_t *szFiles[]= +{ + L"ALicense.txt", + L"ALICENSE", + L"ANOTICE", + L"AVeraCrypt.exe", + L"AVeraCryptExpander.exe", + L"AVeraCrypt Format.exe", + L"Averacrypt.inf", + L"Averacrypt.cat", + L"Averacrypt.sys", + L"Dveracrypt.sys", + L"AVeraCrypt Setup.exe", + L"XLanguages.zip", + L"Xdocs.zip", +}; + +// Specifies what files are included in self-extracting packages (no other files will be packaged or extracted). +static wchar_t *szCompressedFiles[]= +{ + L"License.txt", + L"LICENSE", + L"NOTICE", + L"VeraCrypt.exe", + L"VeraCryptExpander.exe", + L"VeraCrypt Format.exe", + L"VeraCrypt-x64.exe", + L"VeraCryptExpander-x64.exe", + L"VeraCrypt Format-x64.exe", + L"VeraCrypt-arm64.exe", + L"VeraCryptExpander-arm64.exe", + L"VeraCrypt Format-arm64.exe", + L"veracrypt.inf", + L"veracrypt.cat", + L"veracrypt.sys", + L"veracrypt-x64.cat", + L"veracrypt-x64.sys", + L"veracrypt-arm64.cat", + L"veracrypt-arm64.sys", + L"Languages.zip", + L"docs.zip" +}; + +// Specifies what legacy files to remove during install +static wchar_t *szLegacyFiles[]= +{ + L"VeraCrypt-x86.exe", + L"VeraCryptExpander-x86.exe", + L"VeraCrypt Format-x86.exe", + L"VeraCrypt-x64.exe", + L"VeraCryptExpander-x64.exe", + L"VeraCrypt Format-x64.exe", + L"veracrypt-x64.sys", +}; + +#define FILENAME_64BIT_DRIVER L"veracrypt-x64.sys" +#define NBR_COMPRESSED_FILES (sizeof(szCompressedFiles) / sizeof(szCompressedFiles[0])) + +void localcleanup (void); +BOOL StatDeleteFile ( wchar_t *lpszFile, BOOL bCheckForOldFile ); +BOOL StatRemoveDirectory ( wchar_t *lpszDir ); +HRESULT CreateLink ( wchar_t *lpszPathObj , wchar_t *lpszArguments , wchar_t *lpszPathLink ); +void GetProgramPath ( HWND hwndDlg , wchar_t *path ); +void StatusMessage (HWND hwndDlg, char *stringId); +void StatusMessageParam (HWND hwndDlg, char *stringId, const wchar_t *param); +void ClearLogWindow (HWND hwndDlg); +void RegMessage ( HWND hwndDlg , const wchar_t *txt ); +void RegRemoveMessage (HWND hwndDlg, const wchar_t *txt); +void _cdecl CopyMessage ( HWND hwndDlg , const wchar_t *txt ); +void RemoveMessage ( HWND hwndDlg , const wchar_t *txt ); +void IconMessage ( HWND hwndDlg , const wchar_t *txt ); +static int CALLBACK BrowseCallbackProc ( HWND hwnd , UINT uMsg , LPARAM lp , LPARAM pData ); +void LoadLicense ( HWND hwndDlg ); +void DetermineUpgradeDowngradeStatus (BOOL bCloseDriverHandle, LONG *driverVersionPtr); +BOOL DoFilesInstall ( HWND hwndDlg , wchar_t *szDestDir ); +BOOL DoRegInstall ( HWND hwndDlg , wchar_t *szDestDir , BOOL bInstallType ); +BOOL DoRegUninstall (HWND hwndDlg, BOOL bRemoveDeprecated); +BOOL DoServiceUninstall ( HWND hwndDlg , wchar_t *lpszService ); +BOOL DoDriverUnload ( HWND hwndDlg ); +BOOL DoShortcutsInstall ( HWND hwndDlg , wchar_t *szDestDir , BOOL bProgGroup, BOOL bDesktopIcon ); +BOOL DoShortcutsUninstall (HWND hwndDlg, wchar_t *szDestDir); +void OutcomePrompt ( HWND hwndDlg , BOOL bOK ); +void DoUninstall ( void *hwndDlg ); +void DoInstall ( void *hwndDlg ); +void SetInstallationPath (HWND hwndDlg); +BOOL UpgradeBootLoader (HWND hwndDlg); +BOOL CALLBACK InstallDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam ); +#ifdef VC_EFI_CUSTOM_MODE +BOOL CheckSecureBootCompatibility (HWND hWnd); +#endif + +extern BOOL bDevm; +extern BOOL Rollback; +extern BOOL bUpgrade; +extern BOOL bUpdateRescueDisk; +extern BOOL bPossiblyFirstTimeInstall; +extern BOOL bRepairMode; +extern BOOL bReinstallMode; +extern BOOL bSystemRestore; +extern BOOL bDisableSwapFiles; +extern BOOL bForAllUsers; +extern BOOL bRegisterFileExt; +extern BOOL bAddToStartMenu; +extern BOOL bDesktopIcon; +extern BOOL bDesktopIconStatusDetermined; +extern BOOL SystemEncryptionUpdate; +extern BOOL bRestartRequired; +extern HMODULE volatile SystemRestoreDll; +extern wchar_t InstallationPath[TC_MAX_PATH]; +extern wchar_t SetupFilesDir[TC_MAX_PATH]; + +#ifdef __cplusplus +} +#endif + +#endif // #ifndef SETUP_H diff --git a/src/SetupDLL/Setup.ico b/src/SetupDLL/Setup.ico Binary files differnew file mode 100644 index 00000000..8fd81cd3 --- /dev/null +++ b/src/SetupDLL/Setup.ico diff --git a/src/SetupDLL/Setup.manifest b/src/SetupDLL/Setup.manifest new file mode 100644 index 00000000..afd4c1c0 --- /dev/null +++ b/src/SetupDLL/Setup.manifest @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> + <security> + <requestedPrivileges> + <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/> + </requestedPrivileges> + </security> + </trustInfo> + <asmv3:application> + <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> + <dpiAware>true</dpiAware> + </asmv3:windowsSettings> + </asmv3:application> + <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> + <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> + </application> + </compatibility> + <dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="*" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> + </dependency> +</assembly>
\ No newline at end of file diff --git a/src/SetupDLL/Setup.rc b/src/SetupDLL/Setup.rc new file mode 100644 index 00000000..6e1a5312 --- /dev/null +++ b/src/SetupDLL/Setup.rc @@ -0,0 +1,367 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" +#include "..\\common\\resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,24,25,0 + PRODUCTVERSION 1,24,25,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "IDRIX" + VALUE "FileDescription", "VeraCryptSetup" + VALUE "FileVersion", "1.24-Update9" + VALUE "LegalTrademarks", "VeraCrypt" + VALUE "OriginalFilename", "VeraCryptSetup.dll" + VALUE "ProductName", "VeraCrypt" + VALUE "ProductVersion", "1.24-Update9" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// HEADER +// + +IDR_SETUP_RSRC_HEADER HEADER "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_COMREG REGISTRY "ComSetup.rgs" + +///////////////////////////////////////////////////////////////////////////// +// +// LANGUAGES +// + +IDR_LANG_AR LANGUAGES "..\\..\\Translations\\Language.ar.xml" +IDR_LANG_CS LANGUAGES "..\\..\\Translations\\Language.cs.xml" +IDR_LANG_DE LANGUAGES "..\\..\\Translations\\Language.de.xml" +IDR_LANG_ES LANGUAGES "..\\..\\Translations\\Language.es.xml" +IDR_LANG_FR LANGUAGES "..\\..\\Translations\\Language.fr.xml" +IDR_LANG_IT LANGUAGES "..\\..\\Translations\\Language.it.xml" +IDR_LANG_JA LANGUAGES "..\\..\\Translations\\Language.ja.xml" +IDR_LANG_NL LANGUAGES "..\\..\\Translations\\Language.nl.xml" +IDR_LANG_PL LANGUAGES "..\\..\\Translations\\Language.pl.xml" +IDR_LANG_RO LANGUAGES "..\\..\\Translations\\Language.ro.xml" +IDR_LANG_RU LANGUAGES "..\\..\\Translations\\Language.ru.xml" +IDR_LANG_VI LANGUAGES "..\\..\\Translations\\Language.vi.xml" +IDR_LANG_ZHCN LANGUAGES "..\\..\\Translations\\Language.zh-cn.xml" +IDR_LANG_ZHHK LANGUAGES "..\\..\\Translations\\Language.zh-hk.xml" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_UNINSTALL DIALOGEX 0, 0, 349, 234 +STYLE DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Uninstall VeraCrypt" +CLASS "VeraCryptCustomDlg" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Click Uninstall to remove VeraCrypt from this system.",IDT_UNINSTALL_DIR,8,8,334,8 + LISTBOX IDC_LOG_WINDOW,7,21,335,179,LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL + DEFPUSHBUTTON "&Uninstall",IDC_UNINSTALL,236,213,50,14 + PUSHBUTTON "Cancel",IDCANCEL,292,213,50,14 + CONTROL "Create System &Restore point",IDC_SYSTEM_RESTORE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,215,194,10 + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,2,206,347,1,WS_EX_STATICEDGE + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,1,348,1,WS_EX_STATICEDGE +END + +IDD_INSTALL_OPTIONS_PAGE_DLG DIALOGEX 0, 0, 346, 152 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT IDC_DESTINATION,11,41,260,13,ES_AUTOHSCROLL + PUSHBUTTON "Bro&wse...",IDC_BROWSE,278,40,59,14 + CONTROL "Install &for all users",IDC_ALL_USERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,77,168,11 + CONTROL "Associate the .hc file &extension with VeraCrypt",IDC_FILE_TYPE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,113,232,11 + CONTROL "Add VeraCrypt to &Start menu",IDC_PROG_GROUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,89,168,11 + CONTROL "Create System &Restore point",IDC_SYSTEM_RESTORE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,125,194,11 + CONTROL "Add VeraCrypt icon to &desktop",IDC_DESKTOP_ICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,101,168,11 + LTEXT "Please select or type the location where you want to install the VeraCrypt program files. If the specified folder does not exist, it will be automatically created.",IDT_INSTALL_DESTINATION,11,14,319,25 +END + +IDD_INFO_PAGE_DLG DIALOGEX 0, 0, 217, 156 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "",IDC_BOX_HELP,0,10,217,146 +END + +IDD_INTRO_PAGE_DLG DIALOGEX 0, 0, 346, 152 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL "",IDC_LICENSE_TEXT,"RichEdit20W",ES_MULTILINE | ES_READONLY | ES_NUMBER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,0,23,345,108 + CONTROL "",IDC_AGREE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,2,137,126,10 + LTEXT "",IDC_BOX_HELP,0,0,346,22 +END + +IDD_INSTL_DLG DIALOGEX 0, 0, 374, 231 +STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "VeraCrypt Setup Wizard" +CLASS "VeraCryptCustomDlg" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + PUSHBUTTON "&Help",IDHELP,150,211,50,14 + PUSHBUTTON "",IDC_PREV,209,211,50,14 + DEFPUSHBUTTON "",IDC_NEXT,259,211,50,14 + PUSHBUTTON "Cancel",IDCANCEL,317,211,50,14 + LTEXT "",IDC_BOX_TITLE,11,5,324,12,0,WS_EX_TRANSPARENT + CONTROL 107,IDC_BITMAP_SETUP_WIZARD,"Static",SS_BITMAP | SS_NOTIFY,139,3,228,30 + CONTROL 109,IDC_SETUP_WIZARD_BKG,"Static",SS_BITMAP,0,0,11,10 + CONTROL "",IDC_SETUP_WIZARD_GFX_AREA,"Static",SS_GRAYRECT | NOT WS_VISIBLE,0,0,378,36,WS_EX_TRANSPARENT | WS_EX_STATICEDGE + CONTROL "",IDC_HR_BOTTOM,"Static",SS_ETCHEDHORZ,67,204,306,1,WS_EX_STATICEDGE + CONTROL "",IDC_HR,"Static",SS_ETCHEDHORZ,0,35,399,1,WS_EX_STATICEDGE + LTEXT "VeraCrypt Installer",IDC_STATIC,4,200,62,8,WS_DISABLED + LTEXT "",IDC_BOX_INFO,18,18,317,13,0,WS_EX_TRANSPARENT + LTEXT "",IDC_MAIN_CONTENT_CANVAS,0,36,374,164 + LTEXT "",IDC_POS_BOX,14,42,346,155,0,WS_EX_TRANSPARENT +END + +IDD_EXTRACTION_OPTIONS_PAGE_DLG DIALOGEX 0, 0, 346, 152 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + PUSHBUTTON "Bro&wse...",IDC_BROWSE,277,32,62,14 + EDITTEXT IDC_DESTINATION,6,33,264,12,ES_AUTOHSCROLL + LTEXT "Please select or type the location where you want to place the extracted files:",IDT_EXTRACT_DESTINATION,6,15,333,17 + CONTROL "&Open the destination location when finished",IDC_OPEN_CONTAINING_FOLDER, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,91,318,16 + LTEXT "",IDC_BOX_HELP,6,56,333,32 +END + +IDD_WIZARD_MODE_PAGE_DLG DIALOGEX 0, 0, 346, 152 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL "&Install",IDC_WIZARD_MODE_INSTALL,"Button",BS_AUTORADIOBUTTON,6,14,232,10 + CONTROL "&Extract",IDC_WIZARD_MODE_EXTRACT_ONLY,"Button",BS_AUTORADIOBUTTON,6,60,232,10 + LTEXT "",IDC_BOX_HELP,42,77,286,64 + LTEXT "",IDC_BOX_HELP2,42,30,286,29 +END + +IDD_PROGRESS_PAGE_DLG DIALOGEX 0, 0, 346, 152 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LISTBOX IDC_LOG_WINDOW,0,1,345,131,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL + CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,0,139,345,12 +END + +IDD_DONATIONS_PAGE_DLG DIALOGEX 0, 0, 346, 152 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +EXSTYLE WS_EX_TRANSPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + PUSHBUTTON "Donate now...",IDC_DONATE,124,94,96,14 +END + +IDD_INSTALL_LANGUAGE DIALOGEX 0, 0, 214, 75 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "VeraCrypt Setup Wizard" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,102,54,50,14 + PUSHBUTTON "Cancel",IDCANCEL,157,54,50,14 + ICON IDI_SETUP,IDC_STATIC,10,10,32,32 + LTEXT "Select the language to use during the installation:",IDC_SELECT_LANGUAGE_LABEL,42,13,158,17 + COMBOBOX IDC_LANGUAGES_LIST,42,36,164,155,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_SETUP ICON "Setup.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "#include ""..\\\\common\\\\resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""..\\\\common\\\\common.rc""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_UNINSTALL, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 342 + TOPMARGIN, 7 + BOTTOMMARGIN, 229 + END + + IDD_INSTALL_OPTIONS_PAGE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 339 + TOPMARGIN, 7 + BOTTOMMARGIN, 147 + END + + IDD_INFO_PAGE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 210 + TOPMARGIN, 7 + BOTTOMMARGIN, 149 + END + + IDD_INTRO_PAGE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 339 + TOPMARGIN, 7 + BOTTOMMARGIN, 145 + END + + IDD_INSTL_DLG, DIALOG + BEGIN + RIGHTMARGIN, 367 + TOPMARGIN, 1 + BOTTOMMARGIN, 229 + HORZGUIDE, 196 + END + + IDD_EXTRACTION_OPTIONS_PAGE_DLG, DIALOG + BEGIN + RIGHTMARGIN, 343 + BOTTOMMARGIN, 147 + END + + IDD_WIZARD_MODE_PAGE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 339 + TOPMARGIN, 7 + BOTTOMMARGIN, 145 + END + + IDD_PROGRESS_PAGE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 339 + TOPMARGIN, 7 + BOTTOMMARGIN, 145 + END + + IDD_DONATIONS_PAGE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 339 + TOPMARGIN, 7 + BOTTOMMARGIN, 147 + END + + IDD_INSTALL_LANGUAGE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 207 + TOPMARGIN, 7 + BOTTOMMARGIN, 68 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_SETUP_WIZARD BITMAP "VeraCrypt_setup.bmp" +IDB_SETUP_WIZARD_BKG BITMAP "VeraCrypt_setup_background.bmp" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "..\\common\\common.rc" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/src/SetupDLL/Setup.vcxproj.filters b/src/SetupDLL/Setup.vcxproj.filters new file mode 100644 index 00000000..d747363f --- /dev/null +++ b/src/SetupDLL/Setup.vcxproj.filters @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Source Files\Common"> + <UniqueIdentifier>{6073052c-2d95-47a0-95d8-5960d4c1d1c0}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions> + </Filter> + <Filter Include="Resource Files\Common"> + <UniqueIdentifier>{a540fb0a-850b-4cb9-85f9-ade0112ebb50}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="ComSetup.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Dir.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="SelfExtract.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Setup.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Wizard.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Common\Xml.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Common\BootEncryption.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Crc.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Dictionary.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Dlgcode.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Language.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Registry.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Endian.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <None Include="ComSetup.rgs"> + <Filter>Source Files</Filter> + </None> + <None Include="Setup.ico"> + <Filter>Resource Files</Filter> + </None> + <None Include="..\Common\VeraCrypt.ico"> + <Filter>Resource Files</Filter> + </None> + <None Include="VeraCrypt_setup.bmp"> + <Filter>Resource Files</Filter> + </None> + <None Include="VeraCrypt_setup_background.bmp"> + <Filter>Resource Files</Filter> + </None> + <None Include="..\Common\VeraCrypt_Volume.ico"> + <Filter>Resource Files</Filter> + </None> + <None Include="..\Common\Language.xml"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Resources\Texts\License.rtf"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Common\Textual_logo_288dpi.bmp"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Common\Textual_logo_96dpi.bmp"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Common\Textual_logo_background.bmp"> + <Filter>Resource Files\Common</Filter> + </None> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\Common\Apidrvr.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Combo.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ComSetup.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Crc.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Dir.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Dlgcode.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Exception.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Inflate.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Language.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Registry.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="SelfExtract.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Setup.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Tcdefs.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Wizard.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <Manifest Include="Setup.manifest"> + <Filter>Resource Files</Filter> + </Manifest> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="Setup.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + <ResourceCompile Include="..\Common\Common.rc"> + <Filter>Resource Files\Common</Filter> + </ResourceCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/SetupDLL/Setup.vcxproj.user b/src/SetupDLL/Setup.vcxproj.user new file mode 100644 index 00000000..ace9a86a --- /dev/null +++ b/src/SetupDLL/Setup.vcxproj.user @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +</Project>
\ No newline at end of file diff --git a/src/SetupDLL/SetupDLL.def b/src/SetupDLL/SetupDLL.def new file mode 100644 index 00000000..8a54fa06 --- /dev/null +++ b/src/SetupDLL/SetupDLL.def @@ -0,0 +1,7 @@ +LIBRARY VERACRYPTSETUP +EXPORTS + VC_CustomAction_PreInstall + VC_CustomAction_PostInstall + VC_CustomAction_PreUninstall + VC_CustomAction_PostUninstall + VC_CustomAction_DoChecks
\ No newline at end of file diff --git a/src/SetupDLL/SetupDLL.vcproj b/src/SetupDLL/SetupDLL.vcproj new file mode 100644 index 00000000..a1a6a81f --- /dev/null +++ b/src/SetupDLL/SetupDLL.vcproj @@ -0,0 +1,484 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="Setup" + ProjectGUID="{DF5F654D-BD44-4E31-B92E-B68074DC37A8}" + RootNamespace="Setup" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" + PreprocessorDefinitions="SETUP;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + BufferSecurityCheck="true" + UsePrecompiledHeader="0" + WarningLevel="4" + DebugInformationFormat="4" + DisableSpecificWarnings="4057;4100;4127;4201;4505;4701;4706" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/NODEFAULTLIB:LIBCMTD" + AdditionalDependencies="libcmtd.lib atlsd.lib mpr.lib" + OutputFile="$(OutDir)/VeraCryptSetup.exe" + LinkIncremental="2" + GenerateManifest="false" + UACExecutionLevel="2" + DelayLoadDLLs="user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/Setup.pdb" + SubSystem="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + AdditionalManifestFiles="Setup.manifest" + EmbedManifest="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="md "..\Debug\Setup Files" 2>NUL:
copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt Setup.exe" >NUL:
" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/w34189" + Optimization="2" + AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11" + PreprocessorDefinitions="SETUP;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS" + RuntimeLibrary="0" + BufferSecurityCheck="true" + UsePrecompiledHeader="0" + AssemblerOutput="2" + AssemblerListingLocation="$(IntDir)/" + WarningLevel="4" + DebugInformationFormat="0" + DisableSpecificWarnings="4057;4100;4127;4201;4505;4701;4706" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/IGNORE:4089" + AdditionalDependencies="mpr.lib" + OutputFile="$(OutDir)/VeraCryptSetup.exe" + LinkIncremental="1" + GenerateManifest="false" + UACExecutionLevel="2" + DelayLoadDLLs="user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll" + GenerateDebugInformation="false" + GenerateMapFile="true" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + AdditionalManifestFiles="Setup.manifest" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt Setup.exe"" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\ComSetup.cpp" + > + </File> + <File + RelativePath=".\ComSetup.rgs" + > + </File> + <File + RelativePath=".\Dir.c" + > + </File> + <File + RelativePath=".\SelfExtract.c" + > + </File> + <File + RelativePath=".\Setup.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + </File> + <File + RelativePath=".\Wizard.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\Common\Xml.c" + > + </File> + <Filter + Name="Common" + > + <File + RelativePath="..\Common\BootEncryption.cpp" + > + </File> + <File + RelativePath="..\Common\Crc.c" + > + </File> + <File + RelativePath="..\Common\Dictionary.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\Common\Dlgcode.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\Common\Endian.c" + > + </File> + <File + RelativePath="..\Common\Inflate.c" + > + </File> + <File + RelativePath="..\Common\Language.c" + > + </File> + <File + RelativePath="..\Common\Registry.c" + > + </File> + </Filter> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\Common\Apidrvr.h" + > + </File> + <File + RelativePath="..\Common\Combo.h" + > + </File> + <File + RelativePath=".\ComSetup.h" + > + </File> + <File + RelativePath="..\Common\Crc.h" + > + </File> + <File + RelativePath=".\Dir.h" + > + </File> + <File + RelativePath="..\Common\Dlgcode.h" + > + </File> + <File + RelativePath="..\Common\Exception.h" + > + </File> + <File + RelativePath="..\Common\Inflate.h" + > + </File> + <File + RelativePath="..\Common\Language.h" + > + </File> + <File + RelativePath="..\Common\Registry.h" + > + </File> + <File + RelativePath="..\Common\Resource.h" + > + </File> + <File + RelativePath=".\Resource.h" + > + </File> + <File + RelativePath=".\SelfExtract.h" + > + </File> + <File + RelativePath=".\Setup.h" + > + </File> + <File + RelativePath="..\Common\Tcdefs.h" + > + </File> + <File + RelativePath=".\Wizard.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File + RelativePath=".\Setup.ico" + > + </File> + <File + RelativePath=".\Setup.manifest" + > + </File> + <File + RelativePath=".\Setup.rc" + > + </File> + <File + RelativePath="..\Common\VeraCrypt.ico" + > + </File> + <File + RelativePath=".\VeraCrypt_setup.bmp" + > + </File> + <File + RelativePath=".\VeraCrypt_setup_background.bmp" + > + </File> + <File + RelativePath="..\Common\VeraCrypt_Volume.ico" + > + </File> + <Filter + Name="Common" + > + <File + RelativePath="..\Common\Common.rc" + > + <FileConfiguration + Name="Debug|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCResourceCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCResourceCompilerTool" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\Common\Language.xml" + > + </File> + <File + RelativePath="..\Resources\Texts\License.rtf" + > + </File> + <File + RelativePath="..\Common\Textual_logo_288dpi.bmp" + > + </File> + <File + RelativePath="..\Common\Textual_logo_96dpi.bmp" + > + </File> + <File + RelativePath="..\Common\Textual_logo_background.bmp" + > + </File> + </Filter> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/SetupDLL/SetupDLL.vcxproj b/src/SetupDLL/SetupDLL.vcxproj new file mode 100644 index 00000000..374ad866 --- /dev/null +++ b/src/SetupDLL/SetupDLL.vcxproj @@ -0,0 +1,279 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="ReleaseCustomEFI|Win32"> + <Configuration>ReleaseCustomEFI</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{ADD324E2-ADC8-402E-87EB-03E4E26B1B49}</ProjectGuid> + <RootNamespace>Setup</RootNamespace> + <Keyword>Win32Proj</Keyword> + <ProjectName>SetupDLL</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptSetup</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptSetup</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptSetup</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>SETUP;SETUP_DLL;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalOptions>/NODEFAULTLIB:LIBCMTD %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>msi.lib;libcmtd.lib;atlsd.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptSetup.dll</OutputFile> + <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> + <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)Setup.pdb</ProgramDatabaseFile> + <SubSystem>Windows</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention>true</DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + <ModuleDefinitionFile>SetupDLL.def</ModuleDefinitionFile> + </Link> + <Manifest> + <AdditionalManifestFiles>Setup.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>md "..\Debug\Setup Files" 2>NUL: +copy Debug\VeraCryptSetup.dll "..\Debug\Setup Files\VeraCryptSetup.dll" >NUL: +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>SETUP;SETUP_DLL;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <PrecompiledHeader> + </PrecompiledHeader> + <AssemblerOutput>All</AssemblerOutput> + <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4995;4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>msi.lib;mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptSetup.dll</OutputFile> + <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> + <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <GenerateMapFile>true</GenerateMapFile> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>true</RandomizedBaseAddress> + <DataExecutionPrevention>true</DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + <ModuleDefinitionFile>SetupDLL.def</ModuleDefinitionFile> + </Link> + <Manifest> + <AdditionalManifestFiles>Setup.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy Release\VeraCryptSetup.dll "..\Release\Setup Files\VeraCryptSetup.dll"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'"> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>SETUP;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <PrecompiledHeader> + </PrecompiledHeader> + <AssemblerOutput>All</AssemblerOutput> + <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>msi.lib;mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile> + <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> + <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <GenerateMapFile>true</GenerateMapFile> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>true</RandomizedBaseAddress> + <DataExecutionPrevention>true</DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <Manifest> + <AdditionalManifestFiles>Setup.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy Release\VeraCryptSetup.dll "..\Release\Setup Files\VeraCryptSetup.dll"</Command> + </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="ComSetup.cpp" /> + <ClCompile Include="Dir.c" /> + <ClCompile Include="Setup.c"> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + </ClCompile> + <ClCompile Include="..\Common\Xml.c" /> + <ClCompile Include="..\Common\BootEncryption.cpp" /> + <ClCompile Include="..\Common\Crc.c" /> + <ClCompile Include="..\Common\Dictionary.c"> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + </ClCompile> + <ClCompile Include="..\Common\Dlgcode.c"> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> + </ClCompile> + <ClCompile Include="..\Common\Endian.c" /> + <ClCompile Include="..\Common\Language.c" /> + <ClCompile Include="..\Common\Registry.c" /> + </ItemGroup> + <ItemGroup> + <None Include="ComSetup.rgs" /> + <None Include="Setup.ico" /> + <None Include="..\Common\VeraCrypt.ico" /> + <None Include="SetupDLL.def" /> + <None Include="VeraCrypt_setup.bmp" /> + <None Include="VeraCrypt_setup_background.bmp" /> + <None Include="..\Common\VeraCrypt_Volume.ico" /> + <None Include="..\Common\Language.xml" /> + <None Include="..\Resources\Texts\License.rtf" /> + <None Include="..\Common\Textual_logo_288dpi.bmp" /> + <None Include="..\Common\Textual_logo_96dpi.bmp" /> + <None Include="..\Common\Textual_logo_background.bmp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\Common\Apidrvr.h" /> + <ClInclude Include="..\Common\Combo.h" /> + <ClInclude Include="ComSetup.h" /> + <ClInclude Include="..\Common\Crc.h" /> + <ClInclude Include="Dir.h" /> + <ClInclude Include="..\Common\Dlgcode.h" /> + <ClInclude Include="..\Common\Exception.h" /> + <ClInclude Include="..\Common\Inflate.h" /> + <ClInclude Include="..\Common\Language.h" /> + <ClInclude Include="..\Common\Registry.h" /> + <ClInclude Include="..\Common\Resource.h" /> + <ClInclude Include="Resource.h" /> + <ClInclude Include="Setup.h" /> + <ClInclude Include="..\Common\Tcdefs.h" /> + </ItemGroup> + <ItemGroup> + <Manifest Include="Setup.manifest" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="Setup.rc" /> + <ResourceCompile Include="..\Common\Common.rc"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> + </ResourceCompile> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Boot\Windows\Boot.vcxproj"> + <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\ExpandVolume\ExpandVolume.vcxproj"> + <Project>{9715ff1d-599b-4bbc-ad96-bef6e08ff827}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\Format\Format.vcxproj"> + <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\Mount\Mount.vcxproj"> + <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/SetupDLL/SetupDLL.vcxproj.filters b/src/SetupDLL/SetupDLL.vcxproj.filters new file mode 100644 index 00000000..e0429539 --- /dev/null +++ b/src/SetupDLL/SetupDLL.vcxproj.filters @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <ClCompile Include="..\Common\Xml.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ComSetup.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Dir.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Common\Endian.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Setup.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Common\BootEncryption.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Dictionary.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Dlgcode.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Language.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Registry.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Crc.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\Common\Apidrvr.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Combo.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ComSetup.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Crc.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Dir.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Dlgcode.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Exception.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Inflate.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Language.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Registry.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Setup.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Tcdefs.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="Setup.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + <ResourceCompile Include="..\Common\Common.rc"> + <Filter>Resource Files\Common</Filter> + </ResourceCompile> + </ItemGroup> + <ItemGroup> + <None Include="Setup.ico"> + <Filter>Resource Files</Filter> + </None> + <None Include="..\Common\VeraCrypt.ico"> + <Filter>Resource Files</Filter> + </None> + <None Include="VeraCrypt_setup.bmp"> + <Filter>Resource Files</Filter> + </None> + <None Include="VeraCrypt_setup_background.bmp"> + <Filter>Resource Files</Filter> + </None> + <None Include="..\Common\VeraCrypt_Volume.ico"> + <Filter>Resource Files</Filter> + </None> + <None Include="..\Common\Language.xml"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Resources\Texts\License.rtf"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Common\Textual_logo_288dpi.bmp"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Common\Textual_logo_96dpi.bmp"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="..\Common\Textual_logo_background.bmp"> + <Filter>Resource Files\Common</Filter> + </None> + <None Include="ComSetup.rgs"> + <Filter>Source Files</Filter> + </None> + <None Include="SetupDLL.def"> + <Filter>Source Files</Filter> + </None> + </ItemGroup> + <ItemGroup> + <Filter Include="Header Files"> + <UniqueIdentifier>{abfa03d7-3de7-4832-b36d-5b45cd0fc304}</UniqueIdentifier> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{d912b4b9-7f5e-4063-8af7-4d544dde2233}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files"> + <UniqueIdentifier>{5a0efac0-b028-4388-a278-1fe6dc479d79}</UniqueIdentifier> + </Filter> + <Filter Include="Resource Files\Common"> + <UniqueIdentifier>{3cb669f1-3949-43f4-a1e5-3b5d0fd75f76}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files\Common"> + <UniqueIdentifier>{92f9499e-670d-464b-9edf-c1a2c56fb813}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <Manifest Include="Setup.manifest"> + <Filter>Resource Files</Filter> + </Manifest> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/SetupDLL/SetupDLL.vcxproj.user b/src/SetupDLL/SetupDLL.vcxproj.user new file mode 100644 index 00000000..ace9a86a --- /dev/null +++ b/src/SetupDLL/SetupDLL.vcxproj.user @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +</Project>
\ No newline at end of file diff --git a/src/SetupDLL/VeraCrypt_setup.bmp b/src/SetupDLL/VeraCrypt_setup.bmp Binary files differnew file mode 100644 index 00000000..b99619e3 --- /dev/null +++ b/src/SetupDLL/VeraCrypt_setup.bmp diff --git a/src/SetupDLL/VeraCrypt_setup_background.bmp b/src/SetupDLL/VeraCrypt_setup_background.bmp Binary files differnew file mode 100644 index 00000000..85397e80 --- /dev/null +++ b/src/SetupDLL/VeraCrypt_setup_background.bmp diff --git a/src/Signing/sign-sha256.bat b/src/Signing/sign-sha256.bat index 99cad96d..7902e66c 100644 --- a/src/Signing/sign-sha256.bat +++ b/src/Signing/sign-sha256.bat @@ -1,6 +1,7 @@ PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip set VC_VERSION=1.24-Update9 +set VC_VERSION_NBRE=1.24.25 set SIGNINGPATH=%~dp0 cd %SIGNINGPATH% @@ -9,47 +10,51 @@ call "..\..\doc\chm\create_chm.bat" cd %SIGNINGPATH% rem sign using SHA-1 -signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_MS_Cross_Cert.crt /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" +signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_MS_Cross_Cert.crt /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" timeout /t 10 rem sign using SHA-256 signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_R3Cross.cer /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_R3Cross.cer /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\veracrypt-arm64.sys" -signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" - +signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" +rem create setup and MSI cd "..\Release\Setup Files\" - copy ..\..\LICENSE . copy ..\..\License.txt . copy ..\..\NOTICE . - +copy ..\..\Resources\Texts\License.rtf . +copy ..\..\Common\VeraCrypt.ico . +copy ..\..\Setup\VeraCrypt_setup_background.bmp . +copy ..\..\Setup\VeraCrypt_setup.bmp . +copy ..\..\Setup\Setup.ico . del *.xml rmdir /S /Q Languages mkdir Languages copy /V /Y ..\..\..\Translations\*.xml Languages\. del Languages.zip 7z a -y Languages.zip Languages - rmdir /S /Q docs mkdir docs\html\en mkdir docs\EFI-DCS copy /V /Y ..\..\..\doc\html\* docs\html\en\. copy "..\..\..\doc\chm\VeraCrypt User Guide.chm" docs\. copy "..\..\..\doc\EFI-DCS\*.pdf" docs\EFI-DCS\. - del docs.zip 7z a -y docs.zip docs - "VeraCrypt Setup.exe" /p "VeraCrypt Portable.exe" /p - +call build_msi_x64.bat %VC_VERSION_NBRE% del LICENSE del License.txt del NOTICE +del License.rtf +del VeraCrypt.ico +del VeraCrypt_setup_background.bmp +del VeraCrypt_setup.bmp +del Setup.ico del "VeraCrypt User Guide.chm" - del Languages.zip del docs.zip rmdir /S /Q Languages @@ -58,6 +63,6 @@ rmdir /S /Q docs cd %SIGNINGPATH% rem sign using SHA-256 -signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe" +signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64.msi" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64_en-us.msi" pause diff --git a/src/Signing/sign.bat b/src/Signing/sign.bat index f4efacdd..15dca15d 100644 --- a/src/Signing/sign.bat +++ b/src/Signing/sign.bat @@ -1,6 +1,7 @@ PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip set VC_VERSION=1.24-Update9 +set VC_VERSION_NBRE=1.24.25 set SIGNINGPATH=%~dp0 cd %SIGNINGPATH% @@ -9,47 +10,51 @@ call "..\..\doc\chm\create_chm.bat" cd %SIGNINGPATH% rem sign using SHA-1 -signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_MS_Cross_Cert.crt /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" -signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_Code_Signing_CA.cer /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" +signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_MS_Cross_Cert.crt /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" +signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_Code_Signing_CA.cer /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" timeout /t 10 rem sign using SHA-256 signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_R3Cross.cer /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" -signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" - +signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" +rem create setup and MSI cd "..\Release\Setup Files\" - copy ..\..\LICENSE . copy ..\..\License.txt . copy ..\..\NOTICE . - +copy ..\..\Resources\Texts\License.rtf . +copy ..\..\Common\VeraCrypt.ico . +copy ..\..\Setup\VeraCrypt_setup_background.bmp . +copy ..\..\Setup\VeraCrypt_setup.bmp . +copy ..\..\Setup\Setup.ico . del *.xml rmdir /S /Q Languages mkdir Languages copy /V /Y ..\..\..\Translations\*.xml Languages\. del Languages.zip 7z a -y Languages.zip Languages - rmdir /S /Q docs mkdir docs\html\en mkdir docs\EFI-DCS copy /V /Y ..\..\..\doc\html\* docs\html\en\. copy "..\..\..\doc\chm\VeraCrypt User Guide.chm" docs\. copy "..\..\..\doc\EFI-DCS\*.pdf" docs\EFI-DCS\. - del docs.zip 7z a -y docs.zip docs - "VeraCrypt Setup.exe" /p "VeraCrypt Portable.exe" /p - +call build_msi_x64.bat %VC_VERSION_NBRE% del LICENSE del License.txt del NOTICE +del License.rtf +del VeraCrypt.ico +del VeraCrypt_setup_background.bmp +del VeraCrypt_setup.bmp +del Setup.ico del "VeraCrypt User Guide.chm" - del Languages.zip del docs.zip rmdir /S /Q Languages @@ -57,13 +62,18 @@ rmdir /S /Q docs cd %SIGNINGPATH% +rem Can't dual-sign MSI files when using signtool (only jsign / osslsigncode can do that) + rem sign using SHA-1 -signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_Code_Signing_CA.cer /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe" +signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_Code_Signing_CA.cer /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe" timeout /t 10 -rem sign using SHA-256 -signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe" +rem dual sign Setup using SHA-256 +signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64.msi" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64_en-us.msi" + +rem single sign MSI using SHA-256 +signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64.msi" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64_en-us.msi" move "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Legacy Setup %VC_VERSION%.exe" move "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Legacy Portable %VC_VERSION%.exe" diff --git a/src/Signing/sign_test.bat b/src/Signing/sign_test.bat index 858e545f..9e4b2e87 100644 --- a/src/Signing/sign_test.bat +++ b/src/Signing/sign_test.bat @@ -1,5 +1,6 @@ PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip set VC_VERSION=1.24-Update9 +set VC_VERSION_NBRE=1.24.25 set PFXNAME=TestCertificate\idrix_codeSign.pfx set PFXPASSWORD=idrix set PFXCA=TestCertificate\idrix_TestRootCA.crt @@ -15,43 +16,48 @@ call "..\..\doc\chm\create_chm.bat" cd %SIGNINGPATH% rem sign using SHA-1 -signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" +signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" timeout /t 10 rem sign using SHA-256 -signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" "..\Release\Setup Files\veracrypt-arm64.sys" "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" +signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys" "..\Release\Setup Files\veracrypt-arm64.sys" "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" +rem create setup and MSI cd "..\Release\Setup Files\" - copy ..\..\LICENSE . copy ..\..\License.txt . copy ..\..\NOTICE . - +copy ..\..\Resources\Texts\License.rtf . +copy ..\..\Common\VeraCrypt.ico . +copy ..\..\Setup\VeraCrypt_setup_background.bmp . +copy ..\..\Setup\VeraCrypt_setup.bmp . +copy ..\..\Setup\Setup.ico . del *.xml rmdir /S /Q Languages mkdir Languages copy /V /Y ..\..\..\Translations\*.xml Languages\. del Languages.zip 7z a -y Languages.zip Languages - rmdir /S /Q docs mkdir docs\html\en mkdir docs\EFI-DCS copy /V /Y ..\..\..\doc\html\* docs\html\en\. copy "..\..\..\doc\chm\VeraCrypt User Guide.chm" docs\. copy "..\..\..\doc\EFI-DCS\*.pdf" docs\EFI-DCS\. - del docs.zip 7z a -y docs.zip docs - "VeraCrypt Setup.exe" /p - +call build_msi_x64.bat %VC_VERSION_NBRE% del LICENSE del License.txt del NOTICE +del License.rtf +del VeraCrypt.ico +del VeraCrypt_setup_background.bmp +del VeraCrypt_setup.bmp +del Setup.ico del "VeraCrypt User Guide.chm" - del Languages.zip del docs.zip rmdir /S /Q Languages @@ -59,12 +65,17 @@ rmdir /S /Q docs cd %SIGNINGPATH% +rem Can't dual-sign MSI files when using signtool (only jsign / osslsigncode can do that) + rem sign using SHA-1 -signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" +signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" timeout /t 10 -rem sign using SHA-256 +rem dual-sign Setup using SHA-256 signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" +rem single sign MSI using SHA-256 +signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64.msi" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64_en-us.msi" + pause
\ No newline at end of file diff --git a/src/Signing/sign_test_debug.bat b/src/Signing/sign_test_debug.bat index 9cf8e562..4b5e33ac 100644 --- a/src/Signing/sign_test_debug.bat +++ b/src/Signing/sign_test_debug.bat @@ -1,5 +1,6 @@ PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip set VC_VERSION=1.24-Update9 +set VC_VERSION_NBRE=1.24.25 set PFXNAME=TestCertificate\idrix_codeSign.pfx set PFXPASSWORD=idrix set PFXCA=TestCertificate\idrix_TestRootCA.crt @@ -15,26 +16,29 @@ call "..\..\doc\chm\create_chm.bat" cd %SIGNINGPATH% rem sign using SHA-1 -signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Debug\Setup Files\veracrypt.sys" "..\Debug\Setup Files\veracrypt-x64.sys" "..\Debug\Setup Files\VeraCrypt.exe" "..\Debug\Setup Files\VeraCrypt Format.exe" "..\Debug\Setup Files\VeraCryptExpander.exe" "..\Debug\Setup Files\VeraCrypt-x64.exe" "..\Debug\Setup Files\VeraCrypt Format-x64.exe" "..\Debug\Setup Files\VeraCryptExpander-x64.exe" +signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.digicert.com "..\Debug\Setup Files\veracrypt.sys" "..\Debug\Setup Files\veracrypt-x64.sys" "..\Debug\Setup Files\VeraCrypt.exe" "..\Debug\Setup Files\VeraCrypt Format.exe" "..\Debug\Setup Files\VeraCryptExpander.exe" "..\Debug\Setup Files\VeraCrypt-x64.exe" "..\Debug\Setup Files\VeraCrypt Format-x64.exe" "..\Debug\Setup Files\VeraCryptExpander-x64.exe" "..\Debug\Setup Files\VeraCrypt COMReg.exe" timeout /t 10 rem sign using SHA-256 -signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Debug\Setup Files\veracrypt.sys" "..\Debug\Setup Files\veracrypt-x64.sys" "..\Debug\Setup Files\veracrypt-arm64.sys" "..\Debug\Setup Files\VeraCrypt.exe" "..\Debug\Setup Files\VeraCrypt Format.exe" "..\Debug\Setup Files\VeraCryptExpander.exe" "..\Debug\Setup Files\VeraCrypt-x64.exe" "..\Debug\Setup Files\VeraCrypt Format-x64.exe" "..\Debug\Setup Files\VeraCryptExpander-x64.exe" "..\Debug\Setup Files\VeraCrypt-arm64.exe" "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" +signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Debug\Setup Files\veracrypt.sys" "..\Debug\Setup Files\veracrypt-x64.sys" "..\Debug\Setup Files\veracrypt-arm64.sys" "..\Debug\Setup Files\VeraCrypt.exe" "..\Debug\Setup Files\VeraCrypt Format.exe" "..\Debug\Setup Files\VeraCryptExpander.exe" "..\Debug\Setup Files\VeraCrypt-x64.exe" "..\Debug\Setup Files\VeraCrypt Format-x64.exe" "..\Debug\Setup Files\VeraCryptExpander-x64.exe" "..\Debug\Setup Files\VeraCrypt-arm64.exe" "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" "..\Debug\Setup Files\VeraCrypt COMReg.exe" +rem create setup and MSI cd "..\Debug\Setup Files\" - copy ..\..\LICENSE . copy ..\..\License.txt . copy ..\..\NOTICE . - +copy ..\..\Resources\Texts\License.rtf . +copy ..\..\Common\VeraCrypt.ico . +copy ..\..\Setup\VeraCrypt_setup_background.bmp . +copy ..\..\Setup\VeraCrypt_setup.bmp . +copy ..\..\Setup\Setup.ico . del *.xml rmdir /S /Q Languages mkdir Languages copy /V /Y ..\..\..\Translations\*.xml Languages\. del Languages.zip 7z a -y Languages.zip Languages - rmdir /S /Q docs mkdir docs\html\en mkdir docs\EFI-DCS @@ -43,17 +47,19 @@ copy "..\..\..\doc\chm\VeraCrypt User Guide.chm" docs\. copy "..\..\..\doc\EFI-DCS\*.pdf" docs\EFI-DCS\. copy "..\..\Release\Setup Files\*.cat" . copy "..\..\Release\Setup Files\veracrypt.inf" . - del docs.zip 7z a -y docs.zip docs - "VeraCrypt Setup.exe" /p - +call build_msi_x64.bat %VC_VERSION_NBRE% del LICENSE del License.txt del NOTICE +del License.rtf +del VeraCrypt.ico +del VeraCrypt_setup_background.bmp +del VeraCrypt_setup.bmp +del Setup.ico del "VeraCrypt User Guide.chm" - del Languages.zip del docs.zip rmdir /S /Q Languages @@ -61,12 +67,17 @@ rmdir /S /Q docs cd %SIGNINGPATH% +rem Can't dual-sign MSI files when using signtool (only jsign / osslsigncode can do that) + rem sign using SHA-1 -signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Debug\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" +signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.digicert.com "..\Debug\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" timeout /t 10 -rem sign using SHA-256 +rem dual-sign Setup using SHA-256 signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Debug\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" +rem single sign MSI using SHA-256 +signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Debug\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64.msi" "..\Debug\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64_en-us.msi" + pause
\ No newline at end of file diff --git a/src/VeraCrypt.sln b/src/VeraCrypt.sln index 6f373bcd..c7a31445 100644 --- a/src/VeraCrypt.sln +++ b/src/VeraCrypt.sln @@ -33,6 +33,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Portable", "Setup\Portable. {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} = {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SetupDLL", "SetupDLL\SetupDLL.vcxproj", "{ADD324E2-ADC8-402E-87EB-03E4E26B1B49}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution All CustomEFI|Win32 = All CustomEFI|Win32 @@ -73,6 +75,8 @@ Global Portable|x64 = Portable|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 + ReleaseCustomEFI|Win32 = ReleaseCustomEFI|Win32 + ReleaseCustomEFI|x64 = ReleaseCustomEFI|x64 Setup Debug|Win32 = Setup Debug|Win32 Setup Debug|x64 = Setup Debug|x64 Setup|Win32 = Setup|Win32 @@ -145,6 +149,9 @@ Global {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|Win32.Build.0 = Release|Win32 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|x64.ActiveCfg = Release|x64 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Release|x64.Build.0 = Release|x64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.ReleaseCustomEFI|Win32.ActiveCfg = Release|x64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.ReleaseCustomEFI|x64.ActiveCfg = Release|x64 + {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.ReleaseCustomEFI|x64.Build.0 = Release|x64 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|Win32.ActiveCfg = Debug|Win32 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|x64.ActiveCfg = Debug|x64 {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.Setup Debug|x64.Build.0 = Debug|x64 @@ -200,6 +207,9 @@ Global {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Release|Win32.ActiveCfg = Release|Win32 {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Release|Win32.Build.0 = Release|Win32 {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Release|x64.ActiveCfg = Release|Win32 + {EF5EF444-18D0-40D7-8DFA-775EC4448602}.ReleaseCustomEFI|Win32.ActiveCfg = Release|Win32 + {EF5EF444-18D0-40D7-8DFA-775EC4448602}.ReleaseCustomEFI|Win32.Build.0 = Release|Win32 + {EF5EF444-18D0-40D7-8DFA-775EC4448602}.ReleaseCustomEFI|x64.ActiveCfg = Release|Win32 {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Setup Debug|Win32.ActiveCfg = Debug|Win32 {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Setup Debug|x64.ActiveCfg = Debug|Win32 {EF5EF444-18D0-40D7-8DFA-775EC4448602}.Setup|Win32.ActiveCfg = Release|Win32 @@ -268,6 +278,10 @@ Global {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|Win32.Build.0 = Release|Win32 {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|x64.ActiveCfg = Release|x64 {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Release|x64.Build.0 = Release|x64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 + {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.ReleaseCustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup Debug|Win32.ActiveCfg = Debug|Win32 {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup Debug|x64.ActiveCfg = Debug|x64 {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.Setup Debug|x64.Build.0 = Debug|x64 @@ -338,6 +352,10 @@ Global {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|Win32.Build.0 = Release|Win32 {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|x64.ActiveCfg = Release|x64 {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Release|x64.Build.0 = Release|x64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 + {E4C40F94-E7F9-4981-86E4-186B46F993F3}.ReleaseCustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup Debug|Win32.ActiveCfg = Debug|Win32 {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup Debug|x64.ActiveCfg = Debug|x64 {E4C40F94-E7F9-4981-86E4-186B46F993F3}.Setup Debug|x64.Build.0 = Debug|x64 @@ -389,6 +407,9 @@ Global {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release|Win32.ActiveCfg = Release|Win32 {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release|Win32.Build.0 = Release|Win32 {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Release|x64.ActiveCfg = Release|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 + {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|Win32 {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Setup Debug|Win32.ActiveCfg = Debug|Win32 {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Setup Debug|Win32.Build.0 = Debug|Win32 {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.Setup Debug|x64.ActiveCfg = Debug|Win32 @@ -440,6 +461,9 @@ Global {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release|Win32.ActiveCfg = Release|Win32 {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release|Win32.Build.0 = Release|Win32 {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Release|x64.ActiveCfg = Release|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|Win32.ActiveCfg = Release|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|Win32.Build.0 = Release|Win32 + {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.ReleaseCustomEFI|x64.ActiveCfg = Release|Win32 {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Setup Debug|Win32.ActiveCfg = Release|Win32 {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Setup Debug|x64.ActiveCfg = Release Loader|Win32 {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.Setup|Win32.ActiveCfg = Release|Win32 @@ -518,6 +542,10 @@ Global {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|Win32.Build.0 = Release|Win32 {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|x64.ActiveCfg = Release|x64 {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Release|x64.Build.0 = Release|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|x64 + {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.ReleaseCustomEFI|x64.Build.0 = ReleaseCustomEFI|x64 {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|Win32.ActiveCfg = Debug|Win32 {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|Win32.Build.0 = Debug|Win32 {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.Setup Debug|x64.ActiveCfg = Debug|x64 @@ -585,6 +613,9 @@ Global {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|Win32.ActiveCfg = Release|Win32 {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|Win32.Build.0 = Release|Win32 {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Release|x64.ActiveCfg = Release|Win32 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|Win32.ActiveCfg = Release|x64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|x64.ActiveCfg = Release|x64 + {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.ReleaseCustomEFI|x64.Build.0 = Release|x64 {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup Debug|Win32.ActiveCfg = Debug|Win32 {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup Debug|Win32.Build.0 = Debug|Win32 {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.Setup Debug|x64.ActiveCfg = Debug|Win32 @@ -648,12 +679,81 @@ Global {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release|Win32.ActiveCfg = Release|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release|Win32.Build.0 = Release|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Release|x64.ActiveCfg = Release|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 + {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup Debug|Win32.ActiveCfg = Debug|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup Debug|Win32.Build.0 = Debug|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup Debug|x64.ActiveCfg = Debug|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup|Win32.ActiveCfg = Release|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup|Win32.Build.0 = Release|Win32 {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.Setup|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All CustomEFI|Win32.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All CustomEFI|Win32.Build.0 = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All CustomEFI|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All Debug|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All Debug|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All Debug|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All|Win32.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All|Win32.Build.0 = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot Loader|Win32.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot Loader|Win32.Build.0 = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot Loader|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot|Win32.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot|Win32.Build.0 = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Boot|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Debug|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Debug|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Debug|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver Debug|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver Debug|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver Debug|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64 Debug|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64 Debug|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64 Debug|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x64|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86 Debug|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86 Debug|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86 Debug|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver x86|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Driver|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format Debug|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format Debug|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format Debug|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format|Win32.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format|Win32.Build.0 = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Format|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount Debug|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount Debug|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount Debug|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount|Win32.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount|Win32.Build.0 = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Mount|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable Debug|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable Debug|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable Debug|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable|Win32.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable|Win32.Build.0 = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Portable|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release|Win32.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release|Win32.Build.0 = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Release|x64.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.ReleaseCustomEFI|Win32.ActiveCfg = ReleaseCustomEFI|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.ReleaseCustomEFI|Win32.Build.0 = ReleaseCustomEFI|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.ReleaseCustomEFI|x64.ActiveCfg = ReleaseCustomEFI|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup Debug|Win32.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup Debug|Win32.Build.0 = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup Debug|x64.ActiveCfg = Debug|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup|Win32.ActiveCfg = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup|Win32.Build.0 = Release|Win32 + {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.Setup|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE |