#include <windows.h>
#include "resource.h"
#include "cmdline.rc"
#include "cmdlineres.h"
#include "EvcrtMsg.rc"

/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_USAGE_SYNTAX1       "\nEVENTCREATE [/S system [/U username [/P [password]]]] /ID eventid\n"
    IDS_USAGE_SYNTAX2       "            [/L logname] [/SO srcname] /T type /D description\n"
    IDS_USAGE_NEWLINE1      "\n"
    IDS_USAGE_DESC1         "Description:\n"
    IDS_USAGE_DESC2         "    This command line tool enables an administrator to create\n"
    IDS_USAGE_DESC3         "    a custom event ID and message in a specified event log.\n"
    IDS_USAGE_NEWLINE2      "\n"
    IDS_USAGE_PARAMLIST     "Parameter List:\n"
    IDS_USAGE_PARAMLIST1    "    /S    system           Specifies the remote system to connect to.\n\n"
    IDS_USAGE_PARAMLIST2    "    /U    [domain\\]user    Specifies the user context under which\n"
    IDS_USAGE_PARAMLIST3    "                           the command should execute.\n\n"
    IDS_USAGE_PARAMLIST4    "    /P    [password]       Specifies the password for the given\n"
    IDS_USAGE_PARAMLIST5    "                           user context. Prompts for input if omitted.\n\n"
    IDS_USAGE_PARAMLIST6    "    /L    logname          Specifies the event log to create\n"
    IDS_USAGE_PARAMLIST7    "                           an event in.\n\n"
    IDS_USAGE_PARAMLIST8    "    /T    type             Specifies the type of event to create.\n"
    IDS_USAGE_PARAMLIST9    "                           Valid types: ERROR, WARNING, INFORMATION.\n\n"
    IDS_USAGE_PARAMLIST10   ""
    IDS_USAGE_PARAMLIST11   "    /SO   source           Specifies the source to use for the\n"
    IDS_USAGE_PARAMLIST12   "                           event. A valid source can be any string \n"
    IDS_USAGE_PARAMLIST13   "                           and should represent the application or \n"
    IDS_USAGE_PARAMLIST14   "                           component that is generating the event.\n\n"
    IDS_USAGE_PARAMLIST15   "    /ID   id               Specifies the event ID for the event. A\n"
    IDS_USAGE_PARAMLIST16   "                           valid custom message ID is in the range\n"
    IDS_USAGE_PARAMLIST17   "                           of 1 - 1000.\n\n"
    IDS_USAGE_PARAMLIST18   "    /D    description      Specifies the description to be set for\n"
    IDS_USAGE_PARAMLIST19   "                           the newly creating event.\n\n"
    IDS_USAGE_PARAMLIST20   "    /?                     Displays this help/usage.\n\n"
    IDS_USAGE_NEWLINE3      "\n"
    IDS_USAGE_EXAMPLES      "Examples:\n"
    IDS_USAGE_EXAMPLE11     "    EVENTCREATE /T ERROR /ID 100\n"
    IDS_USAGE_EXAMPLE12     "        /L APPLICATION /D ""Create an event in application log""\n\n"
    IDS_USAGE_EXAMPLE21     ""
    IDS_USAGE_EXAMPLE22     ""
    IDS_USAGE_EXAMPLE31     "    EVENTCREATE /T ERROR /ID 999 /L APPLICATION\n"
    IDS_USAGE_EXAMPLE32     "        /SO WinWord /D ""new source Winword in application log""\n\n"
    IDS_USAGE_EXAMPLE41     "    EVENTCREATE /S system /T ERROR /ID 100\n"
    IDS_USAGE_EXAMPLE42     "        /L APPLICATION /D ""Remote system without user credentials""\n\n"
    IDS_USAGE_EXAMPLE51     "    EVENTCREATE /S system /U user /P password /ID 100 /T ERROR\n"
    IDS_USAGE_EXAMPLE52     "        /L APPLICATION /D ""Remote machine with user credentials""\n\n"
    IDS_USAGE_EXAMPLE61     ""
    IDS_USAGE_EXAMPLE62     ""
    IDS_USAGE_EXAMPLE71     "    EVENTCREATE /S system /U domain\\user /ID 100 /T WARNING\n"
    IDS_USAGE_EXAMPLE72     "        /SO MyBatchFile.cmd /D ""Maintenance script user logon failed""\n"
END

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_LOGTYPE_ERROR					"ERROR"
    IDS_LOGTYPE_WARNING					"WARNING"
    IDS_LOGTYPE_INFORMATION				"INFORMATION"
    IDS_OVALUES_LOGTYPE					"error|information|warning"
END

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_EVENTCREATE_SUCCESS				"SUCCESS: A '%s' type event is created in the '%s' log/source.\n"
    IDS_ERROR_USERNAME_BUT_NOMACHINE	"Invalid Syntax. /U can be specified only when /S is specified.\nType ""EVENTCREATE /?"" for usage.\n"
	IDS_ERROR_USERNAME_EMPTY			"Invalid Syntax. User name should not be empty.\n"
    IDS_ERROR_PASSWORD_BUT_NOUSERNAME	"Invalid Syntax. /P can be specified only when /U is specified.\nType ""EVENTCREATE /?"" for usage.\n"
    IDS_ERROR_INVALID_EVENT_ID			"Invalid Syntax. Event ID should be in the range of 1 - 1000.\nType ""EVENTCREATE /?"" for usage.\n"
    IDS_ERROR_DESCRIPTION_IS_EMPTY		"Invalid Syntax. Description should not be empty.\nType ""EVENTCREATE /?"" for usage.\n"
    IDS_ERROR_LOGSOURCE_IS_EMPTY		"Invalid Syntax. Log/Source should not be empty.\nType ""EVENTCREATE /?"" for usage.\n"
    IDS_ERROR_LOG_SOURCE_BOTH_MISSING	"Invalid Syntax. Either /L or /SO or both should be specified.\nType ""EVENTCREATE /?"" for usage.\n"
	IDS_ERROR_INVALID_USAGE_REQUEST		"Invalid Syntax.\nType ""EVENTCREATE /?"" for usage.\n"
	IDS_ERROR_LOG_NOTEXISTS             "'%s' log doesn't exist. Cannot create the event.\n"
    IDS_ERROR_SYSTEM_EMPTY				"Invalid Syntax. System name cannot be empty.\n"
	IDS_ERROR_NEED_LOG_ALSO				"New source can be created only if log name is also specified.\nINFO: Use /L switch to specify the log name.\n"
	IDS_ERROR_SOURCE_DUPLICATING		"Source already exists in '%s' log. Source cannot be duplicated.\n"
	IDS_ERROR_ID_OUTOFRANGE				"EventID should be in the range of %d - %d.\n"
	IDS_ERROR_NONCUSTOM_SOURCE			"Source parameter is used to identify custom application/scripts only (not built-in sources).\n"
END

//
// Version resources
//
#include <ntverp.h>
#define VER_FILETYPE                VFT_APP
#define VER_FILESUBTYPE             VFT2_UNKNOWN
#define VER_FILEDESCRIPTION_STR     "Event Create"
#define VER_INTERNALNAME_STR        "EventCreate.exe"
#define VER_ORIGINALFILENAME_STR    "EvCreate.exe"
#include <common.ver>