diff --git a/base/system/diskpart/diskpart_msg.mc b/base/system/diskpart/diskpart_msg.mc index e7baabcba7d..35bb7ce7813 100644 --- a/base/system/diskpart/diskpart_msg.mc +++ b/base/system/diskpart/diskpart_msg.mc @@ -7840,34 +7840,513 @@ SymbolicName=MSG_COMMAND_REMOVE Severity=Informational Facility=System Language=English - + Removes a drive letter or mounted folder pathname from the volume + with focus. + +Syntax: REMOVE [LETTER= | MOUNT= | ALL] [DISMOUNT] [NOERR] + + LETTER= The drive letter to be removed. + + MOUNT= + The mounted folder path to be removed. + + ALL Removes all current drive letters and mounted folder paths. + + DISMOUNT This parameter may be used if 1) all drive letters and + mounted folder paths have been removed from the volume, or + 2) the ALL parameter is specified. This parameter + specifies that the file system is to be dismounted and + the volume taken offline. If other processes are using + the volume, DiskPart closes any open handles before + dismounting the file system and taking the volume offline. + You can bring the volume online by assigning it a driver + letter, by creating a mounted folder path to the volume, or + by using the ONLINE command. DISMOUNT will fail if used + on a volume that has any remaining drive letters or mounted + folder paths. For scripting, using REMOVE ALL DISMOUNT is + recommended. + + NOERR For scripting only. When an error is encountered, DiskPart + continues to process commands as if the error did not occur. + Without the NOERR parameter, an error causes DiskPart to exit + with an error code. + + If no drive letter or mounted folder path is specified, DiskPart removes + the first drive letter or mounted folder path it encounters. If the ALL + parameter is used, all current drive letters and mounted folder paths + are removed. If the DISMOUNT parameter is used, DiskPart closes all open + handles to the volume and then dismounts the volume and takes it offline. + + The REMOVE command can be used to change the drive letter associated with a + removable drive. You cannot remove the drive letters on boot or + paging volumes. + + A volume must be selected for this operation to succeed. + +Example: + + REMOVE LETTER=K + REMOVE MOUNT=G:\\MountH + REMOVE ALL DISMOUNT . Language=German - + Entfernt einen Laufwerkbuchstaben oder Pfadnamen für eingebundene Ordner + vom Volume, das den Fokus hat. + +Syntax: REMOVE [LETTER= | MOUNT= | ALL] [DISMOUNT] [NOERR] + + LETTER= Der Laufwerkbuchstabe, der entfernt werden soll. + + MOUNT= + Der Pfad des eingebundenen Ordners, der entfernt werden + soll. + + ALL Entfernt alle aktuellen Laufwerksbuchstaben und Pfade der + eingebundenen Ordner. + + DISMOUNT Der Parameter kann verwendet werden, falls 1) alle + Laufwerkbuchstaben und Pfade der eingebundenen Ordner vom + Volume entfernt wurden oder 2) falls der Parameter ALL + angegeben wird. Durch diesen Parameter wird angegeben, dass die + Bereitstellung des Dateisystems aufgehoben und das Volume + in den Offlinezustand versetzt werden soll. Wird das + Volume in anderen Prozessen verwendet, werden von DiskPart alle + geöffneten Handles geschlossen, bevor die Bereitstellung des + Dateisystems aufgehoben und das Volume in den Offlinezustand + versetzt wird. + Sie können das Volume in den Onlinezustand versetzen, indem Sie + ihm einen Laufwerkbuchstaben zuweisen. Erstellen Sie dazu einen + Pfad für einen eingebundenen Ordner zum Volume, oder + verwenden Sie den Befehl ONLINE. + Der Befehl DISMOUNT schlägt fehl, falls er auf einem Volume + ausgeführt wird, das verbleibende Laufwerkbuchstaben oder Pfade + für eingebundene Ordner beinhaltet. Für Skripting wird der + Befehl REMOVE ALL DISMOUNT empfohlen. + + NOERR Nur für Skripting. Bei einem Fehler setzt DiskPart die + Verarbeitung von Befehlen fort, als sei der Fehler nicht + aufgetreten. Ohne den Parameter NOERR wird DiskPart bei + einem Fehler mit entsprechendem Fehlercode beendet. + + Wurde kein Laufwerkbuchstabe oder Pfad für einen eingebundenen Ordner + angegeben, wird von DiskPart der erste erkannte Laufwerkbuchstabe oder Pfad + für eingebundene Ordner entfernt. Bei Verwendung des Parameters ALL + werden alle aktuellen Laufwerkbuchstaben und Pfade für eingebundene Ordner + entfernt. Bei Verwendung des Parameters DISMOUNT werden von DiskPart alle + geöffneten Handles für das Volume geschlossen, bevor die Bereitstellung des + Volumes aufgehoben und dieses in den Offlinezustand versetzt wird. + + Der Befehl REMOVE kann zum Ändern des Laufwerkbuchstabens verwendet werden, + der einem Wechseldatenträger zugeordnet ist. Sie können die + Laufwerkbuchstaben auf Start- oder Auslagerungsvolumes nicht entfernen. + + Damit dieser Vorgang erfolgreich verläuft, muss ein Volume ausgewählt werden. + +Beispiel: + + REMOVE LETTER=K + REMOVE MOUNT=G:\\MountH + REMOVE ALL DISMOUNT . Language=Polish - + Removes a drive letter or mounted folder pathname from the volume + with focus. + +Syntax: REMOVE [LETTER= | MOUNT= | ALL] [DISMOUNT] [NOERR] + + LETTER= The drive letter to be removed. + + MOUNT= + The mounted folder path to be removed. + + ALL Removes all current drive letters and mounted folder paths. + + DISMOUNT This parameter may be used if 1) all drive letters and + mounted folder paths have been removed from the volume, or + 2) the ALL parameter is specified. This parameter + specifies that the file system is to be dismounted and + the volume taken offline. If other processes are using + the volume, DiskPart closes any open handles before + dismounting the file system and taking the volume offline. + You can bring the volume online by assigning it a driver + letter, by creating a mounted folder path to the volume, or + by using the ONLINE command. DISMOUNT will fail if used + on a volume that has any remaining drive letters or mounted + folder paths. For scripting, using REMOVE ALL DISMOUNT is + recommended. + + NOERR For scripting only. When an error is encountered, DiskPart + continues to process commands as if the error did not occur. + Without the NOERR parameter, an error causes DiskPart to exit + with an error code. + + If no drive letter or mounted folder path is specified, DiskPart removes + the first drive letter or mounted folder path it encounters. If the ALL + parameter is used, all current drive letters and mounted folder paths + are removed. If the DISMOUNT parameter is used, DiskPart closes all open + handles to the volume and then dismounts the volume and takes it offline. + + The REMOVE command can be used to change the drive letter associated with a + removable drive. You cannot remove the drive letters on boot or + paging volumes. + + A volume must be selected for this operation to succeed. + +Example: + + REMOVE LETTER=K + REMOVE MOUNT=G:\\MountH + REMOVE ALL DISMOUNT . Language=Portugese - + Removes a drive letter or mounted folder pathname from the volume + with focus. + +Syntax: REMOVE [LETTER= | MOUNT= | ALL] [DISMOUNT] [NOERR] + + LETTER= The drive letter to be removed. + + MOUNT= + The mounted folder path to be removed. + + ALL Removes all current drive letters and mounted folder paths. + + DISMOUNT This parameter may be used if 1) all drive letters and + mounted folder paths have been removed from the volume, or + 2) the ALL parameter is specified. This parameter + specifies that the file system is to be dismounted and + the volume taken offline. If other processes are using + the volume, DiskPart closes any open handles before + dismounting the file system and taking the volume offline. + You can bring the volume online by assigning it a driver + letter, by creating a mounted folder path to the volume, or + by using the ONLINE command. DISMOUNT will fail if used + on a volume that has any remaining drive letters or mounted + folder paths. For scripting, using REMOVE ALL DISMOUNT is + recommended. + + NOERR For scripting only. When an error is encountered, DiskPart + continues to process commands as if the error did not occur. + Without the NOERR parameter, an error causes DiskPart to exit + with an error code. + + If no drive letter or mounted folder path is specified, DiskPart removes + the first drive letter or mounted folder path it encounters. If the ALL + parameter is used, all current drive letters and mounted folder paths + are removed. If the DISMOUNT parameter is used, DiskPart closes all open + handles to the volume and then dismounts the volume and takes it offline. + + The REMOVE command can be used to change the drive letter associated with a + removable drive. You cannot remove the drive letters on boot or + paging volumes. + + A volume must be selected for this operation to succeed. + +Example: + + REMOVE LETTER=K + REMOVE MOUNT=G:\\MountH + REMOVE ALL DISMOUNT . Language=Romanian - + Removes a drive letter or mounted folder pathname from the volume + with focus. + +Syntax: REMOVE [LETTER= | MOUNT= | ALL] [DISMOUNT] [NOERR] + + LETTER= The drive letter to be removed. + + MOUNT= + The mounted folder path to be removed. + + ALL Removes all current drive letters and mounted folder paths. + + DISMOUNT This parameter may be used if 1) all drive letters and + mounted folder paths have been removed from the volume, or + 2) the ALL parameter is specified. This parameter + specifies that the file system is to be dismounted and + the volume taken offline. If other processes are using + the volume, DiskPart closes any open handles before + dismounting the file system and taking the volume offline. + You can bring the volume online by assigning it a driver + letter, by creating a mounted folder path to the volume, or + by using the ONLINE command. DISMOUNT will fail if used + on a volume that has any remaining drive letters or mounted + folder paths. For scripting, using REMOVE ALL DISMOUNT is + recommended. + + NOERR For scripting only. When an error is encountered, DiskPart + continues to process commands as if the error did not occur. + Without the NOERR parameter, an error causes DiskPart to exit + with an error code. + + If no drive letter or mounted folder path is specified, DiskPart removes + the first drive letter or mounted folder path it encounters. If the ALL + parameter is used, all current drive letters and mounted folder paths + are removed. If the DISMOUNT parameter is used, DiskPart closes all open + handles to the volume and then dismounts the volume and takes it offline. + + The REMOVE command can be used to change the drive letter associated with a + removable drive. You cannot remove the drive letters on boot or + paging volumes. + + A volume must be selected for this operation to succeed. + +Example: + + REMOVE LETTER=K + REMOVE MOUNT=G:\\MountH + REMOVE ALL DISMOUNT . Language=Russian - + Removes a drive letter or mounted folder pathname from the volume + with focus. + +Syntax: REMOVE [LETTER= | MOUNT= | ALL] [DISMOUNT] [NOERR] + + LETTER= The drive letter to be removed. + + MOUNT= + The mounted folder path to be removed. + + ALL Removes all current drive letters and mounted folder paths. + + DISMOUNT This parameter may be used if 1) all drive letters and + mounted folder paths have been removed from the volume, or + 2) the ALL parameter is specified. This parameter + specifies that the file system is to be dismounted and + the volume taken offline. If other processes are using + the volume, DiskPart closes any open handles before + dismounting the file system and taking the volume offline. + You can bring the volume online by assigning it a driver + letter, by creating a mounted folder path to the volume, or + by using the ONLINE command. DISMOUNT will fail if used + on a volume that has any remaining drive letters or mounted + folder paths. For scripting, using REMOVE ALL DISMOUNT is + recommended. + + NOERR For scripting only. When an error is encountered, DiskPart + continues to process commands as if the error did not occur. + Without the NOERR parameter, an error causes DiskPart to exit + with an error code. + + If no drive letter or mounted folder path is specified, DiskPart removes + the first drive letter or mounted folder path it encounters. If the ALL + parameter is used, all current drive letters and mounted folder paths + are removed. If the DISMOUNT parameter is used, DiskPart closes all open + handles to the volume and then dismounts the volume and takes it offline. + + The REMOVE command can be used to change the drive letter associated with a + removable drive. You cannot remove the drive letters on boot or + paging volumes. + + A volume must be selected for this operation to succeed. + +Example: + + REMOVE LETTER=K + REMOVE MOUNT=G:\\MountH + REMOVE ALL DISMOUNT . Language=Albanian - + Removes a drive letter or mounted folder pathname from the volume + with focus. + +Syntax: REMOVE [LETTER= | MOUNT= | ALL] [DISMOUNT] [NOERR] + + LETTER= The drive letter to be removed. + + MOUNT= + The mounted folder path to be removed. + + ALL Removes all current drive letters and mounted folder paths. + + DISMOUNT This parameter may be used if 1) all drive letters and + mounted folder paths have been removed from the volume, or + 2) the ALL parameter is specified. This parameter + specifies that the file system is to be dismounted and + the volume taken offline. If other processes are using + the volume, DiskPart closes any open handles before + dismounting the file system and taking the volume offline. + You can bring the volume online by assigning it a driver + letter, by creating a mounted folder path to the volume, or + by using the ONLINE command. DISMOUNT will fail if used + on a volume that has any remaining drive letters or mounted + folder paths. For scripting, using REMOVE ALL DISMOUNT is + recommended. + + NOERR For scripting only. When an error is encountered, DiskPart + continues to process commands as if the error did not occur. + Without the NOERR parameter, an error causes DiskPart to exit + with an error code. + + If no drive letter or mounted folder path is specified, DiskPart removes + the first drive letter or mounted folder path it encounters. If the ALL + parameter is used, all current drive letters and mounted folder paths + are removed. If the DISMOUNT parameter is used, DiskPart closes all open + handles to the volume and then dismounts the volume and takes it offline. + + The REMOVE command can be used to change the drive letter associated with a + removable drive. You cannot remove the drive letters on boot or + paging volumes. + + A volume must be selected for this operation to succeed. + +Example: + + REMOVE LETTER=K + REMOVE MOUNT=G:\\MountH + REMOVE ALL DISMOUNT . Language=Turkish - + Removes a drive letter or mounted folder pathname from the volume + with focus. + +Syntax: REMOVE [LETTER= | MOUNT= | ALL] [DISMOUNT] [NOERR] + + LETTER= The drive letter to be removed. + + MOUNT= + The mounted folder path to be removed. + + ALL Removes all current drive letters and mounted folder paths. + + DISMOUNT This parameter may be used if 1) all drive letters and + mounted folder paths have been removed from the volume, or + 2) the ALL parameter is specified. This parameter + specifies that the file system is to be dismounted and + the volume taken offline. If other processes are using + the volume, DiskPart closes any open handles before + dismounting the file system and taking the volume offline. + You can bring the volume online by assigning it a driver + letter, by creating a mounted folder path to the volume, or + by using the ONLINE command. DISMOUNT will fail if used + on a volume that has any remaining drive letters or mounted + folder paths. For scripting, using REMOVE ALL DISMOUNT is + recommended. + + NOERR For scripting only. When an error is encountered, DiskPart + continues to process commands as if the error did not occur. + Without the NOERR parameter, an error causes DiskPart to exit + with an error code. + + If no drive letter or mounted folder path is specified, DiskPart removes + the first drive letter or mounted folder path it encounters. If the ALL + parameter is used, all current drive letters and mounted folder paths + are removed. If the DISMOUNT parameter is used, DiskPart closes all open + handles to the volume and then dismounts the volume and takes it offline. + + The REMOVE command can be used to change the drive letter associated with a + removable drive. You cannot remove the drive letters on boot or + paging volumes. + + A volume must be selected for this operation to succeed. + +Example: + + REMOVE LETTER=K + REMOVE MOUNT=G:\\MountH + REMOVE ALL DISMOUNT . Language=Chinese - + Removes a drive letter or mounted folder pathname from the volume + with focus. + +Syntax: REMOVE [LETTER= | MOUNT= | ALL] [DISMOUNT] [NOERR] + + LETTER= The drive letter to be removed. + + MOUNT= + The mounted folder path to be removed. + + ALL Removes all current drive letters and mounted folder paths. + + DISMOUNT This parameter may be used if 1) all drive letters and + mounted folder paths have been removed from the volume, or + 2) the ALL parameter is specified. This parameter + specifies that the file system is to be dismounted and + the volume taken offline. If other processes are using + the volume, DiskPart closes any open handles before + dismounting the file system and taking the volume offline. + You can bring the volume online by assigning it a driver + letter, by creating a mounted folder path to the volume, or + by using the ONLINE command. DISMOUNT will fail if used + on a volume that has any remaining drive letters or mounted + folder paths. For scripting, using REMOVE ALL DISMOUNT is + recommended. + + NOERR For scripting only. When an error is encountered, DiskPart + continues to process commands as if the error did not occur. + Without the NOERR parameter, an error causes DiskPart to exit + with an error code. + + If no drive letter or mounted folder path is specified, DiskPart removes + the first drive letter or mounted folder path it encounters. If the ALL + parameter is used, all current drive letters and mounted folder paths + are removed. If the DISMOUNT parameter is used, DiskPart closes all open + handles to the volume and then dismounts the volume and takes it offline. + + The REMOVE command can be used to change the drive letter associated with a + removable drive. You cannot remove the drive letters on boot or + paging volumes. + + A volume must be selected for this operation to succeed. + +Example: + + REMOVE LETTER=K + REMOVE MOUNT=G:\\MountH + REMOVE ALL DISMOUNT . Language=Taiwanese - + Removes a drive letter or mounted folder pathname from the volume + with focus. + +Syntax: REMOVE [LETTER= | MOUNT= | ALL] [DISMOUNT] [NOERR] + + LETTER= The drive letter to be removed. + + MOUNT= + The mounted folder path to be removed. + + ALL Removes all current drive letters and mounted folder paths. + + DISMOUNT This parameter may be used if 1) all drive letters and + mounted folder paths have been removed from the volume, or + 2) the ALL parameter is specified. This parameter + specifies that the file system is to be dismounted and + the volume taken offline. If other processes are using + the volume, DiskPart closes any open handles before + dismounting the file system and taking the volume offline. + You can bring the volume online by assigning it a driver + letter, by creating a mounted folder path to the volume, or + by using the ONLINE command. DISMOUNT will fail if used + on a volume that has any remaining drive letters or mounted + folder paths. For scripting, using REMOVE ALL DISMOUNT is + recommended. + + NOERR For scripting only. When an error is encountered, DiskPart + continues to process commands as if the error did not occur. + Without the NOERR parameter, an error causes DiskPart to exit + with an error code. + + If no drive letter or mounted folder path is specified, DiskPart removes + the first drive letter or mounted folder path it encounters. If the ALL + parameter is used, all current drive letters and mounted folder paths + are removed. If the DISMOUNT parameter is used, DiskPart closes all open + handles to the volume and then dismounts the volume and takes it offline. + + The REMOVE command can be used to change the drive letter associated with a + removable drive. You cannot remove the drive letters on boot or + paging volumes. + + A volume must be selected for this operation to succeed. + +Example: + + REMOVE LETTER=K + REMOVE MOUNT=G:\\MountH + REMOVE ALL DISMOUNT . diff --git a/base/system/diskpart/lang/de-DE.rc b/base/system/diskpart/lang/de-DE.rc index 096cc8780c1..4b178ec427c 100644 --- a/base/system/diskpart/lang/de-DE.rc +++ b/base/system/diskpart/lang/de-DE.rc @@ -134,7 +134,16 @@ BEGIN IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n" END -/* RESCAN command string */ +/* REMOVE command strings */ +STRINGTABLE +BEGIN + IDS_REMOVE_FAIL "\nDer Laufwerkbuchstabe oder der Bereitstellungspunkt konnte nicht entfernt werden.\nVergewissern Sie sich, dass der Laufwerkbuchstabe oder der Bereitstellungspunkt gültig ist.\n" + IDS_REMOVE_SUCCESS "\nDer Laufwerkbuchstabe oder der Bereitstellungspunkt wurde erfolgreich entfernt.\n" + IDS_REMOVE_NO_LETTER "\nDas gewählte Volume hat keinen Laufwerkbuchstabe oder Bereitstellungspunkt,\nder entfernt werden kann.\n" + IDS_REMOVE_WRONG_LETTER "\nDer angegebene Laufwerksbuchstabe ist nicht diesem Volume zugeordnet.\n" +END + +/* RESCAN command strings */ STRINGTABLE BEGIN IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" @@ -250,7 +259,7 @@ BEGIN IDS_HELP_ONLINE "Schaltet ein Objekt online, das derzeit als offline\n gekennzeichnet ist.\n" IDS_HELP_RECOVER "Refreshes the state of all disks in the invalid pack,\n and resynchronizes mirrored volumes and RAID5 volumes\n that have stale plex or parity data.\n" IDS_HELP_REM "Keine Aktion. Wird für Skriptkommentare verwendet.\n" - IDS_HELP_REMOVE "Entfernt einen Laufwerksbuchstaben oder eine\n Bereitstellungspunktzuordnung.\n" + IDS_HELP_REMOVE "Entfernt einen Laufwerksbuchstaben oder einen\n Bereitstellungspunkt.\n" IDS_HELP_REPAIR "Repariert ein RAID-5-Volume mit einem fehlerhaften Mitglied.\n" IDS_HELP_RESCAN "Überprüft den Computer erneut auf Datenträger oder Volumes.\n" IDS_HELP_RETAIN "Setzt eine beibehaltene Partition unter ein einfaches Volume.\n" diff --git a/base/system/diskpart/lang/en-US.rc b/base/system/diskpart/lang/en-US.rc index ccea27cf19c..c75a91e69c9 100644 --- a/base/system/diskpart/lang/en-US.rc +++ b/base/system/diskpart/lang/en-US.rc @@ -134,7 +134,16 @@ BEGIN IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n" END -/* RESCAN command string */ +/* REMOVE command strings */ +STRINGTABLE +BEGIN + IDS_REMOVE_FAIL "\nDiskPart could not remove the drive letter or mount point.\nMake sure the drive letter or mount point is valid.\n" + IDS_REMOVE_SUCCESS "\nDiskPart successfully removed the drive letter or mount point.\n" + IDS_REMOVE_NO_LETTER "\nThe selected volume has no letter or mount point to remove.\n" + IDS_REMOVE_WRONG_LETTER "\nThe letter you specified is not assigned to that volume.\n" +END + +/* RESCAN command strings */ STRINGTABLE BEGIN IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" @@ -153,7 +162,7 @@ BEGIN IDS_SELECT_PARTITION "\nPartition %lu is now the selected partition.\n\n" IDS_SELECT_PARTITION_NO_DISK "\nThere is no disk for selecting a partition.\nPlease select a disk and try again.\n\n" IDS_SELECT_PARTITION_INVALID "\nInvalid partition.\n\n" - IDS_SELECT_NO_VOLUME "\nThere is no volume currently selected.\nPlease select a disk and try again.\n\n" + IDS_SELECT_NO_VOLUME "\nThere is no volume currently selected.\nPlease select a volume and try again.\n\n" IDS_SELECT_VOLUME "\nVolume %lu is now the selected volume.\n\n" IDS_SELECT_VOLUME_INVALID "\nInvalid volume.\n\n" END diff --git a/base/system/diskpart/lang/it-IT.rc b/base/system/diskpart/lang/it-IT.rc index 113bbb06110..1dd49a3abf3 100644 --- a/base/system/diskpart/lang/it-IT.rc +++ b/base/system/diskpart/lang/it-IT.rc @@ -141,7 +141,16 @@ BEGIN IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n" END -/* RESCAN command string */ +/* REMOVE command strings */ +STRINGTABLE +BEGIN + IDS_REMOVE_FAIL "\nDiskPart could not remove the drive letter or mount point.\nMake sure the drive letter or mount point is valid.\n" + IDS_REMOVE_SUCCESS "\nDiskPart successfully removed the drive letter or mount point.\n" + IDS_REMOVE_NO_LETTER "\nThe selected volume has no letter or mount point to remove.\n" + IDS_REMOVE_WRONG_LETTER "\nThe letter you specified is not assigned to that volume.\n" +END + +/* RESCAN command strings */ STRINGTABLE BEGIN IDS_RESCAN_START "\nSi prega di attendere mentre DiskPart esanima la tua configurazione...\n" diff --git a/base/system/diskpart/lang/pl-PL.rc b/base/system/diskpart/lang/pl-PL.rc index 73942784952..20e388fe0e4 100644 --- a/base/system/diskpart/lang/pl-PL.rc +++ b/base/system/diskpart/lang/pl-PL.rc @@ -134,7 +134,16 @@ BEGIN IDS_LIST_VOLUME_FORMAT "%c Wolumin %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n" END -/* RESCAN command string */ +/* REMOVE command strings */ +STRINGTABLE +BEGIN + IDS_REMOVE_FAIL "\nDiskPart could not remove the drive letter or mount point.\nMake sure the drive letter or mount point is valid.\n" + IDS_REMOVE_SUCCESS "\nDiskPart successfully removed the drive letter or mount point.\n" + IDS_REMOVE_NO_LETTER "\nThe selected volume has no letter or mount point to remove.\n" + IDS_REMOVE_WRONG_LETTER "\nThe letter you specified is not assigned to that volume.\n" +END + +/* RESCAN command strings */ STRINGTABLE BEGIN IDS_RESCAN_START "\nCzekaj, aż program DiskPart przeskanuje konfigurację...\n" diff --git a/base/system/diskpart/lang/pt-PT.rc b/base/system/diskpart/lang/pt-PT.rc index acb65bde010..c9294615a7d 100644 --- a/base/system/diskpart/lang/pt-PT.rc +++ b/base/system/diskpart/lang/pt-PT.rc @@ -136,7 +136,16 @@ BEGIN IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n" END -/* RESCAN command string */ +/* REMOVE command strings */ +STRINGTABLE +BEGIN + IDS_REMOVE_FAIL "\nDiskPart could not remove the drive letter or mount point.\nMake sure the drive letter or mount point is valid.\n" + IDS_REMOVE_SUCCESS "\nDiskPart successfully removed the drive letter or mount point.\n" + IDS_REMOVE_NO_LETTER "\nThe selected volume has no letter or mount point to remove.\n" + IDS_REMOVE_WRONG_LETTER "\nThe letter you specified is not assigned to that volume.\n" +END + +/* RESCAN command strings */ STRINGTABLE BEGIN IDS_RESCAN_START "\nPor favor espere enquando o particionamento de disco faz uma varredura à sua configuração...\n" diff --git a/base/system/diskpart/lang/ro-RO.rc b/base/system/diskpart/lang/ro-RO.rc index 88c181e0193..b66e7a92dc7 100644 --- a/base/system/diskpart/lang/ro-RO.rc +++ b/base/system/diskpart/lang/ro-RO.rc @@ -142,7 +142,16 @@ BEGIN IDS_LIST_VOLUME_FORMAT "%c Volum %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n" END -/* RESCAN command string */ +/* REMOVE command strings */ +STRINGTABLE +BEGIN + IDS_REMOVE_FAIL "\nDiskPart could not remove the drive letter or mount point.\nMake sure the drive letter or mount point is valid.\n" + IDS_REMOVE_SUCCESS "\nDiskPart successfully removed the drive letter or mount point.\n" + IDS_REMOVE_NO_LETTER "\nThe selected volume has no letter or mount point to remove.\n" + IDS_REMOVE_WRONG_LETTER "\nThe letter you specified is not assigned to that volume.\n" +END + +/* RESCAN command strings */ STRINGTABLE BEGIN IDS_RESCAN_START "\nAșteptați-vă scanarea configurației...\n" diff --git a/base/system/diskpart/lang/ru-RU.rc b/base/system/diskpart/lang/ru-RU.rc index 53977b92aab..e68b3969fb3 100644 --- a/base/system/diskpart/lang/ru-RU.rc +++ b/base/system/diskpart/lang/ru-RU.rc @@ -136,7 +136,16 @@ BEGIN IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n" END -/* RESCAN command string */ +/* REMOVE command strings */ +STRINGTABLE +BEGIN + IDS_REMOVE_FAIL "\nDiskPart could not remove the drive letter or mount point.\nMake sure the drive letter or mount point is valid.\n" + IDS_REMOVE_SUCCESS "\nDiskPart successfully removed the drive letter or mount point.\n" + IDS_REMOVE_NO_LETTER "\nThe selected volume has no letter or mount point to remove.\n" + IDS_REMOVE_WRONG_LETTER "\nThe letter you specified is not assigned to that volume.\n" +END + +/* RESCAN command strings */ STRINGTABLE BEGIN IDS_RESCAN_START "\nОжидайте окончания проверки программой DiskPart конфигурации...\n" diff --git a/base/system/diskpart/lang/sq-AL.rc b/base/system/diskpart/lang/sq-AL.rc index c430c306cb7..71a9f57ae5e 100644 --- a/base/system/diskpart/lang/sq-AL.rc +++ b/base/system/diskpart/lang/sq-AL.rc @@ -138,7 +138,16 @@ BEGIN IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n" END -/* RESCAN command string */ +/* REMOVE command strings */ +STRINGTABLE +BEGIN + IDS_REMOVE_FAIL "\nDiskPart could not remove the drive letter or mount point.\nMake sure the drive letter or mount point is valid.\n" + IDS_REMOVE_SUCCESS "\nDiskPart successfully removed the drive letter or mount point.\n" + IDS_REMOVE_NO_LETTER "\nThe selected volume has no letter or mount point to remove.\n" + IDS_REMOVE_WRONG_LETTER "\nThe letter you specified is not assigned to that volume.\n" +END + +/* RESCAN command strings */ STRINGTABLE BEGIN IDS_RESCAN_START "\nPlease wait while DiskPart scans your configuration...\n" diff --git a/base/system/diskpart/lang/tr-TR.rc b/base/system/diskpart/lang/tr-TR.rc index e8eb40e5955..6a51de17ed9 100644 --- a/base/system/diskpart/lang/tr-TR.rc +++ b/base/system/diskpart/lang/tr-TR.rc @@ -144,7 +144,16 @@ BEGIN IDS_LIST_VOLUME_FORMAT "%c Birim %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n" END -/* RESCAN command string */ +/* REMOVE command strings */ +STRINGTABLE +BEGIN + IDS_REMOVE_FAIL "\nDiskPart could not remove the drive letter or mount point.\nMake sure the drive letter or mount point is valid.\n" + IDS_REMOVE_SUCCESS "\nDiskPart successfully removed the drive letter or mount point.\n" + IDS_REMOVE_NO_LETTER "\nThe selected volume has no letter or mount point to remove.\n" + IDS_REMOVE_WRONG_LETTER "\nThe letter you specified is not assigned to that volume.\n" +END + +/* RESCAN command strings */ STRINGTABLE BEGIN IDS_RESCAN_START "\nDiskPart yapılandırmanızı tararken lütfen bekleyiniz...\n" diff --git a/base/system/diskpart/lang/zh-CN.rc b/base/system/diskpart/lang/zh-CN.rc index aeaabeeb228..ad207ee44e1 100644 --- a/base/system/diskpart/lang/zh-CN.rc +++ b/base/system/diskpart/lang/zh-CN.rc @@ -143,7 +143,16 @@ BEGIN IDS_LIST_VOLUME_FORMAT "%c Volume %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n" END -/* RESCAN command string */ +/* REMOVE command strings */ +STRINGTABLE +BEGIN + IDS_REMOVE_FAIL "\nDiskPart could not remove the drive letter or mount point.\nMake sure the drive letter or mount point is valid.\n" + IDS_REMOVE_SUCCESS "\nDiskPart successfully removed the drive letter or mount point.\n" + IDS_REMOVE_NO_LETTER "\nThe selected volume has no letter or mount point to remove.\n" + IDS_REMOVE_WRONG_LETTER "\nThe letter you specified is not assigned to that volume.\n" +END + +/* RESCAN command strings */ STRINGTABLE BEGIN IDS_RESCAN_START "\nDiskPart 正在扫描您的配置,请稍候...\n" diff --git a/base/system/diskpart/lang/zh-TW.rc b/base/system/diskpart/lang/zh-TW.rc index 472ec8bafd6..b656e82fc23 100644 --- a/base/system/diskpart/lang/zh-TW.rc +++ b/base/system/diskpart/lang/zh-TW.rc @@ -143,7 +143,16 @@ BEGIN IDS_LIST_VOLUME_FORMAT "%c 磁碟區 %-3lu %c %-11.11s %-5s %-10.10s %4I64u %-2s\n" END -/* RESCAN command string */ +/* REMOVE command strings */ +STRINGTABLE +BEGIN + IDS_REMOVE_FAIL "\nDiskPart could not remove the drive letter or mount point.\nMake sure the drive letter or mount point is valid.\n" + IDS_REMOVE_SUCCESS "\nDiskPart successfully removed the drive letter or mount point.\n" + IDS_REMOVE_NO_LETTER "\nThe selected volume has no letter or mount point to remove.\n" + IDS_REMOVE_WRONG_LETTER "\nThe letter you specified is not assigned to that volume.\n" +END + +/* RESCAN command strings */ STRINGTABLE BEGIN IDS_RESCAN_START "\nDiskPart 掃描您的設定,請稍候...\n" diff --git a/base/system/diskpart/remove.c b/base/system/diskpart/remove.c index 01f02bdf176..d4726ce4a15 100644 --- a/base/system/diskpart/remove.c +++ b/base/system/diskpart/remove.c @@ -8,7 +8,119 @@ #include "diskpart.h" -BOOL remove_main(INT argc, LPWSTR *argv) +#define NDEBUG +#include + +BOOL +remove_main( + _In_ INT argc, + _In_ LPWSTR *argv) { + WCHAR szMountPoint[4]; + PWSTR pszSuffix = NULL; + PWSTR pszLetter = NULL; + INT i; + BOOL bResult; + + DPRINT("remove_main()\n"); + + if (CurrentVolume == NULL) + { + ConResPuts(StdOut, IDS_SELECT_NO_VOLUME); + return TRUE; + } + + if (CurrentVolume->DriveLetter == UNICODE_NULL) + { + ConResPuts(StdOut, IDS_REMOVE_NO_LETTER); + return TRUE; + } + + for (i = 1; i < argc; i++) + { + if (_wcsicmp(argv[i], L"noerr") == 0) + { + /* noerr */ + ConPuts(StdOut, L"The NOERR option is not supported yet!\n"); +#if 0 + bNoErr = TRUE; +#endif + } + } + + for (i = 1; i < argc; i++) + { + if (HasPrefix(argv[i], L"letter=", &pszSuffix)) + { + if ((wcslen(pszSuffix) == 1) && (iswalpha(*pszSuffix))) + { + pszLetter = pszSuffix; + } + else + { + ConResPuts(StdErr, IDS_ERROR_INVALID_ARGS); + return TRUE; + } + } + else if (HasPrefix(argv[i], L"mount=", &pszSuffix)) + { + DPRINT("Mount\n", pszSuffix); + ConPuts(StdOut, L"The MOUNT option is not supported yet!\n"); + } + else if (_wcsicmp(argv[i], L"all") == 0) + { + ConPuts(StdOut, L"The ALL option is not supported yet!\n"); + } + else if (_wcsicmp(argv[i], L"dismount") == 0) + { + ConPuts(StdOut, L"The DISMOUNT option is not supported yet!\n"); + } + else if (_wcsicmp(argv[i], L"noerr") == 0) + { + /* noerr - Already handled above */ + } + else + { + ConResPuts(StdErr, IDS_ERROR_INVALID_ARGS); + return TRUE; + } + } + + DPRINT("VolumeName: %S\n", CurrentVolume->VolumeName); + DPRINT("DeviceName: %S\n", CurrentVolume->DeviceName); + DPRINT("DriveLetter: %C\n", CurrentVolume->DriveLetter); + + if (pszLetter) + { + if (towupper(pszLetter[0]) != CurrentVolume->DriveLetter) + { + ConResPuts(StdOut, IDS_REMOVE_WRONG_LETTER); + return TRUE; + } + + szMountPoint[0] = towupper(pszLetter[0]); + szMountPoint[1] = L':'; + szMountPoint[2] = L'\\'; + szMountPoint[3] = UNICODE_NULL; + } + else + { + szMountPoint[0] = CurrentVolume->DriveLetter; + szMountPoint[1] = L':'; + szMountPoint[2] = L'\\'; + szMountPoint[3] = UNICODE_NULL; + } + + DPRINT("MountPoint: %S\n", szMountPoint); + bResult = DeleteVolumeMountPointW(szMountPoint); + if (bResult == FALSE) + { + ConResPuts(StdOut, IDS_REMOVE_FAIL); + return TRUE; + } + + CurrentVolume->DriveLetter = UNICODE_NULL; + ConResPuts(StdOut, IDS_REMOVE_SUCCESS); + return TRUE; } diff --git a/base/system/diskpart/resource.h b/base/system/diskpart/resource.h index 684ae83ecf4..73dfd1477be 100644 --- a/base/system/diskpart/resource.h +++ b/base/system/diskpart/resource.h @@ -100,6 +100,11 @@ #define IDS_LIST_VOLUME_LINE 3309 #define IDS_LIST_VOLUME_FORMAT 3310 +#define IDS_REMOVE_FAIL 4000 +#define IDS_REMOVE_SUCCESS 4001 +#define IDS_REMOVE_NO_LETTER 4002 +#define IDS_REMOVE_WRONG_LETTER 4003 + #define IDS_RESCAN_START 4100 #define IDS_RESCAN_END 4101