192 lines
12 KiB
Plaintext
192 lines
12 KiB
Plaintext
|
#include "w32tmrc.h"
|
||
|
#include <winres.h>
|
||
|
#include <ntverp.h>
|
||
|
|
||
|
/////////////////////////////////////////////////////////////////////////////
|
||
|
//
|
||
|
// Dialog
|
||
|
//
|
||
|
|
||
|
IDD_SERVICECTRL DIALOG DISCARDABLE 0, 0, 222, 201
|
||
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||
|
CAPTION "W32Tm - Service controller"
|
||
|
FONT 8, "MS Shell Dlg"
|
||
|
BEGIN
|
||
|
PUSHBUTTON "SERVICE_CONTROL_STOP",IDC_SC_STOP,30,65,185,10,BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_PAUSE",IDC_SC_PAUSE,30,75,185,10,
|
||
|
BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_CONTINUE",IDC_SC_CONTINUE,30,85,185,10,
|
||
|
BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_INTERROGATE",IDC_SC_INTERROGATE,30,95,
|
||
|
185,10,BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_SHUTDOWN",IDC_SC_SHUTDOWN,30,105,185,10,
|
||
|
BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_PARAMCHANGE",IDC_SC_PARAMCHANGE,30,115,
|
||
|
185,10,BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_NETBINDADD",IDC_SC_NETBINDADD,30,125,
|
||
|
185,10,BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_NETBINDREMOVE",IDC_SC_NETBINDREMOVE,30,
|
||
|
135,185,10,BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_NETBINDENABLE",IDC_SC_NETBINDENABLE,30,
|
||
|
145,185,10,BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_NETBINDDISABLE",IDC_SC_NETBINDDISABLE,
|
||
|
30,155,185,10,BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_DEVICEEVENT",IDC_SC_DEVICEEVENT,30,165,
|
||
|
185,10,BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_HARDWAREPROFILECHANGE",
|
||
|
IDC_SC_HARDWAREPROFILECHANGE,30,175,185,10,BS_LEFT
|
||
|
PUSHBUTTON "SERVICE_CONTROL_POWEREVENT",IDC_SC_POWEREVENT,30,185,
|
||
|
185,10,BS_LEFT
|
||
|
LTEXT "Send:",IDC_STATIC,5,65,20,8
|
||
|
EDITTEXT IDC_STATUS,5,15,210,45,ES_MULTILINE | ES_AUTOVSCROLL |
|
||
|
ES_READONLY | WS_VSCROLL
|
||
|
LTEXT "Status:",IDC_STATIC,5,5,30,10
|
||
|
END
|
||
|
|
||
|
|
||
|
/////////////////////////////////////////////////////////////////////////////
|
||
|
//
|
||
|
// Version
|
||
|
//
|
||
|
|
||
|
#define VER_FILETYPE VFT_DLL
|
||
|
#define VER_FILESUBTYPE VFT2_UNKNOWN
|
||
|
#define VER_FILEDESCRIPTION_STR "Windows Time Service Diagnostic Tool"
|
||
|
|
||
|
#define VER_INTERNALNAME_STR "w32time.dll"
|
||
|
#define VER_ORIGINALFILENAME_STR "w32time.dll"
|
||
|
|
||
|
#include <common.ver>
|
||
|
#include "w32tmmsg.rc"
|
||
|
|
||
|
/////////////////////////////////////////////////////////////////////////////
|
||
|
//
|
||
|
// Strings
|
||
|
//
|
||
|
|
||
|
STRINGTABLE DISCARDABLE
|
||
|
BEGIN
|
||
|
|
||
|
IDS_W32TM_GENERALHELP_LINE1 "w32tm [/? | /register | /unregister ]\n"
|
||
|
IDS_W32TM_GENERALHELP_LINE2 " ? - this help screen.\n"
|
||
|
IDS_W32TM_GENERALHELP_LINE3 " register - register to run as a service and add default\n"
|
||
|
IDS_W32TM_GENERALHELP_LINE4 " configuration to the registry.\n"
|
||
|
IDS_W32TM_GENERALHELP_LINE5 " unregister - unregister service and remove all configuration\n"
|
||
|
IDS_W32TM_GENERALHELP_LINE6 " information from the registry.\n"
|
||
|
IDS_W32TM_GENERALHELP_LINE7 "\n"
|
||
|
|
||
|
IDS_W32TM_MONITORHELP_LINE1 "w32tm /monitor [/domain:<domain name>]\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE2 " [/computers:<name>[,<name>[,<name>...]]]\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE3 " [/threads:<num>]\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE4 " domain - specifies which domain to monitor. If no domain name\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE5 " is given, or neither the domain nor computers option is\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE6 " specified, the default domain is used. This option may be\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE7 " used more than once.\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE8 " computers - monitors the given list of computers. Computer\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE9 " names are separated by commas, with no spaces. If a name is\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE10 " prefixed with a '*', it is treated as a PDC. This option\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE11 " may be used more than once.\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE12 " threads - how many computers to analyze simultaneously. The\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE13 " default value is 3. Allowed range is 1-50.\n"
|
||
|
IDS_W32TM_MONITORHELP_LINE14 "\n"
|
||
|
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE1 "w32tm /ntte <NT time epoch>\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE2 " Convert a NT system time, in (10^-7)s intervals from 0h 1-Jan 1601,\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE3 " into a readable format.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE4 "\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE5 "w32tm /ntpte <NTP time epoch>\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE6 " Convert an NTP time, in (2^-32)s intervals from 0h 1-Jan 1900, into\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE7 " a readable format.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE8 "\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE9 "w32tm /resync [/computer:<computer>] [/nowait] [/rediscover] [/soft]\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE10 " Tell a computer that it should resynchronize its clock as soon\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE11 " as possible, throwing out all accumulated error statistics.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE12 " computer:<computer> - computer that should resync. If not\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE13 " specified, the local computer will resync.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE14 " nowait - do not wait for the resync to occur;\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE15 " return immediately. Otherwise, wait for the resync to\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE16 " complete before returning.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE17 " rediscover - redetect the network configuration and rediscover\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE18 " network sources, then resynchronize.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE19 " soft - resync utilizing existing error statistics. Not useful, \n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE20 " provided for compatibility.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE21 "\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE22 "w32tm /stripchart /computer:<target> [/period:<refresh>]\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE23 " [/dataonly] [/samples:<count>] \n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE24 " Display a strip chart of the offset between this computer and\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE25 " another computer.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE26 " computer:<target> - the computer to measure the offset against.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE27 " period:<refresh> - the time between samples, in seconds. The\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE28 " default is 2s\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE29 " dataonly - display only the data, no graphics.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE30 ""
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE31 " samples:<count> - collect <count> samples, then stop. If not\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE32 " specified, samples will be collected until Ctrl-C is pressed.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE33 "\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE34 "w32tm /config [/computer:<target>] [/update]\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE35 " [/manualpeerlist:<peers>] [/syncfromflags:<source>]\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE36 " [/LocalClockDispersion:<seconds>]\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE37 " computer:<target> - adjusts the configuration of <target>. If not\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE38 " specified, the default is the local computer.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE39 " update - notifies the time service that the configuration has\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE40 " changed, causing the changes to take effect.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE41 " manualpeerlist:<peers> - sets the manual peer list to <peers>,\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE42 " which is a space-delimited list of DNS and/or IP addresses.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE43 " When specifying multiple peers, this switch must be enclosed in\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE44 " quotes.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE45 " syncfromflags:<source> - sets what sources the NTP client should\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE46 " sync from. <source> should be a comma separated list of\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE47 " these keywords (not case sensitive):\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE48 " MANUAL - include peers from the manual peer list\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE49 " DOMHIER - sync from a DC in the domain hierarchy\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE50 "\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE51 "w32tm /tz\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE52 " Display the current time zone settings.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE53 "\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE54 "w32tm /dumpreg [/subkey:<key>] [/computer:<target>]\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE55 " Display the values associated with a given registry key.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE56 " The default key is HKLM\\System\\CurrentControlSet\\Services\\W32Time\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE57 " (the root key for the time service).\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE58 " subkey:<key> - displays the values associated with subkey <key> of the default key.\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE59 " computer:<target> - queries registry settings for computer <target>\n"
|
||
|
IDS_W32TM_OTHERCMDHELP_LINE60 "\n"
|
||
|
|
||
|
IDS_W32TM_ERRORRESYNC_NO_TIME_DATA "The computer did not resync because no time data was available."
|
||
|
IDS_W32TM_ERRORRESYNC_STALE_DATA "The computer did not resync because only stale time data was available."
|
||
|
IDS_W32TM_ERRORRESYNC_SHUTTING_DOWN "The computer did not resync because the time service was shutting down."
|
||
|
IDS_W32TM_ERRORRESYNC_CHANGE_TOO_BIG "The computer did not resync because the required time change was too big."
|
||
|
|
||
|
IDS_W32TM_ERRORGENERAL_COMMAND_SUCCESSFUL "The command completed successfully."
|
||
|
IDS_W32TM_ERRORGENERAL_ERROR_OCCURED "The following error occurred:"
|
||
|
IDS_W32TM_ERRORGENERAL_INVALID_LOCALTIME "(not a valid local time)"
|
||
|
IDS_W32TM_ERRORGENERAL_MISSING_PARAM "Missing parameter."
|
||
|
IDS_W32TM_ERRORGENERAL_NOINTERFACE "No interface specified!"
|
||
|
IDS_W32TM_ERRORGENERAL_TOO_MANY_PARAMS "Too many parameters."
|
||
|
IDS_W32TM_ERRORGENERAL_UNEXPECTED_PARAMS "The following arguments were unexpected:"
|
||
|
|
||
|
IDS_W32TM_ERRORPARAMETER_COMPUTER_MISSING "Required parameter 'computer' missing."
|
||
|
IDS_W32TM_ERRORPARAMETER_INCORRECT_NUMBER_FOR_ALERT "Incorrect number of parameters for alert"
|
||
|
IDS_W32TM_ERRORPARAMETER_UNKNOWN_PARAMETER_SYNCFROMFLAGS "Unknown parameter for syncfromflags:"
|
||
|
|
||
|
IDS_W32TM_ERRORCONFIG_NO_CHANGE_SPECIFIED "No configuration change specified!"
|
||
|
IDS_W32TM_ERRORDUMPREG_NO_SUBKEY_SPECIFIED "Incorrect syntax for dumpreg: no subkey specified!"
|
||
|
IDS_W32TM_ERRORTIMEMONITOR_GETDCLIST_FAILED "GetDcList failed with error code: "
|
||
|
IDS_W32TM_ERRORTIMEMONITOR_INVALID_NUMBER_THREADS "Invalid number of threads"
|
||
|
|
||
|
IDS_W32TM_ERRORTIMEZONE_INVALID "TIME_ZONE_ID_INVALID"
|
||
|
|
||
|
|
||
|
IDS_W32TM_STATUS_SENDING_RESYNC_TO "Sending resync command to"
|
||
|
IDS_W32TM_STATUS_CALLING_GETNETLOGONBITS_ON "Calling W32TimeGetNetlogonServiceBits on"
|
||
|
IDS_W32TM_STATUS_CALLING_JOINCONFIG "Calling W32TimeVerifyJoinConfig."
|
||
|
IDS_W32TM_STATUS_CALLING_UNJOINCONFIG "Calling W32TimeVerifyUnjoinConfig."
|
||
|
IDS_W32TM_STATUS_GETTING_DC_LIST_FOR_DEFAULT_DOMAIN "Getting DC list for default domain..."
|
||
|
IDS_W32TM_STATUS_GETTING_DC_LIST_FOR "Getting DC list for"
|
||
|
|
||
|
IDS_W32TM_STATUS_REGISTER_SUCCESSFUL "W32Time successfully registered."
|
||
|
|
||
|
|
||
|
IDS_W32TM_WARN_IGNORE_SOFT "Rediscover and soft cannot both be specified. Ignoring soft."
|
||
|
|
||
|
END
|