mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[DISKPART] Implement the automount command
This commit is contained in:
@@ -8,8 +8,265 @@
|
||||
|
||||
#include "diskpart.h"
|
||||
|
||||
BOOL automount_main(INT argc, LPWSTR *argv)
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
|
||||
static
|
||||
NTSTATUS
|
||||
OpenMountManager(
|
||||
_Out_ PHANDLE MountMgrHandle,
|
||||
_In_ ACCESS_MASK Access)
|
||||
{
|
||||
ConPuts(StdOut, L"Automount\n");
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING DeviceName;
|
||||
IO_STATUS_BLOCK Iosb;
|
||||
|
||||
RtlInitUnicodeString(&DeviceName, MOUNTMGR_DEVICE_NAME);
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&DeviceName,
|
||||
0,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
return NtOpenFile(MountMgrHandle,
|
||||
Access | SYNCHRONIZE,
|
||||
&ObjectAttributes,
|
||||
&Iosb,
|
||||
0,
|
||||
FILE_SYNCHRONOUS_IO_NONALERT);
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
BOOL
|
||||
ShowAutomountState(VOID)
|
||||
{
|
||||
HANDLE MountMgrHandle;
|
||||
MOUNTMGR_QUERY_AUTO_MOUNT AutoMount;
|
||||
IO_STATUS_BLOCK Iosb;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT("ShowAutomountState()\n");
|
||||
|
||||
Status = OpenMountManager(&MountMgrHandle, GENERIC_READ);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("OpenMountManager() Status 0x%08lx\n", Status);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Status = NtDeviceIoControlFile(MountMgrHandle,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&Iosb,
|
||||
IOCTL_MOUNTMGR_QUERY_AUTO_MOUNT,
|
||||
NULL,
|
||||
0,
|
||||
&AutoMount,
|
||||
sizeof(AutoMount));
|
||||
|
||||
NtClose(MountMgrHandle);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("NtDeviceIoControlFile() Status 0x%08lx\n", Status);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (AutoMount.CurrentState == Enabled)
|
||||
ConResPuts(StdOut, IDS_AUTOMOUNT_ENABLED);
|
||||
else
|
||||
ConResPuts(StdOut, IDS_AUTOMOUNT_DISABLED);
|
||||
ConPuts(StdOut, L"\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
BOOL
|
||||
SetAutomountState(
|
||||
_In_ BOOL bEnable)
|
||||
{
|
||||
HANDLE MountMgrHandle;
|
||||
MOUNTMGR_SET_AUTO_MOUNT AutoMount;
|
||||
IO_STATUS_BLOCK Iosb;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT("SetAutomountState()\n");
|
||||
|
||||
Status = OpenMountManager(&MountMgrHandle, GENERIC_READ | GENERIC_WRITE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("OpenMountManager() Status 0x%08lx\n", Status);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (bEnable)
|
||||
AutoMount.NewState = Enabled;
|
||||
else
|
||||
AutoMount.NewState = Disabled;
|
||||
|
||||
Status = NtDeviceIoControlFile(MountMgrHandle,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&Iosb,
|
||||
IOCTL_MOUNTMGR_SET_AUTO_MOUNT,
|
||||
&AutoMount,
|
||||
sizeof(AutoMount),
|
||||
NULL,
|
||||
0);
|
||||
|
||||
NtClose(MountMgrHandle);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("NtDeviceIoControlFile() Status 0x%08lx\n", Status);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (AutoMount.NewState == Enabled)
|
||||
ConResPuts(StdOut, IDS_AUTOMOUNT_ENABLED);
|
||||
else
|
||||
ConResPuts(StdOut, IDS_AUTOMOUNT_DISABLED);
|
||||
ConPuts(StdOut, L"\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
BOOL
|
||||
ScrubAutomount(VOID)
|
||||
{
|
||||
HANDLE MountMgrHandle;
|
||||
IO_STATUS_BLOCK Iosb;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT("ScrubAutomount()\n");
|
||||
|
||||
Status = OpenMountManager(&MountMgrHandle, GENERIC_READ | GENERIC_WRITE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("OpenMountManager() Status 0x%08lx\n", Status);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Status = NtDeviceIoControlFile(MountMgrHandle,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&Iosb,
|
||||
IOCTL_MOUNTMGR_SCRUB_REGISTRY,
|
||||
NULL,
|
||||
0,
|
||||
NULL,
|
||||
0);
|
||||
|
||||
NtClose(MountMgrHandle);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("NtDeviceIoControlFile() Status 0x%08lx\n", Status);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
ConResPuts(StdOut, IDS_AUTOMOUNT_SCRUBBED);
|
||||
ConPuts(StdOut, L"\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
automount_main(
|
||||
INT argc,
|
||||
LPWSTR *argv)
|
||||
{
|
||||
BOOL bDisable = FALSE, bEnable = FALSE, bScrub = FALSE;
|
||||
#if 0
|
||||
BOOL bNoErr = FALSE;
|
||||
#endif
|
||||
INT i;
|
||||
|
||||
DPRINT("Automount()\n");
|
||||
|
||||
#if 0
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (_wcsicmp(argv[i], L"noerr") == 0)
|
||||
{
|
||||
/* noerr */
|
||||
bNoErr = TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (_wcsicmp(argv[i], L"disable") == 0)
|
||||
{
|
||||
/* set automount state */
|
||||
bDisable = TRUE;
|
||||
}
|
||||
else if (_wcsicmp(argv[i], L"enable") == 0)
|
||||
{
|
||||
/* set automount state */
|
||||
bEnable = TRUE;
|
||||
}
|
||||
else if (_wcsicmp(argv[i], L"scrub") == 0)
|
||||
{
|
||||
/* scrub automount */
|
||||
bScrub = TRUE;
|
||||
}
|
||||
else if (_wcsicmp(argv[i], L"noerr") == 0)
|
||||
{
|
||||
/* already handled */
|
||||
}
|
||||
else
|
||||
{
|
||||
ConResPuts(StdErr, IDS_ERROR_INVALID_ARGS);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
DPRINT("bDisable %u\n", bDisable);
|
||||
DPRINT("bEnable %u\n", bEnable);
|
||||
DPRINT("bScrub %u\n", bScrub);
|
||||
|
||||
if (bDisable && bEnable)
|
||||
{
|
||||
ConResPuts(StdErr, IDS_ERROR_INVALID_ARGS);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ((bDisable == FALSE) && (bEnable == FALSE) && (bScrub == FALSE))
|
||||
{
|
||||
DPRINT("Show automount\n");
|
||||
return ShowAutomountState();
|
||||
}
|
||||
|
||||
if (bDisable)
|
||||
{
|
||||
DPRINT("Disable automount\n");
|
||||
return SetAutomountState(FALSE);
|
||||
}
|
||||
|
||||
if (bEnable)
|
||||
{
|
||||
DPRINT("Enable automount\n");
|
||||
return SetAutomountState(TRUE);
|
||||
}
|
||||
|
||||
if (bScrub)
|
||||
{
|
||||
DPRINT("Scrub automount\n");
|
||||
return ScrubAutomount();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
|
||||
#include <ntddscsi.h>
|
||||
#include <ntddstor.h>
|
||||
#include <mountmgr.h>
|
||||
|
||||
#include <fmifs/fmifs.h>
|
||||
#include <guiddef.h>
|
||||
|
||||
@@ -418,36 +418,369 @@ SymbolicName=MSG_COMMAND_AUTOMOUNT
|
||||
Severity=Informational
|
||||
Facility=System
|
||||
Language=English
|
||||
<Add AUTOMOUNT command help text here>
|
||||
Enables or disables the automount feature.
|
||||
|
||||
Syntax: AUTOMOUNT [ENABLE] [DISABLE] [SCRUB] [NOERR]
|
||||
|
||||
ENABLE Enables ReactOS to automatically assign drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
DISABLE Prevents ReactOS from automatically assigning drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
SCRUB Removes mounted folder pathnames, drive letters, mounted
|
||||
folder directories, and registry settings, for volumes that
|
||||
are no longer in the system. This prevents volumes that were
|
||||
previously in the system from being automatically assigned
|
||||
their former drive letters and mounted folder pathnames when
|
||||
they are reintroduced to the system.
|
||||
|
||||
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.
|
||||
|
||||
When the AutoMount feature is enabled, ReactOS automatically brings the
|
||||
volume online and assigns a drive letter and a volume GUID pathname to
|
||||
the volume, when the volume is added to the system. In storage area network
|
||||
(SAN) configurations, disabling AutoMount prevents ReactOS from automatically
|
||||
onlining the volume and assigning drive letters or volume GUID pathnames
|
||||
to any new volumes that are visible to the system.
|
||||
|
||||
Example:
|
||||
|
||||
AUTOMOUNT
|
||||
AUTOMOUNT ENABLE
|
||||
AUTOMOUNT DISABLE
|
||||
.
|
||||
Language=German
|
||||
<Add AUTOMOUNT command help text here>
|
||||
Aktiviert oder deaktiviert das Feature für die automatische
|
||||
Bereitstellung.
|
||||
|
||||
Syntax: AUTOMOUNT [ENABLE] [DISABLE] [SCRUB] [NOERR]
|
||||
|
||||
ENABLE Ermöglicht es ReactOS, dem System hinzugefügten Volumes
|
||||
automatisch Laufwerkbuchstaben zuzuordnen.
|
||||
|
||||
DISABLE Verhindert, dass ReactOS dem System hinzugefügten
|
||||
Volumes Laufwerkbuchstaben zuordnet.
|
||||
|
||||
SCRUB Entfernt eingebundene Ordnerpfadnamen, Laufwerkbuchstaben,
|
||||
Ordnerverzeichnisse und Registrierungseinstellungen für
|
||||
Volumes, die nicht mehr im System vorhanden sind. Damit wird
|
||||
verhindert, dass früher im System enthaltene Volumes
|
||||
automatisch ihren früheren Laufwerkbuchstaben und
|
||||
eingebundenen Ordnerpfadnamen zugeordnet werden,
|
||||
wenn sie dem System wieder hinzugefügt werden.
|
||||
|
||||
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 dem entsprechenden Fehlercode beendet.
|
||||
|
||||
Bei aktiviertem Feature für automatische Bereitstellung wird das
|
||||
Volume automatisch online geschaltet, und dem Volume wird ein
|
||||
Laufwerkbuchstabe und ein Volume-GUID-Pfad zugeordnet, wenn das
|
||||
Volume dem System hinzugefügt wird.
|
||||
In SAN-Konfigurationen (Storage Area Network) wird durch Deaktivieren des
|
||||
Features verhindert, dass Volumes automatisch online geschaltet werden und
|
||||
neuen, für das System sichtbaren Volumes Laufwerkbuchstaben oder
|
||||
Volume-GUID-Pfadnamen zugeordnet werden.
|
||||
|
||||
Beispiel:
|
||||
AUTOMOUNT
|
||||
AUTOMOUNT ENABLE
|
||||
AUTOMOUNT DISABLE
|
||||
.
|
||||
Language=Polish
|
||||
<Add AUTOMOUNT command help text here>
|
||||
Enables or disables the automount feature.
|
||||
|
||||
Syntax: AUTOMOUNT [ENABLE] [DISABLE] [SCRUB] [NOERR]
|
||||
|
||||
ENABLE Enables ReactOS to automatically assign drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
DISABLE Prevents ReactOS from automatically assigning drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
SCRUB Removes mounted folder pathnames, drive letters, mounted
|
||||
folder directories, and registry settings, for volumes that
|
||||
are no longer in the system. This prevents volumes that were
|
||||
previously in the system from being automatically assigned
|
||||
their former drive letters and mounted folder pathnames when
|
||||
they are reintroduced to the system.
|
||||
|
||||
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.
|
||||
|
||||
When the AutoMount feature is enabled, ReactOS automatically brings the
|
||||
volume online and assigns a drive letter and a volume GUID pathname to
|
||||
the volume, when the volume is added to the system. In storage area network
|
||||
(SAN) configurations, disabling AutoMount prevents ReactOS from automatically
|
||||
onlining the volume and assigning drive letters or volume GUID pathnames
|
||||
to any new volumes that are visible to the system.
|
||||
|
||||
Example:
|
||||
|
||||
AUTOMOUNT
|
||||
AUTOMOUNT ENABLE
|
||||
AUTOMOUNT DISABLE
|
||||
.
|
||||
Language=Portugese
|
||||
<Add AUTOMOUNT command help text here>
|
||||
Enables or disables the automount feature.
|
||||
|
||||
Syntax: AUTOMOUNT [ENABLE] [DISABLE] [SCRUB] [NOERR]
|
||||
|
||||
ENABLE Enables ReactOS to automatically assign drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
DISABLE Prevents ReactOS from automatically assigning drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
SCRUB Removes mounted folder pathnames, drive letters, mounted
|
||||
folder directories, and registry settings, for volumes that
|
||||
are no longer in the system. This prevents volumes that were
|
||||
previously in the system from being automatically assigned
|
||||
their former drive letters and mounted folder pathnames when
|
||||
they are reintroduced to the system.
|
||||
|
||||
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.
|
||||
|
||||
When the AutoMount feature is enabled, ReactOS automatically brings the
|
||||
volume online and assigns a drive letter and a volume GUID pathname to
|
||||
the volume, when the volume is added to the system. In storage area network
|
||||
(SAN) configurations, disabling AutoMount prevents ReactOS from automatically
|
||||
onlining the volume and assigning drive letters or volume GUID pathnames
|
||||
to any new volumes that are visible to the system.
|
||||
|
||||
Example:
|
||||
|
||||
AUTOMOUNT
|
||||
AUTOMOUNT ENABLE
|
||||
AUTOMOUNT DISABLE
|
||||
.
|
||||
Language=Romanian
|
||||
<Adăugați aici textul de ajutor pentru comanda AUTOMOUNT>
|
||||
Enables or disables the automount feature.
|
||||
|
||||
Syntax: AUTOMOUNT [ENABLE] [DISABLE] [SCRUB] [NOERR]
|
||||
|
||||
ENABLE Enables ReactOS to automatically assign drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
DISABLE Prevents ReactOS from automatically assigning drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
SCRUB Removes mounted folder pathnames, drive letters, mounted
|
||||
folder directories, and registry settings, for volumes that
|
||||
are no longer in the system. This prevents volumes that were
|
||||
previously in the system from being automatically assigned
|
||||
their former drive letters and mounted folder pathnames when
|
||||
they are reintroduced to the system.
|
||||
|
||||
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.
|
||||
|
||||
When the AutoMount feature is enabled, ReactOS automatically brings the
|
||||
volume online and assigns a drive letter and a volume GUID pathname to
|
||||
the volume, when the volume is added to the system. In storage area network
|
||||
(SAN) configurations, disabling AutoMount prevents ReactOS from automatically
|
||||
onlining the volume and assigning drive letters or volume GUID pathnames
|
||||
to any new volumes that are visible to the system.
|
||||
|
||||
Example:
|
||||
|
||||
AUTOMOUNT
|
||||
AUTOMOUNT ENABLE
|
||||
AUTOMOUNT DISABLE
|
||||
.
|
||||
Language=Russian
|
||||
<Add AUTOMOUNT command help text here>
|
||||
Enables or disables the automount feature.
|
||||
|
||||
Syntax: AUTOMOUNT [ENABLE] [DISABLE] [SCRUB] [NOERR]
|
||||
|
||||
ENABLE Enables ReactOS to automatically assign drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
DISABLE Prevents ReactOS from automatically assigning drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
SCRUB Removes mounted folder pathnames, drive letters, mounted
|
||||
folder directories, and registry settings, for volumes that
|
||||
are no longer in the system. This prevents volumes that were
|
||||
previously in the system from being automatically assigned
|
||||
their former drive letters and mounted folder pathnames when
|
||||
they are reintroduced to the system.
|
||||
|
||||
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.
|
||||
|
||||
When the AutoMount feature is enabled, ReactOS automatically brings the
|
||||
volume online and assigns a drive letter and a volume GUID pathname to
|
||||
the volume, when the volume is added to the system. In storage area network
|
||||
(SAN) configurations, disabling AutoMount prevents ReactOS from automatically
|
||||
onlining the volume and assigning drive letters or volume GUID pathnames
|
||||
to any new volumes that are visible to the system.
|
||||
|
||||
Example:
|
||||
|
||||
AUTOMOUNT
|
||||
AUTOMOUNT ENABLE
|
||||
AUTOMOUNT DISABLE
|
||||
.
|
||||
Language=Albanian
|
||||
<Add AUTOMOUNT command help text here>
|
||||
Enables or disables the automount feature.
|
||||
|
||||
Syntax: AUTOMOUNT [ENABLE] [DISABLE] [SCRUB] [NOERR]
|
||||
|
||||
ENABLE Enables ReactOS to automatically assign drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
DISABLE Prevents ReactOS from automatically assigning drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
SCRUB Removes mounted folder pathnames, drive letters, mounted
|
||||
folder directories, and registry settings, for volumes that
|
||||
are no longer in the system. This prevents volumes that were
|
||||
previously in the system from being automatically assigned
|
||||
their former drive letters and mounted folder pathnames when
|
||||
they are reintroduced to the system.
|
||||
|
||||
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.
|
||||
|
||||
When the AutoMount feature is enabled, ReactOS automatically brings the
|
||||
volume online and assigns a drive letter and a volume GUID pathname to
|
||||
the volume, when the volume is added to the system. In storage area network
|
||||
(SAN) configurations, disabling AutoMount prevents ReactOS from automatically
|
||||
onlining the volume and assigning drive letters or volume GUID pathnames
|
||||
to any new volumes that are visible to the system.
|
||||
|
||||
Example:
|
||||
|
||||
AUTOMOUNT
|
||||
AUTOMOUNT ENABLE
|
||||
AUTOMOUNT DISABLE
|
||||
.
|
||||
Language=Turkish
|
||||
<Add AUTOMOUNT command help text here>
|
||||
Enables or disables the automount feature.
|
||||
|
||||
Syntax: AUTOMOUNT [ENABLE] [DISABLE] [SCRUB] [NOERR]
|
||||
|
||||
ENABLE Enables ReactOS to automatically assign drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
DISABLE Prevents ReactOS from automatically assigning drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
SCRUB Removes mounted folder pathnames, drive letters, mounted
|
||||
folder directories, and registry settings, for volumes that
|
||||
are no longer in the system. This prevents volumes that were
|
||||
previously in the system from being automatically assigned
|
||||
their former drive letters and mounted folder pathnames when
|
||||
they are reintroduced to the system.
|
||||
|
||||
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.
|
||||
|
||||
When the AutoMount feature is enabled, ReactOS automatically brings the
|
||||
volume online and assigns a drive letter and a volume GUID pathname to
|
||||
the volume, when the volume is added to the system. In storage area network
|
||||
(SAN) configurations, disabling AutoMount prevents ReactOS from automatically
|
||||
onlining the volume and assigning drive letters or volume GUID pathnames
|
||||
to any new volumes that are visible to the system.
|
||||
|
||||
Example:
|
||||
|
||||
AUTOMOUNT
|
||||
AUTOMOUNT ENABLE
|
||||
AUTOMOUNT DISABLE
|
||||
.
|
||||
Language=Chinese
|
||||
<Add AUTOMOUNT command help text here>
|
||||
Enables or disables the automount feature.
|
||||
|
||||
Syntax: AUTOMOUNT [ENABLE] [DISABLE] [SCRUB] [NOERR]
|
||||
|
||||
ENABLE Enables ReactOS to automatically assign drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
DISABLE Prevents ReactOS from automatically assigning drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
SCRUB Removes mounted folder pathnames, drive letters, mounted
|
||||
folder directories, and registry settings, for volumes that
|
||||
are no longer in the system. This prevents volumes that were
|
||||
previously in the system from being automatically assigned
|
||||
their former drive letters and mounted folder pathnames when
|
||||
they are reintroduced to the system.
|
||||
|
||||
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.
|
||||
|
||||
When the AutoMount feature is enabled, ReactOS automatically brings the
|
||||
volume online and assigns a drive letter and a volume GUID pathname to
|
||||
the volume, when the volume is added to the system. In storage area network
|
||||
(SAN) configurations, disabling AutoMount prevents ReactOS from automatically
|
||||
onlining the volume and assigning drive letters or volume GUID pathnames
|
||||
to any new volumes that are visible to the system.
|
||||
|
||||
Example:
|
||||
|
||||
AUTOMOUNT
|
||||
AUTOMOUNT ENABLE
|
||||
AUTOMOUNT DISABLE
|
||||
.
|
||||
Language=Taiwanese
|
||||
<Add AUTOMOUNT command help text here>
|
||||
.
|
||||
Enables or disables the automount feature.
|
||||
|
||||
Syntax: AUTOMOUNT [ENABLE] [DISABLE] [SCRUB] [NOERR]
|
||||
|
||||
ENABLE Enables ReactOS to automatically assign drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
DISABLE Prevents ReactOS from automatically assigning drive letters
|
||||
to volumes that are added to the system.
|
||||
|
||||
SCRUB Removes mounted folder pathnames, drive letters, mounted
|
||||
folder directories, and registry settings, for volumes that
|
||||
are no longer in the system. This prevents volumes that were
|
||||
previously in the system from being automatically assigned
|
||||
their former drive letters and mounted folder pathnames when
|
||||
they are reintroduced to the system.
|
||||
|
||||
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.
|
||||
|
||||
When the AutoMount feature is enabled, ReactOS automatically brings the
|
||||
volume online and assigns a drive letter and a volume GUID pathname to
|
||||
the volume, when the volume is added to the system. In storage area network
|
||||
(SAN) configurations, disabling AutoMount prevents ReactOS from automatically
|
||||
onlining the volume and assigning drive letters or volume GUID pathnames
|
||||
to any new volumes that are visible to the system.
|
||||
|
||||
Example:
|
||||
|
||||
AUTOMOUNT
|
||||
AUTOMOUNT ENABLE
|
||||
AUTOMOUNT DISABLE
|
||||
.
|
||||
|
||||
|
||||
MessageId=10006
|
||||
|
||||
@@ -23,6 +23,13 @@ BEGIN
|
||||
IDS_ACTIVE_NO_MBR "\nThe selected disk is not an MBR disk.\nThe ACTIVE command can only be used on an MBR disk.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_AUTOMOUNT_ENABLED "\nDie automatische Bereitstellung von neuen Volumes ist aktiviert.\n"
|
||||
IDS_AUTOMOUNT_DISABLED "\nDie automatische Bereitstellung von neuen Volumes ist deaktiviert.\n"
|
||||
IDS_AUTOMOUNT_SCRUBBED "\nDiskPart hat die Liste der Bereitstellungspunkte erfolgreich bereinigt.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CLEAN_FAIL "\nDer Datenträger konnte nicht bereinigt werden.\nMöglicherweise können die Daten auf diesem Datenträger nicht wiederhergestellt werden.\n"
|
||||
|
||||
@@ -23,6 +23,13 @@ BEGIN
|
||||
IDS_ACTIVE_NO_MBR "\nThe selected disk is not an MBR disk.\nThe ACTIVE command can only be used on an MBR disk.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_AUTOMOUNT_ENABLED "\nAutomatic mounting of new volumes enabled.\n"
|
||||
IDS_AUTOMOUNT_DISABLED "\nAutomatic mounting of new volumes disabled.\n"
|
||||
IDS_AUTOMOUNT_SCRUBBED "\nDiskPart successfully scrubbed the mount point settings in the system.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CLEAN_FAIL "\nDiskPart was unable to clean the disk.\nThe data on this disk may be unrecoverable.\n"
|
||||
|
||||
@@ -30,6 +30,13 @@ BEGIN
|
||||
IDS_ACTIVE_NO_MBR "\nThe selected disk is not an MBR disk.\nThe ACTIVE command can only be used on an MBR disk.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_AUTOMOUNT_ENABLED "\nAutomatic mounting of new volumes enabled.\n"
|
||||
IDS_AUTOMOUNT_DISABLED "\nAutomatic mounting of new volumes disabled.\n"
|
||||
IDS_AUTOMOUNT_SCRUBBED "\nDiskPart successfully scrubbed the mount point settings in the system.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CLEAN_FAIL "\nDiskPart non è stato in grado di pulire il disco.\nI dati in questo disco potrebbero essere non recuperabili.\n"
|
||||
|
||||
@@ -23,6 +23,13 @@ BEGIN
|
||||
IDS_ACTIVE_NO_MBR "\nThe selected disk is not an MBR disk.\nThe ACTIVE command can only be used on an MBR disk.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_AUTOMOUNT_ENABLED "\nAutomatic mounting of new volumes enabled.\n"
|
||||
IDS_AUTOMOUNT_DISABLED "\nAutomatic mounting of new volumes disabled.\n"
|
||||
IDS_AUTOMOUNT_SCRUBBED "\nDiskPart successfully scrubbed the mount point settings in the system.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CLEAN_FAIL "\nDiskPart nie może wyczyścić dysku.\nDane na dysku mogą nie nadawać się do odzyskania.\n"
|
||||
|
||||
@@ -25,6 +25,13 @@ BEGIN
|
||||
IDS_ACTIVE_NO_MBR "\nThe selected disk is not an MBR disk.\nThe ACTIVE command can only be used on an MBR disk.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_AUTOMOUNT_ENABLED "\nAutomatic mounting of new volumes enabled.\n"
|
||||
IDS_AUTOMOUNT_DISABLED "\nAutomatic mounting of new volumes disabled.\n"
|
||||
IDS_AUTOMOUNT_SCRUBBED "\nDiskPart successfully scrubbed the mount point settings in the system.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CLEAN_FAIL "\nDiskPart was unable to clean the disk.\nThe data on this disk may be unrecoverable.\n"
|
||||
|
||||
@@ -31,6 +31,13 @@ BEGIN
|
||||
IDS_ACTIVE_NO_MBR "\nThe selected disk is not an MBR disk.\nThe ACTIVE command can only be used on an MBR disk.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_AUTOMOUNT_ENABLED "\nAutomatic mounting of new volumes enabled.\n"
|
||||
IDS_AUTOMOUNT_DISABLED "\nAutomatic mounting of new volumes disabled.\n"
|
||||
IDS_AUTOMOUNT_SCRUBBED "\nDiskPart successfully scrubbed the mount point settings in the system.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CLEAN_FAIL "\nDiskPart nu a putut să curețe discul.\nDatele de pe disc ar putea să fie irecuperabile.\n"
|
||||
|
||||
@@ -25,6 +25,13 @@ BEGIN
|
||||
IDS_ACTIVE_NO_MBR "\nThe selected disk is not an MBR disk.\nThe ACTIVE command can only be used on an MBR disk.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_AUTOMOUNT_ENABLED "\nAutomatic mounting of new volumes enabled.\n"
|
||||
IDS_AUTOMOUNT_DISABLED "\nAutomatic mounting of new volumes disabled.\n"
|
||||
IDS_AUTOMOUNT_SCRUBBED "\nDiskPart successfully scrubbed the mount point settings in the system.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CLEAN_FAIL "\nDiskPart was unable to clean the disk.\nThe data on this disk may be unrecoverable.\n"
|
||||
|
||||
@@ -27,6 +27,13 @@ BEGIN
|
||||
IDS_ACTIVE_NO_MBR "\nThe selected disk is not an MBR disk.\nThe ACTIVE command can only be used on an MBR disk.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_AUTOMOUNT_ENABLED "\nAutomatic mounting of new volumes enabled.\n"
|
||||
IDS_AUTOMOUNT_DISABLED "\nAutomatic mounting of new volumes disabled.\n"
|
||||
IDS_AUTOMOUNT_SCRUBBED "\nDiskPart successfully scrubbed the mount point settings in the system.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CLEAN_FAIL "\nDiskPart was unable to clean the disk.\nThe data on this disk may be unrecoverable.\n"
|
||||
|
||||
@@ -33,6 +33,13 @@ BEGIN
|
||||
IDS_ACTIVE_NO_MBR "\nThe selected disk is not an MBR disk.\nThe ACTIVE command can only be used on an MBR disk.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_AUTOMOUNT_ENABLED "\nAutomatic mounting of new volumes enabled.\n"
|
||||
IDS_AUTOMOUNT_DISABLED "\nAutomatic mounting of new volumes disabled.\n"
|
||||
IDS_AUTOMOUNT_SCRUBBED "\nDiskPart successfully scrubbed the mount point settings in the system.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CLEAN_FAIL "\nDiskPart diski temizleyemedi.\nBu diskteki veriler kurtarılamaz olabilir.\n"
|
||||
|
||||
@@ -32,6 +32,13 @@ BEGIN
|
||||
IDS_ACTIVE_NO_MBR "\nThe selected disk is not an MBR disk.\nThe ACTIVE command can only be used on an MBR disk.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_AUTOMOUNT_ENABLED "\nAutomatic mounting of new volumes enabled.\n"
|
||||
IDS_AUTOMOUNT_DISABLED "\nAutomatic mounting of new volumes disabled.\n"
|
||||
IDS_AUTOMOUNT_SCRUBBED "\nDiskPart successfully scrubbed the mount point settings in the system.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CLEAN_FAIL "\nDiskPart was unable to clean the disk.\nThe data on this disk may be unrecoverable.\n"
|
||||
|
||||
@@ -32,6 +32,13 @@ BEGIN
|
||||
IDS_ACTIVE_NO_MBR "\nThe selected disk is not an MBR disk.\nThe ACTIVE command can only be used on an MBR disk.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_AUTOMOUNT_ENABLED "\nAutomatic mounting of new volumes enabled.\n"
|
||||
IDS_AUTOMOUNT_DISABLED "\nAutomatic mounting of new volumes disabled.\n"
|
||||
IDS_AUTOMOUNT_SCRUBBED "\nDiskPart successfully scrubbed the mount point settings in the system.\n"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CLEAN_FAIL "\nDiskPart 無法清理磁碟。\n這個磁碟上的資料可能是無法恢復的。\n"
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
#define IDS_ACTIVE_ALREADY 1002
|
||||
#define IDS_ACTIVE_NO_MBR 1003
|
||||
|
||||
#define IDS_AUTOMOUNT_ENABLED 1010
|
||||
#define IDS_AUTOMOUNT_DISABLED 1011
|
||||
#define IDS_AUTOMOUNT_SCRUBBED 1012
|
||||
|
||||
#define IDS_CLEAN_FAIL 1020
|
||||
#define IDS_CLEAN_SUCCESS 1021
|
||||
#define IDS_CLEAN_SYSTEM 1022
|
||||
|
||||
Reference in New Issue
Block a user