123 lines
16 KiB
Plaintext
123 lines
16 KiB
Plaintext
//Microsoft Developer Studio generated resource script.
|
|
//
|
|
#include "resource.h"
|
|
#include "cmdlineres.h"
|
|
|
|
#include "cmdline.rc"
|
|
|
|
#include <windows.h>
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// String Table
|
|
//
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_USAGE_REG "REG Operation [Parameter List]\r\n\r\n Operation [ QUERY | ADD | DELETE | COPY |\r\n SAVE | LOAD | UNLOAD | RESTORE |\r\n COMPARE | EXPORT | IMPORT ]\r\n\r\nReturn Code: (Except of REG COMPARE)\r\n\r\n 0 - Successful\r\n 1 - Failed\r\n\r\nFor help on a specific operation type:\r\n\r\n REG Operation /?\r\n\r\nExamples:\r\n\r\n REG QUERY /?\r\n REG ADD /?\r\n REG DELETE /?\r\n REG COPY /?\r\n REG SAVE /?\r\n REG RESTORE /?\r\n REG LOAD /?\r\n REG UNLOAD /?\r\n REG COMPARE /?\r\n REG EXPORT /?\r\n REG IMPORT /?\r\n"
|
|
IDS_USAGE_ADD1 "REG ADD KeyName [/v ValueName | /ve] [/t Type] [/s Separator] [/d Data] [/f]\n\n KeyName [\\\\Machine\\]FullKey\n Machine Name of remote machine - omitting defaults to the\n current machine. Only HKLM and HKU are available on remote\n machines.\n FullKey ROOTKEY\\SubKey\n ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]\n SubKey The full name of a registry key under the selected ROOTKEY.\n\n /v The value name, under the selected Key, to add.\n\n /ve adds an empty value name (Default) for the key.\n\n /t RegKey data types\n [ REG_SZ | REG_MULTI_SZ | REG_EXPAND_SZ |\n REG_DWORD | REG_BINARY | REG_NONE ]\n If omitted, REG_SZ is assumed.\n\n /s Specify one character that you use as the separator in your data\n string for REG_MULTI_SZ. If omitted, use ""\\0"" as the separator.\n\n"
|
|
IDS_USAGE_ADD2 " /d The data to assign to the registry ValueName being added.\n\n /f Force overwriting the existing registry entry without prompt.\n\nExamples:\n\n REG ADD \\\\ABC\\HKLM\\Software\\MyCo\n Adds a key HKLM\\Software\\MyCo on remote machine ABC\n\n REG ADD HKLM\\Software\\MyCo /v Data /t REG_BINARY /d fe340ead\n Adds a value (name: Data, type: REG_BINARY, data: fe340ead)\n\n REG ADD HKLM\\Software\\MyCo /v MRU /t REG_MULTI_SZ /d fax\\0mail\n Adds a value (name: MRU, type: REG_MUTLI_SZ, data: fax\\0mail\\0\\0)\n\n REG ADD HKLM\\Software\\MyCo /v Path /t REG_EXPAND_SZ /d ^%systemroot^%\n Adds a value (name: Path, type: REG_EXPAND_SZ, data: %systemroot%)\n Notice: Use the caret symbol ( ^ ) inside the expand string\n"
|
|
IDS_USAGE_DELETE "REG DELETE KeyName [/v ValueName | /ve | /va] [/f]\n\n KeyName [\\\\Machine\\]FullKey\n Machine Name of remote machine - omitting defaults to the current machine.\n Only HKLM and HKU are available on remote machines.\n FullKey ROOTKEY\\SubKey\n ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]\n SubKey The full name of a registry key under the selected ROOTKEY.\n\n ValueName The value name, under the selected Key, to delete.\n When omitted, all subkeys and values under the Key are deleted.\n\n /ve delete the value of empty value name (Default).\n\n /va delete all values under this key.\n\n /f Forces the deletion without prompt.\n\nExamples:\n\n REG DELETE HKLM\\Software\\MyCo\\MyApp\\Timeout\n Deletes the registry key Timeout and its all subkeys and values\n\n REG DELETE \\\\ZODIAC\\HKLM\\Software\\MyCo /v MTU\n Deletes the registry value MTU under MyCo on ZODIAC\n"
|
|
IDS_USAGE_COPY "REG COPY KeyName1 KeyName2 [/s] [/f]\n\n KeyName [\\\\Machine\\]FullKey\n Machine Name of remote machine - omitting defaults to the current machine.\n Only HKLM and HKU are available on remote machines.\n FullKey ROOTKEY\\SubKey\n ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]\n SubKey The full name of a registry key under the selected ROOTKEY.\n\n /s Copies all subkeys and values.\n\n /f Forces the copy without prompt.\n\nExamples:\n\n REG COPY HKLM\\Software\\MyCo\\MyApp HKLM\\Software\\MyCo\\SaveMyApp /s\n Copies all subkeys and values under the key MyApp to the key SaveMyApp\n\n REG COPY \\\\ZODIAC\\HKLM\\Software\\MyCo HKLM\\Software\\MyCo1\n Copies all values under the key MyCo on ZODIAC to the key MyCo1\n on the current machine\n"
|
|
IDS_USAGE_SAVE "REG SAVE KeyName FileName [/y]\n\n KeyName ROOTKEY\\SubKey\n ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]\n SubKey The full name of a registry key under the selected ROOTKEY.\n\n FileName The name of the disk file to save. If no path is specified, the\n file is created in the current folder of the calling process.\n\n /y Force overwriting the existing file without prompt.\n\nExamples:\n\n REG SAVE HKLM\\Software\\MyCo\\MyApp AppBkUp.hiv\n Saves the hive MyApp to the file AppBkUp.hiv in the current folder\n"
|
|
IDS_USAGE_RESTORE "REG RESTORE KeyName FileName\n\n KeyName ROOTKEY\\SubKey (local machine only)\n ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]\n SubKey The full name of a registry key to restore the hive file into.\n Overwrites the existing key's values and subkeys.\n\n FileName The name of the hive file to restore.\n You must use REG SAVE to create this file.\n\nExamples:\n\n REG RESTORE HKLM\\Software\\Microsoft\\ResKit NTRKBkUp.hiv\n Restores the file NTRKBkUp.hiv overwriting the key ResKit\n"
|
|
IDS_USAGE_LOAD "REG LOAD KeyName FileName\n\n KeyName ROOTKEY\\SubKey (local machine only)\n ROOTKEY [ HKLM | HKU ]\n SubKey The key name to load the hive file into. Creates a new key.\n\n FileName The name of the hive file to load.\n You must use REG SAVE to create this file.\n\nExamples:\n\n REG LOAD HKLM\\TempHive TempHive.hiv\n Loads the file TempHive.hiv to the Key HKLM\\TempHive\n"
|
|
IDS_USAGE_UNLOAD "REG UNLOAD KeyName\n\n KeyName ROOTKEY\\SubKey (local machine only)\n ROOTKEY [ HKLM | HKU ]\n SubKey The key name of the hive to unload.\n\nExamples:\n\n REG UNLOAD HKLM\\TempHive\n Unloads the hive TempHive in HKLM\n"
|
|
IDS_USAGE_COMPARE1 "REG COMPARE KeyName1 KeyName2 [/v ValueName | /ve] [Output] [/s]\n\n KeyName [\\\\Machine\\]FullKey\n Machine Name of remote machine - omitting defaults to the current machine.\n Only HKLM and HKU are available on remote machines.\n FullKey ROOTKEY\\SubKey\n If FullKey2 is not specified, FullKey2 is the same as FullKey1.\n ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]\n SubKey The full name of a registry key under the selected ROOTKEY.\n\n ValueName The value name, under the selected Key, to compare.\n When omitted, all values under the Key are compared.\n\n /ve compare the value of empty value name (Default).\n\n /s Compare all subkeys and values.\n\n Output [/oa | /od | /os | /on]\n When omitted, output only differences.\n /oa Output all of differences and matches.\n /od Output only differences.\n /os Output only matches.\n /on No output.\n\n"
|
|
IDS_USAGE_COMPARE2 "Return Code:\n\n 0 - Successful, the result compared is identical\n 1 - Failed\n 2 - Successful, the result compared is different\n\nNote:\n The symbols at the front of each ouputted line are defined as:\n = means FullKey1 data is equal to FullKey2 data\n < refers to FullKey1 data and is different than FullKey2 data\n > refers to FullKey2 data and is different than Fullkey1 data\n\nExamples:\n\n REG COMPARE HKLM\\Software\\MyCo\\MyApp HKLM\\Software\\MyCo\\SaveMyApp\n Compares all values under the key MyApp with SaveMyApp\n\n REG COMPARE HKLM\\Software\\MyCo HKLM\\Software\\MyCo1 /v Version\n Compares the value Version under the key MyCo and MyCo1\n\n REG COMPARE \\\\ZODIAC\\HKLM\\Software\\MyCo \\\\. /s\n Compares all subkeys and values under HKLM\\Software\\MyCo on ZODIAC\n with the same key on the current machine\n"
|
|
IDS_USAGE_EXPORT "REG EXPORT KeyName FileName [/y]\n\n Keyname ROOTKEY[\\SubKey] (local machine only).\n ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]\n SubKey The full name of a registry key under the selected ROOTKEY.\n\n FileName The name of the disk file to export.\n\n /y Force overwriting the existing file without prompt.\n\nExamples:\n\n REG EXPORT HKLM\\Software\\MyCo\\MyApp AppBkUp.reg\n Exports all subkeys and values of the key MyApp to the file AppBkUp.reg\n"
|
|
IDS_USAGE_IMPORT "REG IMPORT FileName\n\n FileName The name of the disk file to import (local machine only).\n\nExamples:\n\n REG IMPORT AppBkUp.reg\n Imports registry entries from the file AppBkUp.reg\n\n"
|
|
IDS_USAGE_QUERY1 "REG QUERY KeyName [/v [ValueName] | /ve] [/s]\n [/f Data [/k] [/d] [/c] [/e]] [/t Type] [/z] [/se Separator]\n\n KeyName [\\\\Machine\\]FullKey\n Machine - Name of remote machine, omitting defaults to the\n current machine. Only HKLM and HKU are available on\n remote machines\n FullKey - in the form of ROOTKEY\SubKey name\n ROOTKEY - [ HKLM | HKCU | HKCR | HKU | HKCC ]\n SubKey - The full name of a registry key under the\n selected ROOTKEY\n\n /v Queries for a specific registry key values.\n If omitted, all values for the key are queried.\n\n Argument to this switch can be optional only when specified\n along with /f switch. This specifies to search in valuenames only.\n\n /ve Queries for the default value or empty value name (Default).\n\n /s Queries all subkeys and values recursively (like dir /s).\n\n /se Specifies the separator (length of 1 character only) in\n data string for REG_MULTI_SZ. Defaults to ""\\0"" as the separator.\n\n /f Specifies the data or pattern to search for.\n"
|
|
IDS_USAGE_QUERY2 " Use double quotes if a string contains spaces. Default is ""*"".\n\n /k Specifies to search in key names only.\n\n /d Specifies the search in data only.\n\n /c Specifies that the search is case sensitive.\n The default search is case insensitive.\n\n /e Specifies to return only exact matches.\n By default all the matches are returned.\n\n /t Specifies registry value data type.\n Valid types are:\n REG_SZ, REG_MULTI_SZ, REG_EXPAND_SZ,\n REG_DWORD, REG_BINARY, REG_NONE\n Defaults to all types.\n\n /z Verbose: Shows the numeric equivalent for the type of the valuename.\n\n"
|
|
IDS_USAGE_QUERY3 "Examples:\n\n REG QUERY HKLM\\Software\\Microsoft\\ResKit /v Version\n Displays the value of the registry value Version\n\n REG QUERY \\\\ABC\\HKLM\\Software\\Microsoft\\ResKit\\Nt\\Setup /s\n Displays all subkeys and values under the registry key Setup\n on remote machine ABC\n\n REG QUERY HKLM\\Software\\Microsoft\\ResKit\\Nt\\Setup /se #\n Displays all the subkeys and values with ""#"" as the seperator\n for all valuenames whose type is REG_MULTI_SZ.\n\n REG QUERY HKLM /f SYSTEM /t REG_SZ /c /e\n Displays Key, Value and Data with case sensitive and exact\n occurrences of ""SYSTEM"" under HKLM root for the data type REG_SZ\n\n REG QUERY HKCU /f 0F /d /t REG_BINARY\n Displays Key, Value and Data for the occurrences of ""0F"" in data \n under HKCU root for the data type REG_BINARY\n\n REG QUERY HKLM\\SOFTWARE /ve \n Displays Value and Data for the empty value (Default)\n under HKLM\\SOFTWARE\n"
|
|
END
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_ERROR_INVALID_SYNTAX "ERROR: Invalid syntax.\nType ""REG /?"" for usage.\n"
|
|
IDS_ERROR_INVALID_SYNTAX_EX "ERROR: Invalid Argument/Option - '%s'.\nType ""REG /?"" for usage.\n"
|
|
IDS_ERROR_INVALID_SYNTAX_WITHOPT "ERROR: Invalid syntax.\nType ""REG %s /?"" for usage.\n"
|
|
|
|
IDS_ERROR_BADKEYNAME "ERROR: Invalid key name.\nType ""REG %s /?"" for usage.\n"
|
|
IDS_ERROR_NONREMOTABLEROOT "ERROR: A remote machine was specified, the root key must be HKLM or HKU.\nType ""REG %s /?"" for usage.\n"
|
|
IDS_ERROR_NONLOADABLEROOT "ERROR: The root key must be HKLM or HKU for LOAD/UNLOAD.\nType ""REG %s /?"" for usage.\n"
|
|
|
|
IDS_ERROR_INVALID_NUMERIC_ADD "ERROR: Invalid syntax. Specify valid numeric value for '/d'.\nType ""REG ADD /?"" for usage.\n"
|
|
IDS_ERROR_INVALID_HEXVALUE_ADD "ERROR: Invalid syntax. Specify valid hex value for '/d'.\nType ""REG ADD /?"" for usage.\n"
|
|
IDS_ERROR_INVALID_DATA_ADD "ERROR: Invalid value specified for '/d'.\nType ""REG ADD /?"" for usage.\n"
|
|
|
|
IDS_ERROR_COPYTOSELF_COPY "ERROR: The registry entry cannot be copied onto itself.\nType ""REG COPY /?"" for usage.\n"
|
|
|
|
IDS_ERROR_PARTIAL_DELETE "Delete request is partially completed.\n"
|
|
|
|
IDS_ERROR_COMPARESELF_COMPARE "ERROR: The registry entry is being compared with itself.\n"
|
|
|
|
IDS_ERROR_READFAIL_QUERY "ERROR: Failed to access ""%s"". Reason: %s\n"
|
|
|
|
IDS_ERROR_PATHNOTFOUND "The system was unable to find the specified registry key or value.\n"
|
|
|
|
IDS_ERROR_NONREMOTABLEROOT_EXPORT "ERROR: A remote machine was specified.\nType ""REG EXPORT /?"" for usage.\n"
|
|
|
|
IDS_REGDISABLED "ERROR: Registry editing has been disabled by your administrator.\n"
|
|
END
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_OVERWRITE "Value %s exists. Overwrite (Yes/No/All)? "
|
|
IDS_DELETE_PERMANENTLY "Permanently delete the registry key %s (Yes/No)? "
|
|
IDS_OVERWRITE_CONFIRM "Value %s exists, overwrite(Yes/No)? "
|
|
IDS_DELETEALL_CONFIRM "Delete all values under the registry key %s (Yes/No)? "
|
|
IDS_DELETE_CONFIRM "Delete the registry value %s (Yes/No)? "
|
|
IDS_SAVE_OVERWRITE_CONFIRM "File %s already exists. Overwrite (Yes/No)?"
|
|
IDS_CONFIRM_CHOICE_LIST "YNA"
|
|
END
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
IDS_NONAME "(Default)"
|
|
IDS_VALUENOTSET "(value not set)"
|
|
|
|
IDS_KEYS_IDENTICAL_COMPARE "\nResult Compared: Identical\n"
|
|
IDS_KEYS_DIFFERENT_COMPARE "\nResult Compared: Different\n"
|
|
IDS_VALUE_COMPARE "Value: %s"
|
|
IDS_KEY_COMPARE "Key: %s\\%s"
|
|
|
|
IDS_QUERY_TYPE "Type: %s\n"
|
|
IDS_QUERY_DATA "Data: %s\n"
|
|
|
|
IDS_STATISTICS_QUERY "End of search: %d match(es) found.\n"
|
|
END
|
|
|
|
STRINGTABLE
|
|
BEGIN
|
|
IDS_NOMEMORY "Insufficient memory. Try closing down some applications, and try again.\n If you still see this message, try restarting Windows.\n"
|
|
IDS_IMPFILEERRFILEOPEN "Error opening the file. There may be a disk or file system error.\n"
|
|
IDS_IMPFILEERRFILEREAD "Error reading the file. There may be a disk error or the file may be corrupt.\n"
|
|
IDS_IMPFILEERRREGOPEN "Error accessing the registry.\n"
|
|
IDS_IMPFILEERRREGSET "Not all data was successfully written to the registry.\n Some keys are open by the system or other processes.\n"
|
|
IDS_IMPFILEERRFORMATBAD "The specified file is not a registry file. You can import only registry files.\n"
|
|
IDS_IMPFILEERRVERBAD "The specified file is not intended for use with this version of Windows.\n"
|
|
|
|
// IDS_IMPFILEERRNOTASCRPT "Cannot import %1: The specified file is not a registry script.\r\nYou can only import binary registry files from within the registry editor."
|
|
// IDS_IMPFILEERRNOPRIV "Cannot import %1: Insufficient privileges."
|
|
// IDS_IMPFILEERRNOFILE "Cannot import %1: The file specified does not exist on %2."
|
|
// IDS_IMPFILEERRNOFILELOCAL "Cannot import %1: The file specified does not exist."
|
|
// IDS_IMPFILEERRINVALID "Cannot import %1: The key selected is invalid."
|
|
|
|
IDS_EXPFILEERRFILEWRITE "Unable to write to the file. There may be a disk or file system error.\n"
|
|
IDS_EXPFILEERRINVALID "The key selected is invalid.\n"
|
|
|
|
// IDS_EXPFILEERRFILEOPEN "Unable to open the registry key.\n"
|
|
// IDS_EXPFILEERRNOPRIV "Cannot export %s: Insufficient privileges.\n"
|
|
END
|
|
|
|
//
|
|
// version information
|
|
//
|
|
#include <ntverp.h>
|
|
#define VER_FILETYPE VFT_APP
|
|
#define VER_FILESUBTYPE VFT2_UNKNOWN
|
|
#define VER_FILEDESCRIPTION_STR "Registry Console Tool"
|
|
#define VER_INTERNALNAME_STR "reg.exe"
|
|
#define VER_ORIGINALFILENAME_STR "reg.exe"
|
|
#include "common.ver"
|