mirror of
https://github.com/reactos/reactos.git
synced 2025-05-22 18:45:00 +00:00
[AT]
- Confirm deleting all jobs. - Fix typos in resources and add missing usage text. svn path=/trunk/; revision=74222
This commit is contained in:
parent
fafcbebc79
commit
7b87ca6c5e
4 changed files with 93 additions and 16 deletions
|
@ -242,6 +242,57 @@ PrintHorizontalLine(VOID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static
|
||||||
|
BOOL
|
||||||
|
Confirm(VOID)
|
||||||
|
{
|
||||||
|
HINSTANCE hInstance;
|
||||||
|
WCHAR szYesBuffer[8];
|
||||||
|
WCHAR szNoBuffer[8];
|
||||||
|
WCHAR szInput[80];
|
||||||
|
DWORD dwOldMode;
|
||||||
|
DWORD dwRead = 0;
|
||||||
|
BOOL ret = FALSE;
|
||||||
|
HANDLE hFile;
|
||||||
|
|
||||||
|
hInstance = GetModuleHandleW(NULL);
|
||||||
|
LoadStringW(hInstance, IDS_CONFIRM_YES, szYesBuffer, _countof(szYesBuffer));
|
||||||
|
LoadStringW(hInstance, IDS_CONFIRM_NO, szNoBuffer, _countof(szNoBuffer));
|
||||||
|
|
||||||
|
ZeroMemory(szInput, sizeof(szInput));
|
||||||
|
|
||||||
|
hFile = GetStdHandle(STD_INPUT_HANDLE);
|
||||||
|
GetConsoleMode(hFile, &dwOldMode);
|
||||||
|
|
||||||
|
SetConsoleMode(hFile, ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT);
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
ConResPrintf(StdOut, IDS_CONFIRM_QUESTION);
|
||||||
|
|
||||||
|
ReadConsoleW(hFile, szInput, _countof(szInput), &dwRead, NULL);
|
||||||
|
|
||||||
|
szInput[0] = towupper(szInput[0]);
|
||||||
|
if (szInput[0] == szYesBuffer[0])
|
||||||
|
{
|
||||||
|
ret = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (szInput[0] == 13 || szInput[0] == szNoBuffer[0])
|
||||||
|
{
|
||||||
|
ret = FALSE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ConResPrintf(StdOut, IDS_CONFIRM_INVALID);
|
||||||
|
}
|
||||||
|
|
||||||
|
SetConsoleMode(hFile, dwOldMode);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
DWORD_PTR
|
DWORD_PTR
|
||||||
GetTimeAsJobTime(VOID)
|
GetTimeAsJobTime(VOID)
|
||||||
|
@ -585,8 +636,9 @@ DeleteJob(
|
||||||
|
|
||||||
if (ulJobId == (ULONG)-1 && bForceDelete == FALSE)
|
if (ulJobId == (ULONG)-1 && bForceDelete == FALSE)
|
||||||
{
|
{
|
||||||
ConResPrintf(StdOut, IDS_CONFIRM_DELETE);
|
ConResPrintf(StdOut, IDS_DELETE_ALL);
|
||||||
return 0;
|
if (!Confirm())
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = NetScheduleJobDel(pszComputerName,
|
Status = NetScheduleJobDel(pszComputerName,
|
||||||
|
|
|
@ -2,27 +2,42 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
STRINGTABLE
|
STRINGTABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
IDS_USAGE "Mit dem AT Befeht können Befehle und Programme zu einem vorbestimmten\n\
|
IDS_USAGE "Mit dem AT Befehl können Befehle und Programme zu einem vorbestimmten\n\
|
||||||
Termin gestartet werden. Der Zeitplandienst muss gestartet sein, um den\n\
|
Termin gestartet werden. Der Zeitplandienst muss gestartet sein, um den\n\
|
||||||
Befeht AT zu verwenden.\n\n\
|
Befehl AT zu verwenden.\n\n\
|
||||||
AT [\\\\Computername] [ [Kennung] [/DELETE] | /DELETE [/YES]]\n\
|
AT [\\\\Computername] [ [Kennung] [/DELETE] | /DELETE [/YES]]\n\
|
||||||
AT [\\\\Computername] Zeit [/INTERACTIVE]\n\
|
AT [\\\\Computername] Zeit [/INTERACTIVE]\n\
|
||||||
[ /EVERY:Datum[,...] | /NEXT:Datum[,...]] ""Befehl""\n\n\
|
[ /EVERY:Datum[,...] | /NEXT:Datum[,...]] ""Befehl""\n\n\
|
||||||
\\\\Computername ...\n\
|
\\\\Computername Gibt einen Remotecomputer an. Ohne diesen Parameter werden\n\
|
||||||
Kennung ...\n\
|
die Befehle auf dem lokalen Computer ausgeführt.\n\
|
||||||
/DELETE ...\n\
|
Kennung Eine Identifikationsnummer, die dem geplanten Befehl\n\
|
||||||
/YES ...\n\
|
zugeteilt wird.\n\
|
||||||
|
/DELETE Löscht geplante Befehle. Ohne Kennung werden alle geplanten\n\
|
||||||
|
Befehle auf dem Computer gelöscht.\n\
|
||||||
|
/YES In Verbindung mit /DELETE werden die geplanten Befehle ohne\n\
|
||||||
|
weitere Bestätiging gelöscht.\n\
|
||||||
Zeit Gibt die Zeit an, zu der ein Befehl ausgeführt werden soll.\n\
|
Zeit Gibt die Zeit an, zu der ein Befehl ausgeführt werden soll.\n\
|
||||||
/INTERACTIVE ...\n\
|
/INTERACTIVE Ermöglicht dem Aufrag, Eingaben von dem Benutzer\n\
|
||||||
/EVERY:Datum[,...] ...\n\
|
anzunehmen, der angemeldet ist, wenn der Auftrag ausgeführt\n\
|
||||||
/NEXT:Datum[,...] ...\n\
|
wird.\n\
|
||||||
|
/EVERY:Datum[,...] Führt den Befehl zu jedem der angegebenen Tage der Woche\n\
|
||||||
|
oder des Monats aus. Ohne Angabe eines Datums wird der\n\
|
||||||
|
aktuelle Tag des Monats angenommen.\n\
|
||||||
|
/NEXT:Datum[,...] Führt den Befehl am nächsten angegebenen Tage der Woche\n\
|
||||||
|
oder des Monats (z.B. nächsten Montag) aus. Ohne Angabe\n\
|
||||||
|
eines Datums wird der aktuelle Tag des Monats angenommen.\n\
|
||||||
""Befehl"" Ist der auszuführende Befehl oder das Stapelprogramm.\n"
|
""Befehl"" Ist der auszuführende Befehl oder das Stapelprogramm.\n"
|
||||||
|
|
||||||
IDS_CONFIRM_DELETE "Dieser Vorgang wird alle geplanten Aufräge löschen.\nMöchten Sie diesen Vorgang fortsetzen? (J/N) [N] "
|
IDS_DELETE_ALL "Dieser Vorgang wird alle geplanten Aufträge löschen.\n"
|
||||||
IDS_NEW_JOB "Neuer Auftrag hinzugefügt. Kennung = %lu\n"
|
IDS_NEW_JOB "Neuer Auftrag hinzugefügt. Kennung = %lu\n"
|
||||||
IDS_JOBS_LIST "Statuskenn. Tag Zeit Befehlszeile\n"
|
IDS_JOBS_LIST "Statuskenn. Tag Zeit Befehlszeile\n"
|
||||||
IDS_NO_ENTRIES "Es sind keine Einträge in der Liste.\n"
|
IDS_NO_ENTRIES "Es sind keine Einträge in der Liste.\n"
|
||||||
|
|
||||||
|
IDS_CONFIRM_QUESTION "Möchten Sie diesen Vorgang fortsetzen? (J/N) [N]: "
|
||||||
|
IDS_CONFIRM_INVALID "\nDies ist eine ungültige Antwort.\n"
|
||||||
|
IDS_CONFIRM_YES "J"
|
||||||
|
IDS_CONFIRM_NO "N"
|
||||||
|
|
||||||
IDS_TODAY "Heute"
|
IDS_TODAY "Heute"
|
||||||
IDS_TOMORROW "Morgen"
|
IDS_TOMORROW "Morgen"
|
||||||
IDS_EVERY "Jeden"
|
IDS_EVERY "Jeden"
|
||||||
|
|
|
@ -16,8 +16,8 @@ id Is an identification number assigned to a scheduled\n\
|
||||||
scheduled commands on the computer are canceled.\n\
|
scheduled commands on the computer are canceled.\n\
|
||||||
/YES Used with cancel all jobs command when no further\n\
|
/YES Used with cancel all jobs command when no further\n\
|
||||||
confirmation is desired.\n\
|
confirmation is desired.\n\
|
||||||
Zeit Specifies the time when command is to run.\n\
|
time Specifies the time when command is to run.\n\
|
||||||
/INTERACTIVE Allows the ob to interact with the desktop of the user\n\
|
/INTERACTIVE Allows the job to interact with the desktop of the user\n\
|
||||||
who is logged on at the time the job runs.\n\
|
who is logged on at the time the job runs.\n\
|
||||||
/EVERY:date[,...] Runs the command on each specified day(s) of the week or\n\
|
/EVERY:date[,...] Runs the command on each specified day(s) of the week or\n\
|
||||||
month. If date is omitted, the current day of the month\n\
|
month. If date is omitted, the current day of the month\n\
|
||||||
|
@ -27,11 +27,16 @@ Zeit Specifies the time when command is to run.\n\
|
||||||
current day of the month is assumed.\n\
|
current day of the month is assumed.\n\
|
||||||
""command"" Is the command or batch program to be run.\n"
|
""command"" Is the command or batch program to be run.\n"
|
||||||
|
|
||||||
IDS_CONFIRM_DELETE "This operation will delete all seduled jobs.\nDo you want to continue this operation? (Y/N) [N] "
|
IDS_DELETE_ALL "This operation will delete all scheduled jobs.\n"
|
||||||
IDS_NEW_JOB "Added a new job with job ID = %lu\n"
|
IDS_NEW_JOB "Added a new job with job ID = %lu\n"
|
||||||
IDS_JOBS_LIST "Status ID Day Time Command Line\n"
|
IDS_JOBS_LIST "Status ID Day Time Command Line\n"
|
||||||
IDS_NO_ENTRIES "There are no entries in the list.\n"
|
IDS_NO_ENTRIES "There are no entries in the list.\n"
|
||||||
|
|
||||||
|
IDS_CONFIRM_QUESTION "Do you want to continue this operation? (Y/N) [N]: "
|
||||||
|
IDS_CONFIRM_INVALID "\nThis is an invalid response.\n"
|
||||||
|
IDS_CONFIRM_YES "Y"
|
||||||
|
IDS_CONFIRM_NO "N"
|
||||||
|
|
||||||
IDS_TODAY "Today"
|
IDS_TODAY "Today"
|
||||||
IDS_TOMORROW "Tomorrow"
|
IDS_TOMORROW "Tomorrow"
|
||||||
IDS_EVERY "Every"
|
IDS_EVERY "Every"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#define IDS_USAGE 100
|
#define IDS_USAGE 100
|
||||||
|
|
||||||
#define IDS_CONFIRM_DELETE 105
|
#define IDS_DELETE_ALL 105
|
||||||
#define IDS_NEW_JOB 106
|
#define IDS_NEW_JOB 106
|
||||||
#define IDS_JOBS_LIST 107
|
#define IDS_JOBS_LIST 107
|
||||||
#define IDS_NO_ENTRIES 108
|
#define IDS_NO_ENTRIES 108
|
||||||
|
@ -24,3 +24,8 @@
|
||||||
#define IDS_TIME 125
|
#define IDS_TIME 125
|
||||||
#define IDS_INTERACTIVE 126
|
#define IDS_INTERACTIVE 126
|
||||||
#define IDS_COMMAND 127
|
#define IDS_COMMAND 127
|
||||||
|
|
||||||
|
#define IDS_CONFIRM_QUESTION 130
|
||||||
|
#define IDS_CONFIRM_INVALID 131
|
||||||
|
#define IDS_CONFIRM_YES 132
|
||||||
|
#define IDS_CONFIRM_NO 133
|
Loading…
Reference in a new issue