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

Windows: Fix formatting issue during volume creation by using /Y for format.com and specifying removal parameter in FormatEx

The usage of /Y parameter in format.com simplifies the logic and makes the code robust since we don't need to send \n to the format.com process.
Specifying RemovableMedia parameter to FormatEx fixes its failure in Windows 10 and later to perform quick format. This is also more adequate since we are mounting the volume as removable media for the formatting process.
We also add better error management in order to display adequate error message to the user in case of failure
This commit is contained in:
Mounir IDRASSI
2023-07-01 15:16:46 +02:00
parent 17dcd73936
commit 0bfed6553d
44 changed files with 165 additions and 31 deletions

View File

@@ -1639,6 +1639,8 @@ Information about Corsican localization:
<entry lang="co" key="INVALID_EMV_PATH">U chjassu EMV hè inaccettevule.</entry>
<entry lang="co" key="EMV_KEYFILE_DATA_NOTFOUND">Impussibule di custruisce un schedariu chjave cù i dati di a carta EMV.\n\nUna di ste cundizione hè assente :\n- U certificatu di chjave publica ICC.\n- U certificatu di chjave publica di lemettore.\n- I dati CPCL.</entry>
<entry lang="co" key="SCARD_W_REMOVED_CARD">Alcuna carta in u lettore.\n\nAssicuratevi chì a carta hè framessa currettamente.</entry> </localization>
<entry lang="en" key="FORMAT_EXTERNAL_FAILED">Windows format.com command failed to format the volume as NTFS/exFAT/ReFS: Error 0x%.8X.\n\nFalling back to using Windows FormatEx API.</entry>
<entry lang="en" key="FORMATEX_API_FAILED">Windows FormatEx API failed to format the volume as NTFS/exFAT/ReFS.\n\nFailure status = %s.</entry>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="VeraCrypt">
<xs:complexType>