Implement ASSOC command (Bug 4275). Patch by Lee C. Baker <lee at leecbaker.com>.

svn path=/trunk/; revision=40062
This commit is contained in:
Jeffrey Morlan 2009-03-16 18:18:26 +00:00
parent 71f14c5422
commit 34afc06d0a
19 changed files with 390 additions and 1 deletions

View file

@ -0,0 +1,262 @@
/*
* Assoc.C - assoc internal command.
*
*
* History:
*
* 14-Mar-2009 Lee C. Baker
* - initial implementation
*
* 15-Mar-2009 Lee C. Baker
* - Don't write to (or use) HKEY_CLASSES_ROOT directly
* - Externalize strings
*
* TODO:
* - PrintAllAssociations might could be optimized to not fetch all registry subkeys under 'Classes', just the ones that start with '.'
* - Make sure that non-administrator users can list associations, and get appropriate error messages when they don't have sufficient
* priveleges to perform an operation
*/
#include <precomp.h>
#include <tchar.h>
#ifdef INCLUDE_CMD_ASSOC
static INT
PrintAssociation(LPTSTR extension)
{
DWORD return_val;
HKEY hKey = NULL, hInsideKey = NULL;
DWORD fileTypeLength = 0;
LPTSTR fileType = NULL;
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_READ, &hKey);
if(return_val != ERROR_SUCCESS)
{
RegCloseKey(hKey);
return -1;
}
return_val = RegOpenKeyEx(hKey, extension, 0, KEY_READ, &hInsideKey);
if(return_val != ERROR_SUCCESS)
{
RegCloseKey(hKey);
RegCloseKey(hInsideKey);
return 0;
}
/* obtain string length */
return_val = RegQueryValueEx(hInsideKey, NULL, NULL, NULL, NULL, &fileTypeLength);
if(return_val == ERROR_FILE_NOT_FOUND) /* no default value, don't display */
{
RegCloseKey(hInsideKey);
RegCloseKey(hKey);
return 0;
}
if(return_val != ERROR_SUCCESS)
{
RegCloseKey(hInsideKey);
RegCloseKey(hKey);
return -2;
}
fileType = cmd_alloc(fileTypeLength * sizeof(TCHAR));
/* obtain actual file type */
return_val = RegQueryValueEx(hInsideKey, NULL, NULL, NULL, (LPBYTE) fileType, &fileTypeLength);
RegCloseKey(hInsideKey);
RegCloseKey(hKey);
if(return_val != ERROR_SUCCESS)
{
cmd_free(fileType);
return -2;
}
if(fileTypeLength != 0) /* if there is a default key, display relevant information */
{
ConOutPrintf(_T("%s=%s\r\n"), extension, fileType);
}
if(fileTypeLength)
cmd_free(fileType);
return 1;
}
static INT
PrintAllAssociations()
{
DWORD return_val = 0;
HKEY hKey = NULL;
DWORD numKeys = 0;
DWORD extLength = 0;
LPTSTR extName = NULL;
DWORD keyCtr = 0;
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_READ, &hKey);
if(return_val != ERROR_SUCCESS)
{
RegCloseKey(hKey);
return -1;
}
return_val = RegQueryInfoKey(hKey, NULL, NULL, NULL, &numKeys, &extLength, NULL, NULL, NULL, NULL, NULL, NULL);
if(return_val != ERROR_SUCCESS)
{
RegCloseKey(hKey);
return -2;
}
extName = cmd_alloc(extLength * sizeof(TCHAR));
for(keyCtr = 0; keyCtr < numKeys; keyCtr++)
{
DWORD buffer_size = extLength;
return_val = RegEnumKeyEx(hKey, keyCtr, extName, &buffer_size, NULL, NULL, NULL, NULL);
if(return_val == ERROR_SUCCESS || return_val == ERROR_MORE_DATA)
{
if(*extName == _T('.'))
PrintAssociation(extName);
}
else
{
cmd_free(extName);
RegCloseKey(hKey);
return -1;
}
}
RegCloseKey(hKey);
if(extName)
cmd_free(extName);
return numKeys;
}
static INT
AddAssociation(LPTSTR extension, LPTSTR type)
{
DWORD return_val;
HKEY hKey = NULL, insideKey = NULL;
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_ALL_ACCESS, &hKey);
if(return_val != ERROR_SUCCESS)
return -1;
return_val = RegCreateKeyEx(hKey, extension, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &insideKey, NULL);
if(return_val != ERROR_SUCCESS)
{
RegCloseKey(hKey);
return -1;
}
return_val = RegSetValueEx(insideKey, NULL, 0, REG_SZ, (LPBYTE)type, (_tcslen(type) + 1) * sizeof(TCHAR));
if(return_val != ERROR_SUCCESS)
{
RegCloseKey(insideKey);
RegCloseKey(hKey);
return -2;
}
RegCloseKey(insideKey);
RegCloseKey(hKey);
return 0;
}
static int
RemoveAssociation(LPTSTR extension)
{
DWORD return_val;
HKEY hKey;
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_ALL_ACCESS, &hKey);
if(return_val != ERROR_SUCCESS)
return -1;
return_val = RegDeleteKey(hKey, extension);
if(return_val != ERROR_SUCCESS)
{
RegCloseKey(hKey);
return -2;
}
RegCloseKey(hKey);
return 0;
}
INT CommandAssoc (LPTSTR param)
{
LPTSTR lpEqualSign = NULL;
/* print help */
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutResPaging(TRUE,STRING_ASSOC_HELP);
return 0;
}
nErrorLevel = 0;
if(_tcslen(param) == 0)
PrintAllAssociations();
else
{
lpEqualSign = _tcschr(param, _T('='));
if(lpEqualSign != NULL)
{
LPTSTR fileType = lpEqualSign + 1;
LPTSTR extension = cmd_alloc((lpEqualSign - param + 1) * sizeof(TCHAR));
_tcsncpy(extension, param, lpEqualSign - param);
extension[lpEqualSign - param] = (TCHAR)0;
if(_tcslen(fileType) == 0)
/* if the equal sign is the last character
in the string, then delete the key */
{
RemoveAssociation(extension);
}
else
/* otherwise, add the key and print out the association*/
{
AddAssociation( extension, fileType);
PrintAssociation(extension);
}
cmd_free(extension);
}
else
{
/* no equal sign, print all associations */
INT retval = PrintAssociation(param);
if(retval == 0) /* if nothing printed out */
ConOutResPrintf(STRING_ASSOC_ERROR, param);
}
}
return 0;
}
#endif /* INCLUDE_CMD_ASSOC */

