Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

98 lines
5.9 KiB

#include <windows.h>
#include "resource.h"
#include "cmdlineres.h"
#include "cmdline.rc"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_INCORRECT_SYNTAX "Invalid syntax.\nType ""CHOICE /?"" for usage.\n"
IDS_TYPE_HELP "Type ""CHOICE /?"" for usage.\n"
IDS_D_WITHOUT_T "Invalid syntax. /D can only be specified when /T is specified.\nType ""CHOICE /?"" for usage.\n"
IDS_T_INVALID_VALUE "Invalid syntax. Valid range for /T is %d - %d.\nType ""CHOICE /?"" for usage.\n"
IDS_D_BIG "Invalid syntax. /D only accepts single character.\nType ""CHOICE /?"" for usage.\n"
IDS_D_NOT_MATCHED_TO_C "Invalid syntax. Default choice is not found in the specified choices.\nType ""CHOICE /?"" for usage.\n"
IDS_C_EMPTY "List of choices cannot be empty.\n"
IDS_D_MISSING "Invalid syntax. /T can be specified only when /D is specified.\nType ""CHOICE /?"" for usage.\n"
IDS_DUPLICATE_CHOICE "Duplicate choices are not allowed.\n"
IDS_CHOICE_INVALID "Invalid choice. The valid choice characters are: a-z, A-Z, 0-9 and ASCII values of 128 to 254.\n"
IDS_MESSAGE_OVERFLOW "Message cannot be more than 254 characters.\n"
IDS_TWO_BYTES_NOTALLOWED "The specified choices are not acceptable.\n"
IDS_TFACTOR_NULL_STIRNG "The timeout factor cannot be empty.\n"
IDS_INVALID_TIMEOUT_FACTOR "The timeout factor is invalid.\n"
IDS_FILE_EMPTY "\nERROR: The file is either empty or does not contain the valid choices.\n"
IDS_DEFAULT_CHOICE "YN"
IDS_ERR_CHARUPPER "The characters cannot be converted to upper case.\n"
IDS_DEFAULT_EMPTY "The default choice cannot be empty.\n"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_HELP1 "\nCHOICE [/C choices] [/N] [/CS] [/T timeout /D choice] [/M text]\n\n"
IDS_HELP2 "Description:\n"
IDS_HELP3 " This tool allows users to select one item from a list \n"
IDS_HELP4 " of choices and returns the index of the selected choice.\n\n"
IDS_HELP5 ""
IDS_HELP7 "Parameter List:\n"
IDS_HELP8 " /C choices Specifies the list of choices to be created.\n"
IDS_HELP9 " Default list is ""YN"".\n\n"
IDS_HELP10 ""
IDS_HELP11 " /N Hides the list of choices in the prompt.\n"
IDS_HELP12 " The message before the prompt is displayed\n"
IDS_HELP13 " and the choices are still enabled.\n\n"
IDS_HELP14 ""
IDS_HELP15 " /CS Enables case-sensitive choices to be selected.\n"
IDS_HELP16 " By default, the utility is case-insensitive.\n\n"
IDS_HELP17 ""
IDS_HELP18 " /T timeout The number of seconds to pause before a default \n"
IDS_HELP19 " choice is made. Acceptable values are from 0 to \n"
IDS_HELP20 " 9999. If 0 is specified, there will be no pause \n"
IDS_HELP21 " and the default choice is selected.\n\n"
IDS_HELP22 ""
IDS_HELP23 " /D choice Specifies the default choice after nnnn seconds.\n"
IDS_HELP24 " Character must be in the set of choices specified\n"
IDS_HELP25 " by /C option and must also specify nnnn with /T.\n\n"
IDS_HELP26 ""
IDS_HELP27 " /M text Specifies the message to be displayed before \n"
IDS_HELP28 " the prompt. If not specified, the utility \n"
IDS_HELP29 " displays only a prompt.\n\n"
IDS_HELP30 ""
IDS_HELP31 " /? Displays this help message.\n\n"
IDS_HELP32 " NOTE:\n"
IDS_HELP33 " The ERRORLEVEL environment variable is set to the index of the\n"
IDS_HELP34 " key that was selected from the set of choices. The first choice\n"
IDS_HELP35 " listed returns a value of 1, the second a value of 2, and so on.\n"
IDS_HELP36 " If the user presses a key that is not a valid choice, the tool \n"
IDS_HELP37 " sounds a warning beep. If tool detects an error condition,\n"
IDS_HELP38 " it returns an ERRORLEVEL value of 255. If the user presses \n"
IDS_HELP39 " CTRL+BREAK or CTRL+C, the tool returns an ERRORLEVEL value\n"
IDS_HELP40 " of 0. When you use ERRORLEVEL parameters in a batch program, list\n"
IDS_HELP41 " them in decreasing order.\n\n"
IDS_HELP42 ""
IDS_HELP43 "Examples:\n"
IDS_HELP44 " CHOICE /?\n"
IDS_HELP45 " CHOICE /C YNC /M ""Press Y for Yes, N for No or C for Cancel.""\n"
IDS_HELP46 " CHOICE /T 10 /C ync /CS /D y \n"
IDS_HELP47 " CHOICE /C ab /M ""Select a for option 1 and b for option 2.""\n"
IDS_HELP48 ""
IDS_HELP_END " CHOICE /C ab /N /M ""Select a for option 1 and b for option 2.""\n"
END
//
// Version resources
//
#include <ntverp.h>
#define VER_FILETYPE VFT_APP
#define VER_FILESUBTYPE VFT2_UNKNOWN
#define VER_FILEDESCRIPTION_STR "Offers the user a choice"
#define VER_INTERNALNAME_STR "choice.exe"
#define VER_ORIGINALFILENAME_STR "choice.exe"
#include <common.ver>