mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 08:50:24 +08:00
[DISKPART] Implement the remove command
The remove command does not work, because the DeleteVolumeMountPointW function is not implemented yet.
This commit is contained in:
@@ -7840,34 +7840,513 @@ SymbolicName=MSG_COMMAND_REMOVE
|
||||
Severity=Informational
|
||||
Facility=System
|
||||
Language=English
|
||||
<Add REMOVE command help text here>
|
||||
Removes a drive letter or mounted folder pathname from the volume
|
||||
with focus.
|
||||
|
||||
Syntax: REMOVE [LETTER=<D> | MOUNT=<PATH> | ALL] [DISMOUNT] [NOERR]
|
||||
|
||||
LETTER=<D> The drive letter to be removed.
|
||||
|
||||
MOUNT=<PATH>
|
||||
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
|
||||
<Add REMOVE command help text here>
|
||||
Entfernt einen Laufwerkbuchstaben oder Pfadnamen für eingebundene Ordner
|
||||
vom Volume, das den Fokus hat.
|
||||
|
||||
Syntax: REMOVE [LETTER=<D> | MOUNT=<PFAD> | ALL] [DISMOUNT] [NOERR]
|
||||
|
||||
LETTER=<D> Der Laufwerkbuchstabe, der entfernt werden soll.
|
||||
|
||||
MOUNT=<PFAD>
|
||||
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
|
||||
<Add REMOVE command help text here>
|
||||
Removes a drive letter or mounted folder pathname from the volume
|
||||
with focus.
|
||||
|
||||
Syntax: REMOVE [LETTER=<D> | MOUNT=<PATH> | ALL] [DISMOUNT] [NOERR]
|
||||
|
||||
LETTER=<D> The drive letter to be removed.
|
||||
|
||||
MOUNT=<PATH>
|
||||
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
|
||||
<Add REMOVE command help text here>
|
||||
Removes a drive letter or mounted folder pathname from the volume
|
||||
with focus.
|
||||
|
||||
Syntax: REMOVE [LETTER=<D> | MOUNT=<PATH> | ALL] [DISMOUNT] [NOERR]
|
||||
|
||||
LETTER=<D> The drive letter to be removed.
|
||||
|
||||
MOUNT=<PATH>
|
||||
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
|
||||
<Adăugați aici textul de ajutor pentru comanda REMOVE>
|
||||
Removes a drive letter or mounted folder pathname from the volume
|
||||
with focus.
|
||||
|
||||
Syntax: REMOVE [LETTER=<D> | MOUNT=<PATH> | ALL] [DISMOUNT] [NOERR]
|
||||
|
||||
LETTER=<D> The drive letter to be removed.
|
||||
|
||||
MOUNT=<PATH>
|
||||
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
|
||||
<Add REMOVE command help text here>
|
||||
Removes a drive letter or mounted folder pathname from the volume
|
||||
with focus.
|
||||
|
||||
Syntax: REMOVE [LETTER=<D> | MOUNT=<PATH> | ALL] [DISMOUNT] [NOERR]
|
||||
|
||||
LETTER=<D> The drive letter to be removed.
|
||||
|
||||
MOUNT=<PATH>
|
||||
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
|
||||
<Add REMOVE command help text here>
|
||||
Removes a drive letter or mounted folder pathname from the volume
|
||||
with focus.
|
||||
|
||||
Syntax: REMOVE [LETTER=<D> | MOUNT=<PATH> | ALL] [DISMOUNT] [NOERR]
|
||||
|
||||
LETTER=<D> The drive letter to be removed.
|
||||
|
||||
MOUNT=<PATH>
|
||||
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
|
||||
<Add REMOVE command help text here>
|
||||
Removes a drive letter or mounted folder pathname from the volume
|
||||
with focus.
|
||||
|
||||
Syntax: REMOVE [LETTER=<D> | MOUNT=<PATH> | ALL] [DISMOUNT] [NOERR]
|
||||
|
||||
LETTER=<D> The drive letter to be removed.
|
||||
|
||||
MOUNT=<PATH>
|
||||
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
|
||||
<Add REMOVE command help text here>
|
||||
Removes a drive letter or mounted folder pathname from the volume
|
||||
with focus.
|
||||
|
||||
Syntax: REMOVE [LETTER=<D> | MOUNT=<PATH> | ALL] [DISMOUNT] [NOERR]
|
||||
|
||||
LETTER=<D> The drive letter to be removed.
|
||||
|
||||
MOUNT=<PATH>
|
||||
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
|
||||
<Add REMOVE command help text here>
|
||||
Removes a drive letter or mounted folder pathname from the volume
|
||||
with focus.
|
||||
|
||||
Syntax: REMOVE [LETTER=<D> | MOUNT=<PATH> | ALL] [DISMOUNT] [NOERR]
|
||||
|
||||
LETTER=<D> The drive letter to be removed.
|
||||
|
||||
MOUNT=<PATH>
|
||||
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
|
||||
.
|
||||
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -8,7 +8,119 @@
|
||||
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL remove_main(INT argc, LPWSTR *argv)
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user