View file

@ -71,6 +71,9 @@ extern OSVERSIONINFO osvi;
VOID ExpandAlias (LPTSTR, INT);
INT CommandAlias (LPTSTR);
/* Prototypes for ASSOC.C */
INT CommandAssoc (LPTSTR);
/* Prototypes for ATTRIB.C */
INT CommandAttrib (LPTSTR);

View file

@ -16,6 +16,7 @@
<pch>precomp.h</pch>
<compilationunit name="unit.c">
<file>alias.c</file>
<file>assoc.c</file>
<file>attrib.c</file>
<file>batch.c</file>
<file>beep.c</file>

View file

@ -37,6 +37,10 @@ COMMAND cmds[] =
{_T("alias"), 0, CommandAlias},
#endif
#ifdef INCLUDE_CMD_ASSOC
{_T("assoc"), 0, CommandAssoc},
#endif
#ifdef INCLUDE_CMD_ATTRIB
{_T("attrib"), 0, CommandAttrib},
#endif

View file

@ -50,6 +50,7 @@
#ifdef NT4_INTERNAL_COMMANDS
#define INCLUDE_CMD_ACTIVATE
#endif
#define INCLUDE_CMD_ASSOC
#define INCLUDE_CMD_ATTRIB
#define INCLUDE_CMD_CHCP
#define INCLUDE_CMD_CHDIR

