31#define DOKA_CMD _T("DOKA")
32#define DOKA_CMD_SHORT_DESC DOKA_CMD _T(" command is used to view/edit Desired Open Key Access.\n")
54 const TCHAR *pchParameter;
60 blnBadParameter =
FALSE;
69 else if (*pchParameter ==
_T(
'-'))
71 TCHAR a = *(pchParameter+1);
78 if (*(pchParameter+2) != 0)
80 blnBadParameter =
TRUE;
88 Access &= ~KEY_CREATE_LINK;
92 Access &= ~KEY_CREATE_SUB_KEY;
96 Access &= ~KEY_ENUMERATE_SUB_KEYS;
100 Access &= ~KEY_NOTIFY;
104 Access &= ~KEY_QUERY_VALUE;
108 Access &= ~KEY_SET_VALUE;
111 blnBadParameter =
TRUE;
116 else if (*pchParameter ==
_T(
'+'))
118 TCHAR a = *(pchParameter+1);
121 blnBadParameter =
TRUE;
125 if (*(pchParameter+2) != 0)
127 blnBadParameter =
TRUE;
170 blnBadParameter =
TRUE;
177 blnBadParameter =
TRUE;
182 rConsole.
Write(
_T(
"Bad parameter: "));
183 rConsole.
Write(pchParameter);
195 m_rTree.SetDesiredOpenKeyAccess(Access);
196 rConsole.
Write(
_T(
"Desired open key access:\n"));
200 rConsole.
Write(
_T(
"\tKEY_CREATE_LINK - Permission to create a symbolic link.\n"));
204 rConsole.
Write(
_T(
"\tKEY_CREATE_SUB_KEY - Permission to create subkeys.\n"));
208 rConsole.
Write(
_T(
"\tKEY_ENUMERATE_SUB_KEYS - Permission to enumerate subkeys.\n"));
212 rConsole.
Write(
_T(
"\tKEY_NOTIFY - Permission for change notification.\n"));
216 rConsole.
Write(
_T(
"\tKEY_QUERY_VALUE - Permission to query subkey data.\n"));
220 rConsole.
Write(
_T(
"\tKEY_SET_VALUE - Permission to set subkey data.\n"));
230 _T(
" /? - This help.\n\n")
231 _T(
"Switches are:\n")
232 _T(
" - - Reset all permisions.\n")
233 _T(
" -l - Reset permission to create a symbolic link.\n")
234 _T(
" -c - Reset permission to create subkeys.\n")
235 _T(
" -e - Reset permission to enumerate subkeys.\n")
236 _T(
" -n - Reset permission for change notification.\n")
237 _T(
" -q - Reset permission to query subkey data.\n")
238 _T(
" -s - Reset permission to set subkey data.\n")
239 _T(
" +a - Set all permisions.\n")
240 _T(
" +l - Set permission to create a symbolic link.\n")
241 _T(
" +c - Set permission to create subkeys.\n")
242 _T(
" +e - Set permission to enumerate subkeys.\n")
243 _T(
" +n - Set permission for change notification.\n")
244 _T(
" +q - Set permission to query subkey data.\n")
245 _T(
" +s - Set permission to set subkey data.\n")
246 _T(
" +r - Equivalent to combination of +q , +e and +n\n\n")
247 _T(
"Without parameters, command displays current Desired Open Key Access.\n");
#define DOKA_CMD_SHORT_DESC
TCHAR * GetNextArgument()
BOOL Write(const TCHAR *p, DWORD dwChars=0)
virtual ~CShellCommandDOKA()
CShellCommandDOKA(CRegistryTree &rTree)
virtual const TCHAR * GetHelpString()
virtual const TCHAR * GetHelpShortDescriptionString()
virtual int Execute(CConsole &rConsole, CArgumentParser &rArguments)
virtual BOOL Match(const TCHAR *pchCommand)
GLboolean GLboolean GLboolean GLboolean a
#define KEY_CREATE_SUB_KEY
#define KEY_ENUMERATE_SUB_KEYS