30#define NK_CMD _T("NK")
31#define NK_CMD_SHORT_DESC NK_CMD _T(" command is used to create new key.\n")
74 rConsole.
Write(
_T(
"Wrong parameter : \""));
75 rConsole.
Write(pszArg);
88 rConsole.
Write(
_T(
"Key name not specified !\n\n"));
89 blnExitAfterHelp =
TRUE;
109 while(*
pch ==
_T(
'\\'))
112 while((
pch > pszNewKey)&&(*
pch !=
_T(
'\\')))
117 const TCHAR *pszPath;
119 if (*
pch ==
_T(
'\\'))
122 if (
pch == pszNewKey)
128 if (
pch-1 == pszNewKey)
142 if (
s && (pszSubkeyName[0] ==
_T(
'\"')) && (pszSubkeyName[
s-1] ==
_T(
'\"')))
144 pszSubkeyName[
s-1] = 0;
151 rConsole.
Write(
_T(
"Cannot create key.\n"));
165 _T(
"Syntax: ")
NK_CMD _T(
" [/v] [/?] [PATH]KEY_NAME\n\n")
166 _T(
" PATH - optional path to key which subkey will be created. Default is current key.\n")
167 _T(
" KEY_NAME - name of subkey to be created.\n")
168 _T(
" /? - This help.\n")
169 _T(
" /v - Create volatile key. The information is stored in memory and is not\n")
170 _T(
" preserved when the corresponding registry hive is unloaded.\n");
void InvalidateCompletion()
#define COMMAND_NA_ON_ROOT
#define NK_CMD_SHORT_DESC
TCHAR * GetNextArgument()
BOOL Write(const TCHAR *p, DWORD dwChars=0)
BOOL NewKey(const TCHAR *pszKeyName, const TCHAR *pszPath, BOOL blnVolatile=FALSE)
const TCHAR * GetLastErrorDescription()
virtual const TCHAR * GetHelpShortDescriptionString()
virtual BOOL Match(const TCHAR *pchCommand)
virtual ~CShellCommandNewKey()
virtual const TCHAR * GetHelpString()
CShellCommandNewKey(CRegistryTree &rTree)
virtual int Execute(CConsole &rConsole, CArgumentParser &rArguments)