View file

@ -9,6 +9,14 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Zeigt Dateiattribute an oder ändert sie.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] Dateiname ...\n\
[/S [/D]]\n\n\
@ -600,6 +608,7 @@ STRING_CHOICE_OPTION, "JN"
STRING_COPY_OPTION, "JNA"
STRING_ALIAS_ERROR, "Die Befehlszeile ist zu lange nach der Alias-Erweiterung!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Es trat ein Fehler auf, während die Batch-Datei geöffnet wurde.\n"
STRING_CHCP_ERROR1, "Aktive Code-Page: %u\n"
STRING_CHCP_ERROR4, "Ungültige Code-Page\n"

View file

@ -9,6 +9,14 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "ÐñïâïëÞ Þ áëëáãÞ ôùí ÷áñáêôçñéóôéêþí ôùí áñ÷åßùí.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
@ -605,6 +613,7 @@ STRING_COPY_OPTION, "YNA"
STRING_ALIAS_ERROR, "Command line too long after alias expansion!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Error opening batch file\n"
STRING_CHCP_ERROR1, "Active code page: %u\n"
STRING_CHCP_ERROR4, "Invalid code page\n"

View file

@ -9,6 +9,14 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Displays or changes file attributes.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
@ -608,7 +616,7 @@ VOL Displays a disk volume label and serial number.\n"
STRING_CHOICE_OPTION, "YN"
STRING_COPY_OPTION, "YNA"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_ALIAS_ERROR, "Command line too long after alias expansion!\n"
STRING_BATCH_ERROR, "Error opening batch file\n"
STRING_CHCP_ERROR1, "Active code page: %u\n"

View file

@ -9,6 +9,14 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Muestra o cambia los atributos de los archivos.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
@ -567,6 +575,7 @@ STRING_COPY_OPTION, "SNT"
STRING_ALIAS_ERROR, "¡Linea de comandos demasiado larga tras la expansión del alias!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Error abriendo el archivo por lotes\n"
STRING_CHCP_ERROR1, "Página de códigos activa: %u\n"
STRING_CHCP_ERROR4, "Código de página inválido\n"

View file

@ -10,6 +10,14 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Affiche ou change des attributs de fichiers.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
@ -623,6 +631,7 @@ STRING_COPY_OPTION, "ONT"
STRING_ALIAS_ERROR, "Ligne de commande trop longue après remplacement de l'alias!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Erreur à l'ouverture du fichier batch\n"
STRING_CHCP_ERROR1, "Page de codes actuelle : %u\n"
STRING_CHCP_ERROR4, "Page de codes invalide \n"

View file

@ -11,6 +11,14 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Állományok attribútumok megjelenítése vagy beállításai.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] állomány ...\n\
[/S [/D]]\n\n\
@ -547,6 +555,7 @@ STRING_COPY_OPTION, "INM"
STRING_ALIAS_ERROR, "A parancssor túl hosszú az alias kibontásakor!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Hiba a batch állomány megnyitásakor\n"
STRING_CHCP_ERROR1, "Aktív kódlap: %u\n"
STRING_CHCP_ERROR4, "Érvénytelen kódlap\n"

View file

@ -10,6 +10,14 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Menampilkan atau mengubah atribut file.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
@ -567,6 +575,7 @@ STRING_COPY_OPTION, "YTS"
STRING_ALIAS_ERROR, "Baris perintah terlalu panjang setelah ekspansi alias!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Kesalaham membuka file batch\n"
STRING_CHCP_ERROR1, "Halaman kode aktif: %u\n"
STRING_CHCP_ERROR4, "Halaman kode tidak benar\n"

View file

@ -5,6 +5,14 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Visualizza o modifica gli attributi dei file.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
@ -613,6 +621,7 @@ STRING_COPY_OPTION, "SNT"
STRING_ALIAS_ERROR, "Linea di comando troppo lunga dopo l'espansione degli alias!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Errore durante l'apertura di un batch\n"
STRING_CHCP_ERROR1, "Tabella dei codici attiva: %u\n"
STRING_CHCP_ERROR4, "Tabella dei codici non valida\n"

