#include "resource.h" #include "cmdlineres.h" #include "cmdline.h" #include "cmdline.rc" STRINGTABLE DISCARDABLE BEGIN IDS_SETX_HELP_BEGIN "\nSetX has three ways of working: \n\nSyntax 1:\n" IDS_SETX_HELP_1 " SETX [/S system [/U [domain\\]user [/P [password]]]] var value [/M]\n\n" IDS_SETX_HELP_2 "" IDS_SETX_HELP_3 "Syntax 2:\n" IDS_SETX_HELP_4 " SETX [/S system [/U [domain\\]user [/P [password]]]] var /K regpath [/M]\n\n" IDS_SETX_HELP_5 "" IDS_SETX_HELP_6 "" IDS_SETX_HELP_7 "Syntax 3:\n" IDS_SETX_HELP_8 " SETX [/S system [/U [domain\\]user [/P [password]]]]\n" IDS_SETX_HELP_9 "" IDS_SETX_HELP_10 " /F file {var {/A x,y | /R x,y string}[/M] | /X} [/D delimiters]\n\n" IDS_SETX_HELP_11 "Description:\n" IDS_SETX_HELP_12 " Creates or modifies environment variables in the user or system\n" IDS_SETX_HELP_13 " environment. Can set variables based on arguments, regkeys or\n" IDS_SETX_HELP_14 " file input.\n\n" IDS_SETX_HELP_15 "" IDS_SETX_HELP_16 "Parameter List:\n" IDS_SETX_HELP_17 " /S system Specifies the remote system to connect to.\n\n" IDS_SETX_HELP_18 "" IDS_SETX_HELP_19 " /U [domain\\]user Specifies the user context under which\n" IDS_SETX_HELP_20 " the command should execute.\n\n" IDS_SETX_HELP_21 "" IDS_SETX_HELP_22 " /P [password] Specifies the password for the given\n" IDS_SETX_HELP_23 " user context. Prompts for input if omitted.\n\n" IDS_SETX_HELP_24 "" IDS_SETX_HELP_25 " var Specifies the environment variable to set.\n\n" IDS_SETX_HELP_26 "" IDS_SETX_HELP_27 " value Specifies a value to be assigned to the \n" IDS_SETX_HELP_28 " environment variable.\n\n" IDS_SETX_HELP_29 "" IDS_SETX_HELP_30 " /K regpath Specifies that the variable is set based\n" IDS_SETX_HELP_31 " on information from a registry key.\n" IDS_SETX_HELP_32 " Path should be specified in the format of\n" IDS_SETX_HELP_33 " hive\\key\\...\\value. For example,\n" IDS_SETX_HELP_34 " HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\\n" IDS_SETX_HELP_35 " Control\\TimeZoneInformation\\StandardName.\n\n" IDS_SETX_HELP_36 "" IDS_SETX_HELP_37 " /F file Specifies the filename of the text file\n" IDS_SETX_HELP_38 " to use.\n\n" IDS_SETX_HELP_39 "" IDS_SETX_HELP_40 " /A x,y Specifies absolute file coordinates\n" IDS_SETX_HELP_41 " (line X, item Y) as parameters to search \n" IDS_SETX_HELP_42 " within the file.\n\n" IDS_SETX_HELP_43 "" IDS_SETX_HELP_44 " /R x,y string Specifies relative file coordinates with\n" IDS_SETX_HELP_45 " respect to ""string"" as the search parameters.\n\n" IDS_SETX_HELP_46 "" IDS_SETX_HELP_47 " /M Specifies that the variable should be set in\n" IDS_SETX_HELP_48 " the system wide (HKEY_LOCAL_MACHINE)\n" IDS_SETX_HELP_49 " environment. The default is to set the\n" IDS_SETX_HELP_50 " variable under the HKEY_CURRENT_USER \n" IDS_SETX_HELP_51 " environment.\n\n" IDS_SETX_HELP_52 "" IDS_SETX_HELP_53 " /X Displays file contents with x,y coordinates.\n\n" IDS_SETX_HELP_54 "" IDS_SETX_HELP_55 " /D delimiters Specifies additional delimiters such as "",""\n" IDS_SETX_HELP_56 " or ""\\"". The built-in delimiters are space,\n" IDS_SETX_HELP_57 " tab, carriage return, and linefeed. Any \n" IDS_SETX_HELP_58 " ASCII character can be used as an additional\n" IDS_SETX_HELP_59 " delimiter. The maximum number of delimiters,\n" IDS_SETX_HELP_60 " including the built-in delimiters, is 15.\n\n" IDS_SETX_HELP_61 "" IDS_SETX_HELP_62 " /? Displays this help message.\n\n" IDS_SETX_HELP_63 "" IDS_SETX_HELP_64 "NOTE: 1) SETX writes variables to the master environment in the registry.\n\n" IDS_SETX_HELP_65 "" IDS_SETX_HELP_66 "" IDS_SETX_HELP_67 " 2) On a local system, variables created or modified by this tool\n" IDS_SETX_HELP_68 " will be available in future command windows but not in the\n" IDS_SETX_HELP_69 " current CMD.exe command window.\n\n" IDS_SETX_HELP_70 "" IDS_SETX_HELP_71 " 3) On a remote system, variables created or modified by this tool\n" IDS_SETX_HELP_72 " will be available at the next logon session.\n\n" IDS_SETX_HELP_73 "" IDS_SETX_HELP_74 " 4) The valid Registry Key data types are REG_DWORD, REG_EXPAND_SZ,\n" IDS_SETX_HELP_75 " REG_SZ, REG_MULTI_SZ.\n\n" IDS_SETX_HELP_76 "" IDS_SETX_HELP_77 " 5) Supported hives: HKEY_LOCAL_MACHINE (HKLM),\n" IDS_SETX_HELP_78 " HKEY_CURRENT_USER (HKCU).\n\n" IDS_SETX_HELP_79 "" IDS_SETX_HELP_80 " 6) Delimiters are case sensitive.\n\n" IDS_SETX_HELP_81 "" IDS_SETX_HELP_82 " 7) REG_DWORD values are extracted from the registry in decimal \n" IDS_SETX_HELP_83 " format.\n\n" IDS_SETX_HELP_84 "" IDS_SETX_HELP_85 "" IDS_SETX_HELP_86 "Examples:\n" IDS_SETX_HELP_87 " SETX MACHINE COMPAQ \n" IDS_SETX_HELP_88 " SETX MACHINE ""COMPAQ COMPUTER"" /M\n" IDS_SETX_HELP_89 " SETX MYPATH ""%PATH%""\n" IDS_SETX_HELP_90 " SETX MYPATH ~PATH~\n" IDS_SETX_HELP_91 " SETX /S system /U user /P password MACHINE COMPAQ \n" IDS_SETX_HELP_92 " SETX /S system /U user /P password MYPATH ^%PATH^% \n" IDS_SETX_HELP_93 " SETX TZONE /K HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\\n" IDS_SETX_HELP_94 " Control\\TimeZoneInformation\\StandardName\n" IDS_SETX_HELP_95 " SETX BUILD /K ""HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\n" IDS_SETX_HELP_96 " NT\\CurrentVersion\\CurrentBuildNumber"" /M\n" IDS_SETX_HELP_97 " SETX /S system /U user /P password TZONE /K HKEY_LOCAL_MACHINE\\\n" IDS_SETX_HELP_98 " System\\CurrentControlSet\\Control\\TimeZoneInformation\\\n" IDS_SETX_HELP_99 " StandardName\n" IDS_SETX_HELP_100 " SETX /S system /U user /P password BUILD /K \n" IDS_SETX_HELP_101 " ""HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\\n" IDS_SETX_HELP_102 " CurrentVersion\\CurrentBuildNumber"" /M\n" IDS_SETX_HELP_103 " SETX /F ipconfig.out /X \n" IDS_SETX_HELP_104 " SETX IPADDR /F ipconfig.out /A 5,11 \n" IDS_SETX_HELP_105 " SETX OCTET1 /F ipconfig.out /A 5,3 /D ""#$*."" \n" IDS_SETX_HELP_106 " SETX IPGATEWAY /F ipconfig.out /R 0,7 Gateway\n" IDS_SETX_HELP_107 " SETX /S system /U user /P password /F c:\ipconfig.out /X\n" IDS_SETX_HELP_END "" END STRINGTABLE DISCARDABLE BEGIN IDS_ERROR_SYNTAX "ERROR: Invalid syntax.\nType ""SETX /?"" for usage.\n" IDS_ERROR_FILE_NOT_FOUND "ERROR: The system cannot find registry path specified.\n" IDS_ERROR_PATH_NOT_FOUND "ERROR: The system cannot find the path specified.\n" IDS_ERROR_ACCESS_DENIED "ERROR: Access to the registry path is denied.\n" IDS_ERROR_INVALID_HANDLE "ERROR: The handle is invalid.\n" IDS_ERROR_NOT_ENOUGH_MEMORY "ERROR: Not enough storage is available to process this command.\n" IDS_ERROR_BAD_ENVIRONMENT "ERROR: The environment is incorrect.\n" IDS_ERROR_INVALID_ACCESS "ERROR: The access code is invalid.\n" IDS_ERROR_INVALID_DATA "ERROR: The data is invalid.\n" IDS_ERROR_INVALID_DRIVE "ERROR: The system cannot find the drive specified.\n" IDS_REGDB_E_READREGDB "ERROR: Could not read the key from registry.\n" IDS_REGDB_E_WRITEREGDB "ERROR: Could not write the key to registry.\n" IDS_REGDB_E_KEYMISSING "ERROR: Could not find the key in the registry.\n" IDS_ERROR_5010 "ERROR: Must provide valid row,column.\n" IDS_ERROR_5011 "ERROR: Must provide valid row,column and ""STRING"".\n" IDS_ERROR_5012 "ERROR: Coordinates %s do not exist or specified text not found.\n" IDS_ERROR_5013 "ERROR: Must provide a valid search string for relative searches.\n" IDS_ERROR_5014 "ERROR: Coordinates cannot be NULL.\n " IDS_ERROR_5015 "ERROR: Invalid characters used as coordinates ""%s"".\n" IDS_ERROR_5016 "ERROR: Cannot convert value %s to integer.\n" IDS_ERROR_5017 "ERROR: No search string provided for a relative search.\n" IDS_ERROR_5018 "ERROR: Coordinates %s do not exist.\n" IDS_ERROR_5020 "ERROR: Too many delimiters specified (%s) ! - Maximum is 15.\n" IDS_ERROR_5030 "ERROR: Cannot open text file ""%s"".\n" IDS_ERROR_5031 "ERROR: No filename specified.\n" IDS_ERROR_5032 "ERROR: Specified file is not plain text.\n" IDS_ERROR_5040 "ERROR: Invalid Hive specified. Valid values are HKEY_LOCAL_MACHINE(or HKLM) or HKEY_CURRENT_USER(or HKCU).\n" IDS_ERROR_5041 "ERROR: Only REG_DWORD, REG_EXPAND_SZ, REG_SZ, REG_MULTI_SZ are supported.\n" IDS_ERROR_5042 "ERROR: Bad format for supplied key: %s.\n" IDS_ERROR_DEFAULT "ERROR: The specified operation could not be completed.\n" IDS_NULL_SERVER "ERROR: /S cannot be empty.\n" IDS_NULL_USER "ERROR: /U cannot be empty.\n" IDS_NULL_FILE "ERROR: /F cannot be empty.\n" IDS_USER_BUT_NOMACHINE "ERROR: Invalid syntax. Username specified without specifying system name.\n"; IDS_PASSWD_BUT_NOUSER "ERROR: Invalid syntax. Password specified without specifying user name.\n"; IDS_SETX_SYNTAX "ERROR: Invalid syntax.\nType ""SETX /?"" for usage.\n" IDS_INVALID_ARG "ERROR: Invalid arguments.\n" IDS_INVALID_LENGTH "ERROR: The value cannot exceed 1024 characters.\n" IDS_REGVALUE_ZERO "ERROR: The environmental variable name cannot be empty.\n" IDS_REGVALUE_SPECIFIED "ERROR: The environmental variable name must be specified.\n" IDS_ERROR_INVALIDCOORDINATES "ERROR: Invalid Coordinates Specified.\n" IDS_NULL_REGISTRY "ERROR: Invalid syntax. Value expected for '/k'.\nType ""SETX /?"" for usage.\n" IDS_ERROR_SEARCH_STRING "ERROR: The search string cannot be empty.\n" IDS_MAX_COORDINATES "ERROR: Either the first or second coordinate should be in the range -9999999 to +9999999.\n" IDS_WARNING_LENGTH_EXCEED "\nWARNING: The length of the extracted value is truncated to 1024 characters.\n" IDS_WARNING_LENGTH_EXCEED_EX "\nWARNING: The data being saved is truncated to 1024 characters.\n" IDS_ERROR_CMDPARSER_LENGTH "ERROR: Length of the command line argument should not exceed 255 characters.\n" IDS_NULL_REGISTRY_VALUE "/K cannot be empty.\n" IDS_NULL_ABSOLUTE_VALUE "ERROR: /A cannot be empty.\n" IDS_NULL_RELATIVE_VALUE "ERROR: /R cannot be empty.\n" IDS_INVALID_ABS_NEG "ERROR: Absolute coordinates cannot be negative.\n" END STRINGTABLE DISCARDABLE BEGIN IDS_VALUE_UPDATED "\nSUCCESS: Specified value was saved.\n" IDS_VALUE_UPDATED2 "SUCCESS: Specified value was saved.\n" IDS_VALUE "\nExtracted value: %s." IDS_VALUE2 "\nExtracted value: " END STRINGTABLE DISCARDABLE BEGIN IDS_IGNORE_LOCALCREDENTIALS "\nWARNING: User credentials cannot be used for local connections.\n" END // // Version resources // #include #define VER_FILETYPE VFT_APP #define VER_FILESUBTYPE VFT2_UNKNOWN #define VER_FILEDESCRIPTION_STR "Setx - Sets environment variables" #define VER_INTERNALNAME_STR "setx.exe" #define VER_ORIGINALFILENAME_STR "setx.exe" #include