mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Use “unmount” instead of “dismount” in scripts and in text shown to the user. (#1548)
This commit is contained in:
@@ -61,7 +61,7 @@ if not exist !mydriveletter!:\ (
|
|||||||
goto :exit
|
goto :exit
|
||||||
)
|
)
|
||||||
|
|
||||||
"!VERACRYPT_PATH!" /dismount !mydriveletter! /silent /q
|
"!VERACRYPT_PATH!" /unmount !mydriveletter! /silent /q
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Subroutine to measure the time taken for a command to execute
|
:: Subroutine to measure the time taken for a command to execute
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
• Chooses an exFAT cluster size (auto or explicit).
|
• Chooses an exFAT cluster size (auto or explicit).
|
||||||
• Calculates the minimum container size using an iterative approach for FAT/Bitmap sizing, plus safety margin.
|
• Calculates the minimum container size using an iterative approach for FAT/Bitmap sizing, plus safety margin.
|
||||||
• Creates, mounts, copies, verifies, and dismounts – all guarded by -WhatIf/-Confirm (SupportsShouldProcess).
|
• Creates, mounts, copies, verifies, and unmounts – all guarded by -WhatIf/-Confirm (SupportsShouldProcess).
|
||||||
• Finds VeraCrypt automatically or takes a -VeraCryptDir override.
|
• Finds VeraCrypt automatically or takes a -VeraCryptDir override.
|
||||||
• Encryption and hash algorithms are parameters.
|
• Encryption and hash algorithms are parameters.
|
||||||
• Password can be passed via SecureString prompt or pipeline.
|
• Password can be passed via SecureString prompt or pipeline.
|
||||||
@@ -420,13 +420,13 @@ try {
|
|||||||
} finally {
|
} finally {
|
||||||
if (Test-Path variable:plainPassword) { Clear-Variable plainPassword -ErrorAction SilentlyContinue }
|
if (Test-Path variable:plainPassword) { Clear-Variable plainPassword -ErrorAction SilentlyContinue }
|
||||||
if ($mounted) {
|
if ($mounted) {
|
||||||
if ($PSCmdlet.ShouldProcess("Drive $driveLetter", "Dismount VeraCrypt volume")) {
|
if ($PSCmdlet.ShouldProcess("Drive $driveLetter", "Unmount VeraCrypt volume")) {
|
||||||
Write-Verbose "Dismounting drive $driveLetter..."
|
Write-Verbose "Unmounting drive $driveLetter..."
|
||||||
$dismountArgs = @('/dismount', $driveLetter, '/force', '/quit', '/silent')
|
$unmountArgs = @('/unmount', $driveLetter, '/force', '/quit', '/silent')
|
||||||
Start-Process -FilePath $VeraCryptExe -ArgumentList $dismountArgs -NoNewWindow -Wait -ErrorAction SilentlyContinue
|
Start-Process -FilePath $VeraCryptExe -ArgumentList $unmountArgs -NoNewWindow -Wait -ErrorAction SilentlyContinue
|
||||||
Write-Verbose "Dismount command issued."
|
Write-Verbose "Unmount command issued."
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Dismount skipped due to -WhatIf."
|
Write-Host "Unmount skipped due to -WhatIf."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach($f in @($errFile,$mountFile) | Where-Object { $_ }) {
|
foreach($f in @($errFile,$mountFile) | Where-Object { $_ }) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
V="$(mount | grep veracrypt_aux_mnt)"
|
V="$(mount | grep veracrypt_aux_mnt)"
|
||||||
if [ ! -z "$V" ]
|
if [ ! -z "$V" ]
|
||||||
then
|
then
|
||||||
echo "Error: All VeraCrypt volumes must be dismounted first." >&2
|
echo "Error: All VeraCrypt volumes must be unmounted first." >&2
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
V="$(mount | grep veracrypt_aux_mnt)"
|
V="$(mount | grep veracrypt_aux_mnt)"
|
||||||
if [ ! -z "$V" ]
|
if [ ! -z "$V" ]
|
||||||
then
|
then
|
||||||
echo "Error: All VeraCrypt volumes must be dismounted first." >&2
|
echo "Error: All VeraCrypt volumes must be unmounted first." >&2
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user