View file

@ -9,6 +9,14 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "ファイル属性を表\示または変更します。\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [ファイル] ...\n\
[/S [/D]]\n\n\
@ -574,6 +582,7 @@ STRING_COPY_OPTION, "YNA"
STRING_ALIAS_ERROR, "エイリアス展開後のコマンド ラインが長すぎます!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "バッチ ファイルを開くときにエラーが発生しました。\n"
STRING_CHCP_ERROR1, "現在のコード ページ: %u\n"
STRING_CHCP_ERROR4, "無効なコード ページです\n"

View file

@ -5,6 +5,14 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Viser eller endrer filattributtene.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] fil ...\n\
[/S [/D]]\n\n\
@ -559,6 +567,7 @@ STRING_COPY_OPTION, "YNA"
STRING_ALIAS_ERROR, "Kommando linje for lang etter alias utvidelse!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Feil ved åpning av satsvis fil\n"
STRING_CHCP_ERROR1, "Aktiv tegntabell: %u\n"
STRING_CHCP_ERROR4, "Ugyldig tegntabell\n"

View file

@ -10,6 +10,14 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Wyœwietla lub zmienia atrybuty plików.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] nazwa_pliku ...\n\
[/S [/D]]\n\n\
@ -565,6 +573,7 @@ STRING_COPY_OPTION, "TNZ"
STRING_ALIAS_ERROR, "Linia poleceñ zbyt d³uga po rozszerzeniu aliasa!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "B³¹d podczas otwierania pliku wsadowego\n"
STRING_CHCP_ERROR1, "Aktywna strona kodowa nr: %u\n"
STRING_CHCP_ERROR4, "Niew³aœciwy numer strony kodowej\n"

View file

@ -13,6 +13,14 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Âûâîä è èçìåíåíèå àòðèáóòîâ ôàéëîâ.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] ôàéë ...\n\
[/S [/D]]\n\n\
@ -572,6 +580,7 @@ STRING_COPY_OPTION, "YNA"
STRING_ALIAS_ERROR, "Êîìàíäíàÿ ñòðîêà ñëèøêîì äëèííàÿ ïîñëå ðàçâåðòûâàíèÿ ïñåâäîíèìîâ!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Îøèáêà îòêðûòèÿ êîìàíäíîãî ôàéëà\n"
STRING_CHCP_ERROR1, "Òåêóùàÿ êîäîâàÿ ñòðàíèöà: %u\n"
STRING_CHCP_ERROR4, "Îøèáî÷íàÿ êîäîâàÿ ñòðàíèöà\n"

View file

@ -13,6 +13,14 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
assoc [.ext[=[FileType]]]\n\
\n\
assoc (print all associations)\n\
assoc .ext (print specific association)\n\
assoc .ext= (remove specific association)\n\
assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "³äîáðàæåííÿ àáî çì³íà àòðèáóò³â ôàéëó.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] ôàéë ...\n\
[/S [/D]]\n\n\
@ -613,6 +621,7 @@ STRING_COPY_OPTION, "YNA"
STRING_ALIAS_ERROR, "Command line too long after alias expansion!\n"
STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Error opening batch file\n"
STRING_CHCP_ERROR1, "Active code page: %u\n"
STRING_CHCP_ERROR4, "Invalid code page\n"

View file

@ -70,6 +70,7 @@
#define STRING_REPLACE_ERROR5 355
#define STRING_REPLACE_ERROR6 356
#define STRING_REPLACE_ERROR7 357
#define STRING_ASSOC_ERROR 358
#define STRING_ATTRIB_HELP 600
#define STRING_ALIAS_HELP 601
@ -87,6 +88,7 @@
#define STRING_CMD_HELP6 613
#define STRING_CMD_HELP7 614
#define STRING_CMD_HELP8 615
#define STRING_ASSOC_HELP 616
#define STRING_CMD_SHELLINFO 624